aws / chalice

Python Serverless Microframework for AWS
Apache License 2.0
10.67k stars 1.01k forks source link

Support of Return Batch Failure Item for SQS #2029

Open rgravelintelcom opened 1 year ago

rgravelintelcom commented 1 year ago

Hi, We are using Chalice and Terraform to deploy our application. We would like to use the the Return Batch Failure Item for message that fail during the process of an SQS event. Actually, it work if we manually mark the checkbox in the Lambda SQS Trigger in the console and return the return {"batchItemFailures": {"itemIdentifier": record._event_dict.get('messageId')}}. But since we are all automated and trying to avoid manual configuration, is there a plan to add the support of it in the @app.on_sqs_message parameters? Or is there any way to automate it in other way but still using the annotation? Thanks

dorukhan-ti commented 1 year ago

I am looking for ways to enable this option via IaC as well

dorukhan-ti commented 1 year ago

I am looking for ways to enable this option via IaC as well

I have automated this for our deployment environment like so:

Ecitperbo commented 10 months ago

Our CI/CD pipeline is using Terraform. Here is a workaround for automatic deployment in such case: https://github.com/aws/chalice/issues/2031#issuecomment-1900711686