What is AWS Event source?

  1. Event source is an AWS service that products the events that the lambda function responds to by invoking it.
  2. Event sources can either be poll or push-based
  3. 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.
  4. 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.
  5. 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. By using the appropriate API calls for the event source service, you are able to create and configure the relevant mappings
  2. This will require specific access to allow your event source to invoke the function

Poll-based services

  1. With the CreateEventSourceMapping API, you can set up the relevant event source mapping for your poll-based service
  2. 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/NadtakanF