What is AWS Event source?

  1. Event sources can either be poll or push-based
  2. Poll-based services are Kinesis, SQS, DynamoDB. Lambda polls the service looking for particular events and invokes the associated function when a matching event is found. An example would be a lambda will poll the message queue for SQS and then lambda will synchronously invoke the associative function when a matching event is found.
  3. Push-based services are S3, SNS, and much more. A service using this push model publishes events, in addition, to actually invoking your lambda function.
  4. An event source mapping is a configuration that links your event source to your lambda function. It’s what links the events generated from your event source to invoke your function

Push-based services

  1. The mapping is maintained within the event source
  2. By using the appropriate API calls for the event source service, you are able to create and configure the relevant mappings
  3. This will require specific access to allow your event source to invoke the function

Poll-based services

  1. The configuration of the mappings are held within your Lambda function
  2. With the CreateEventSourceMapping API, you can set up the relevant event source mapping for your poll-based service
  3. Permission is required in the execution role policy
Nadtakan Futhoem — Sr. Software Engineer

--

--

--

Founder of Nadtakan.com & Serverless Cloud developer. Follow me on Twitter https://twitter.com/nadtakanfuthoem

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

TradingBot series — create a Telegram channel for your bot

SRE / DevOps / Kubernetes Weekly Collection#41(Week 46)

Patterns for Continuous Integration with Docker on Travis CI

Agile methodology: Incremental and Iterative way of development

Should I launch on Android or iOS first?

SCCM — Setting Computer Name automatically during OSD Process [2020 Updated]

What Is an Array and What Can I Do with One?

Donkey Car Initial Setup for Windows

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nadtakan Futhoem

Nadtakan Futhoem

Founder of Nadtakan.com & Serverless Cloud developer. Follow me on Twitter https://twitter.com/nadtakanfuthoem

More from Medium

Embed IAM Best Practices With AWS CloudFormation Hooks

Simple server-less public API’s with AWS API Gateway, Lambda and DynamoDB

Relation Databases in AWS Cloud

A Complete Walkthrough Of AWS DynamoDB