What is the structure of event and context objects on different events?

The docs mention I can listen to about 10 different types of events on AWS Lambda, but there is only an example for the ‘Example “LAMBDA-PROXY” event’, which probably looks much different in case of an S3 event or an IoT event.

I guess the context look the same every time?

AWS Reference - Sample Events Published by Event Sources

1 Like

Nice, thanks!

There seem to be more events on this page than on the serverless docs.

Is my mapping right?

API Gateway

  • API Gateway Proxy Request Event
  • API Gateway Proxy Response Event

Kinesis & DynamoDB

  • Amazon DynamoDB Update Event
  • Amazon Kinesis Streams Event

S3

  • Amazon S3 Put Event
  • Amazon S3 Delete Event

Schedule

  • Scheduled Event Event

SNS

  • API Gateway Proxy Response Event

IoT

  • AWS IoT Button Event (Are there only button events?)

CloudWatch Log

  • Amazon CloudWatch Logs Sample Event

Cognito User Pool

  • Amazon Cognito Sync Trigger Sample Event

These seem to be missing in the list:

CloudWatch Event
Alexa Smart Home
Alexa Skill

1 Like