In AWS, we’ve added a DynamoDB stream to trigger a Lambda function using the enclosed serverless.yml configuration. We are able to get all the DynamoDB Stream properties set and work except the following property.
functionResponseType: ReportBatchItemFailures (Set that property as per the following documentation https://www.serverless.com/framework/docs/providers/aws/events/streams/#setting-the-functionresponsetypes)
We are getting the following error while sls deploy to AWS
(ran the sls deploy using cicd/Jenkins
added 21 packages from 70 contributors and audited 21 packages in 3.134s)
Serverless: Configuration warning at ‘functions.<lambda_function>.events.stream’: unrecognized property 'functionResponseType’
As per the AWS documentation ( AWS::Lambda::EventSourceMapping - AWS CloudFormation (amazon.com), this property is a List value and also the property name itself is plural.
i.e., functionResponseTypes: [‘ReportBatchItemFailures’]
So, I’ve tried the serverless.yml config with following possible combinations and still got the same error as listed above.
As per the following PR feat(AWS Stream): Add support for custom checkpoint by imewish · Pull Request #9056 · serverless/serverless · GitHub
the following syntax should work, but it’s not working.
This is the only property giving problem out of all DynamoDB stream properties.
Here is our serverless.yml DynamoDB Stream Event mapping for Lambda (obscured some of the values):
# functionResponseType: [‘ReportBatchItemFailures’]
# functionResponseTypes: ReportBatchItemFailures
# functionResponseTypes: [‘ReportBatchItemFailures’]
I’ve already spent lot of time troubleshooting this issue. Appreciate if you could please help.