All Projects → aws-samples → amazon-eventbridge-producer-consumer-example

aws-samples / amazon-eventbridge-producer-consumer-example

Licence: MIT-0 license
A simple producer/consumer example for Amazon EventBridge. Questions? @jbesw.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to amazon-eventbridge-producer-consumer-example

terraform-aws-lambda
A Terraform module to create AWS Lambda ressources.
Stars: ✭ 40 (-18.37%)
Mutual labels:  lambda, eventbridge
super-serverless-sample
Backend serverless que simula o sistema de votação do BBB
Stars: ✭ 30 (-38.78%)
Mutual labels:  lambda, eventbridge
aws-lambda-scheduler
aws-lambda-scheduler is EventBridge Rule manager that lets you call any existing AWS Lambda Function you have in a set future time with pre-set parameters. Allows more rule creation than AWS limit.
Stars: ✭ 58 (+18.37%)
Mutual labels:  lambda, eventbridge
sigs
Simple thread-safe signal/slot C++17 include-only library.
Stars: ✭ 32 (-34.69%)
Mutual labels:  lambda
lambda-resize-image
An AWS Lambda Function to resize images automatically with API Gateway and S3 for imagemagick tasks. When an image is called on AWS Api Gateway, this package will resize it and send it to the S3.
Stars: ✭ 56 (+14.29%)
Mutual labels:  lambda
aws-lambda-powertools-typescript
A suite of utilities for AWS Lambda Functions that makes structured logging, creating custom metrics asynchronously and tracing with AWS X-Ray easier
Stars: ✭ 817 (+1567.35%)
Mutual labels:  lambda
recipeek
🍽️ Recipe search app
Stars: ✭ 20 (-59.18%)
Mutual labels:  lambda
slic-watch
Easy alarms and dashboards for Lambda, DynamoDB, API Gateway, Kinesis, Step Functions and more
Stars: ✭ 88 (+79.59%)
Mutual labels:  lambda
ebs-backup
Backup EBS Volumes
Stars: ✭ 34 (-30.61%)
Mutual labels:  lambda
basic-serverless-api
A basic full stack example of building an API with AWS Amplify, Amazon API Gateway, AWS Lambda, and Amazon DynamoDB
Stars: ✭ 45 (-8.16%)
Mutual labels:  lambda
lastkeypair
A serverless SSH certificate authority to control access to machines using IAM and Lambda
Stars: ✭ 39 (-20.41%)
Mutual labels:  lambda
functions.netlify.com
Tutorials, examples, workshops and a playground for serverless with Netlify Functions
Stars: ✭ 498 (+916.33%)
Mutual labels:  lambda
gozeit
GoZeit
Stars: ✭ 19 (-61.22%)
Mutual labels:  lambda
pulumi-aws-serverless
Easy serverless programming for AWS
Stars: ✭ 15 (-69.39%)
Mutual labels:  lambda
serverless-email-scheduler
Schedule future emails with AWS Lambda and Step Functions
Stars: ✭ 29 (-40.82%)
Mutual labels:  lambda
aws-maven-plugin
Deploys resources to AWS using maven
Stars: ✭ 25 (-48.98%)
Mutual labels:  lambda
lambda
lambda calculus interpreter
Stars: ✭ 23 (-53.06%)
Mutual labels:  lambda
jMiniLang
用Kotlin实现的编译器和虚拟机,并在此基础上构建操作系统。
Stars: ✭ 62 (+26.53%)
Mutual labels:  lambda
sidecar
Deploy and execute AWS Lambda functions from your Laravel application.
Stars: ✭ 543 (+1008.16%)
Mutual labels:  lambda
terraform-external-module-artifact
Terraform module to fetch any kind of artifacts using curl (binary and text okay)
Stars: ✭ 13 (-73.47%)
Mutual labels:  lambda

Amazon EventBridge - Producer/Consumer example

This example application creates two AWS Lambda functions - a producer and a consumer. The SAM template deploys these functions, together with an EventBridge rule that determines which events are routed to the consumer.

The example shows how an ATM application at a bank could generate events, and the rule only passes 'approved' transactions to an event consuming application.

Important: this application uses various AWS services and there are costs associated with these services after the Free Tier usage - please see the AWS Pricing page for details. You are responsible for any AWS costs incurred. No warranty is implied in this example.

For more blogs and examples, visit Serverless Land.

.
├── README.MD                   <-- This instructions file
├── atmProducer                 <-- Source code for a lambda function
│   └── handler.js              <-- Main Lambda handler
│   └── events.js               <-- Events
│   └── localTest.js            <-- Wrapper for local testing
│   └── package.json            <-- NodeJS dependencies and scripts
├── atmConsumer                 <-- Source code for a lambda function
│   └── handler.js              <-- Main Lambda handler
├── template.yaml               <-- SAM template

Requirements

Installation Instructions

  1. Create an AWS account if you do not already have one and login.

  2. Install Git and install the AWS Serverless Application Model CLI on your local machine.

  3. Create a new directory, navigate to that directory in a terminal and enter https://github.com/aws-samples/amazon-eventbridge-producer-consumer-example.

  4. From the command line, run:

cd ./amazon-eventbridge-producer-consumer-example
sam deploy --guided

Choose a stack name, select the desired AWS Region, and allow SAM to create roles with the required permissions. Once you have run guided mode once, you can use sam deploy in future to use these defaults.

How it works

  • Use the AWS CLI or AWS Lambda Console to invoke the Producer function. This places the events in events.js onto the default event bus in EventBridge.
  • The EventBridge rule specified in template.yaml filters the events based upon the criteria in the EventPattern section.
  • When the rule validates an event, it is routed to the Consumer function. This logs out the event, which you can see in CloudWatch Logs.

==============================================

Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.

SPDX-License-Identifier: MIT-0

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].