AWS Lambda Event Sources and Destination Trigger Services

In this article, we are going to learn Lambda Event Sources and Destination Trigger Services.

AWS Lambda Event Sources and Destination Trigger Services

By the end of the article, we will learn AWS Lambda integrates with other AWS services.

I have just published a new course — AWS Lambda & Serverless — Developer Guide with Hands-on Labs.

AWS Lambda Event Sources

With lambda you can run code for virtually any type of applications or backend services all with zero administration. We can upload code and run your code and scale your code automatically with high availability. So we can also set up our lambda code to automatically trigger from other AWS services or call it directly any web or mobile app.

AWS Lambda Event Sources and Destination Trigger Services

You can see the image above, the typical lambda function there is an event source or trigger and actual Function code and then there is the destination.

  • Event Source
  • Function
  • Destination

AWS Lambda Trigger Services

AWS Lambda integrates with other AWS services to invoke functions or take other actions. So the event source has a number of services that can directly interact with lambda. And these events can be almost anything;

  • it can be a http call, cron job
  • it can be uploading an object into S3 bucket
  • it can be changes in a resource state
  • it can be third party call like payment done through stripe

So the event is something that happens that triggers to lambda function to execute. After triggering event to lambda function lambda launch the execution environment with different language and runtimes, you can basically develop any language and runtime into lambda code.
After execution, lambda has destinations that can be interaction with your function code it depends your function business logic and business requirements.

Use Case of Integrations

AWS Lambda integrates with other AWS services to invoke functions or take other actions. These are some common use cases:

  • Invoke a function in response to resource lifecycle events, such as with Amazon S3. This is Using AWS Lambda with Amazon S3. For example when an object upload to S3 bucket, this event can be trigger a lambda function.
  • Respond to incoming HTTP requests. This is using Lambda with API Gateway. Typical REST API use cases can be trigger API gateway and respond back to client.
  • Consume events from a queue. This is Using Lambda with Amazon SQS. Lambda poll queue records from Amazon SQS.
  • Run a function on a schedule. This is Using AWS Lambda with Amazon EventBridge CloudWatch Events.

Depending on which service you’re using with Lambda, the invocation generally works in one of two ways. An event drives the invocation or Lambda polls a queue or data stream and invokes the function in response to activity in the queue or data stream.

List of Services Lambda Event Sources

You can Find the list of services that invokes to lambda as an event source.

https://docs.aws.amazon.com/lambda/latest/dg/lambda-services.html#eventsources-sqs

You can follow the link from the service name to find information about how to set up the integration between the services. These topics also include example events that you can use to test your function.

Step by Step Design AWS Architectures w/ Course

I have just published a new course — AWS Lambda & Serverless — Developer Guide with Hands-on Labs.

In this course, we will learn almost all the AWS Serverless Services with all aspects. We are going to build serverless applications with using AWS Lambda, Amazon API Gateway, Amazon DynamoDB, Amazon Cognito, Amazon S3, Amazon SNS, Amazon SQS, Amazon EventBridge, AWS Step Functions, DynamoDB and Kinesis Streams. This course will be 100% hands-on, and you will be developing a real-world application with hands-on labs together and step by step.

Source Code

Get the Source Code from Serverless Microservices GitHub — Clone or fork this repository, if you like don’t forget the star. If you find or ask anything you can directly open issue on repository.

--

--

Mehmet Ozkaya
AWS Lambda & Serverless — Developer Guide with Hands-on Labs

Software Architect | Udemy Instructor | AWS Community Builder | Cloud-Native and Serverless Event-driven Microservices https://github.com/mehmetozkaya