I’m trying to set the properties “Retry attempts” and “Maximum age of record” on an AWS Lambda EventSourceMapping to a DynamoDB Stream - via serverless.yml (serverless.com framework). When the stack is deployed, they keep the default values, and not the values I set. Help? Thanks
My code:
name-of-serverless-function
handler: src/functions/my.handler
events:
- stream:
type: dynamodb
batchSize: 1
maximumRetryAttempts: 2
maximumRecordAgeInSeconds: 8
arn: properWorkingARN
I am having this same issue and cannot find a work around. Help!
Current serverless framework (1.71.1) handles maximumRetryAttempts. It doesn’t handle maximumRecordAgeInSeconds, though. For that, you’d have to put an extensions
section in your serverless.yml
. Something like:
functions:
myfunc:
handler: src/functions/my.handler
events:
- stream:
type: dynamodb
batchSize: 1
maximumRetryAttempts: 2
maximumRecordAgeInSeconds: 8
arn: 'arn:aws:kinesis:xx-fake-region:123456789012:MyStream'
extensions:
MyfuncEventSourceMappingKinesisMyStream:
Properties:
MaximumRecordAgeInSeconds: 60 # 60 s in the minimum value for this property