Reading stream from DynamoDB by Lambda function declared using SAM
An example of how to read stream from DynamoDB by Lambda function declared using template.yaml of your SAM configuration
YourLambdaFunction:
Type: AWS::Serverless::Function
Properties:
Description: Description of your function
Runtime: nodejs16.x
Architectures:
- x86_64
Handler: index.handler
Events:
Stream:
Type: DynamoDB
Properties:
Stream: !GetAtt YourDynamoDbResourceName.StreamArn
BatchSize: 1
MaximumRetryAttempts: 3
DestinationConfig:
OnFailure:
Destination: !GetAtt YourSQSResourceName.Arn
StartingPosition: TRIM_HORIZON
MemorySize: 128
Timeout: 100PreviousAdding a scheduled timer to start Lambda function resource using SAMNextSchema to create a resource of SQS queue using SAM
Last updated