Closed ryanwalters closed 1 year ago
@ryanwalters you can do it with eventSourceMappingOverride
:
functions:
processEvent:
handler: handler.handler
events:
- snsSqs:
name: TestEvent # Required - choose a name prefix for the event queue
topicArn: !Ref Topic # Required - SNS topic to subscribe to
eventSourceMappingOverride:
functionResponseTypes:
- ReportBatchItemFailures
Thanks for your interest @ryanwalters and for your answer @janos-kasa!
@janos-kasa has the right approach, we were originally mapping through each parameter one-by-one as people found missing functionality and eventually realised that we should just directly pass through CF config for the event source mapping (a la https://github.com/agiledigital/serverless-sns-sqs-lambda/issues/213) which is more future proof.
I'll mark this issue as solved.
Do you think it would be possible to add support for partial batch responses for lambdas with SQS event sources?
Here is a little more documentation on the feature, as well as the bit of CloudFormation needed to enable it.
From the Serverless plugin side of things, I defer to you to decide what is best obviously, but I picture something like this:
Great project by the way!