-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs: "ReportBatchItemFailures" for Lambda SQS event sources #2256
Comments
@brysontyrrell Thanks for the request but it doesn't look like something CloudFormation supports at this time. Until that is released, SAM can't do anything: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-permission.html |
@jfuss It looks like it is in CloudFormation:
|
Function response types has already been exposed for the DynamoDB event source in SAM: |
For anyone else looking at this for answers, here's a functional sample template that works (bonus points if you use Python with Lambda): https://awslabs.github.io/aws-lambda-powertools-python/latest/utilities/batch/#required-resources |
Sorry just getting back from parental leave. @brysontyrrell I was looking at Permissions not Event Source Mappings 🤦 @heitorlessa and @brysontyrrell So then it looks like we support this already? Seems like the case quickly looking through code but our docs don't suggest it. I assume @heitorlessa tested that Powertools example. 🤔 |
@jfuss @heitorlessa - Hey guys. Any word on updating the documentation to reflect that this is in SAM and supported? This still doesn't show that BatchSize: Integer
Enabled: Boolean
FilterCriteria: FilterCriteria
MaximumBatchingWindowInSeconds: Integer
Queue: String |
@brysontyrrell Looking at the commit: #1883 it only mentions support for Kinesis and DynamoDB Streams. Maybe SQS came later? Anyways, let me kick off an internal issue to get this added to SQS. Updating labels as well. |
What's the status on this issue? This seems to still be an issue and the ticket's approaching it's 1 year mark... |
Reproducable example for posterity: Transform: AWS::Serverless-2016-10-31
Resources:
MyQueue:
Type: AWS::SQS::Queue
MyFunction:
Type: AWS::Serverless::Function
Properties:
InlineCode: foo
Handler: bar
Runtime: python3.9
Events:
SQSEvent:
Type: SQS
Properties:
Queue: !GetAtt MyQueue.Arn
FunctionResponseTypes:
- ReportBatchItemFailures Deploy with:
|
Describe your idea/feature/enhancement
The SQS event source for Lambda supports reporting failed messages within a batch: https://docs.aws.amazon.com/lambda/latest/dg/with-sqs.html#services-sqs-batchfailurereporting
Example response:
The SQS event source created by SAM does not enable this option. This has great benefit when enabled so we can report back messages that failed without forcing the entire batch to be retried.
Here is an example event source created by SAM:
Here is the same event source created manually and setting ReportBatchItemFailures:
Proposal
Add an additional property onto SQS event configurations to allow enabling features like ReportBatchItemFailures.
Things to consider:
[ ] The SAM documentation will need to be updated
The text was updated successfully, but these errors were encountered: