AWS - Generate Event

Creates sample Lambda function payloads for different types of events.

serverless generate-event --type eventType


  • --type or -t The type of the event to generate payload for. Required.
  • --body or -b The body for the message, request, or stream event.

Available event types

  • aws:alexaSkill
  • aws:alexaSmartHome
  • aws:apiGateway
  • aws:cloudWatch
  • aws:cloudWatchLog
  • aws:cognitoUserPool
  • aws:dynamo
  • aws:iot
  • aws:kinesis
  • aws:s3
  • aws:sns
  • aws:sqs
  • aws:websocket


Generate SQS event payload

serverless generate-event -t aws:sqs

Generate Kinesis event payload with body

serverless generate-event -t aws:kinesis -b '{"foo": "bar"}'

Generate SQS event and save it to a file

serverless generate-event -t aws:sqs > event.json
Go to Github