DynamoDB stream event source for AWS Lambda function.
Install Node.js and npm first!
npm i @cfn-modules/lambda-event-source-dynamodb-stream You have to set the
StreamViewTypeparameter in the lambda-function module to != DISABLED to make this event source work.
--- AWSTemplateFormatVersion: '2010-09-09' Description: 'cfn-modules example' Resources: EventSource: Type: 'AWS::CloudFormation::Stack' Properties: Parameters: LambdaModule: !GetAtt 'Function.Outputs.StackName' # required TableModule: !GetAtt 'Table.Outputs.StackName' # required BatchSize: '10' # optional StartingPosition: LATEST # optional TemplateURL: './node_modules/@cfn-modules/lambda-event-source-dynamodb-stream/module.yml' none
| Name | Description | Default | Required? | Allowed values |
|---|---|---|---|---|
| LambdaModule | Stack name of lambda-function module | yes | ||
| TableModule | Stack name of dynamodb-table module (with StreamViewType != DISABLED) | yes | ||
| BatchSize | The largest number of messages that Lambda retrieves from your stream at once. | 10 | no | [1-10000] |
| StartingPosition | The position in the stream where Lambda starts reading | LATEST | no | [LATEST, TRIM_HORIZON] |