serverless-application-model icon indicating copy to clipboard operation
serverless-application-model copied to clipboard

Support DLQ for SNS subscriptions

Open michaelwittig opened this issue 5 years ago • 4 comments

Description: SNS subscriptions support DLQs using a so called RedrivePolicy https://docs.aws.amazon.com/sns/latest/dg/sns-configure-dead-letter-queue.html

Observed result: The SNS event type does not allow to define a RedrivePolicy https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#sns

Expected result: Support RedrivePolicy

michaelwittig avatar Jan 17 '20 14:01 michaelwittig

Great idea!


~~Edit: CloudFormation documentation for the Sns Subscription resource states that RedrivePolicy is not supported in CloudFormation. We can add this feature once this property is supported.~~


We can add RedrivePolicy here to the subscription definition: https://github.com/awslabs/serverless-application-model/blob/develop/samtranslator/model/sns.py#L6

Add it to the SNS event definition and make sure it gets plumbed through this section: https://github.com/awslabs/serverless-application-model/blob/develop/samtranslator/model/eventsources/push.py#L367

Add/update tests, and this should be good to go!

keetonian avatar Jan 17 '20 19:01 keetonian

@keetonian any update on this?

frankleng avatar Apr 16 '20 22:04 frankleng

RedrivePolicy seams to be supported now

timoschilling avatar Apr 17 '20 05:04 timoschilling

Crossed out my comment that it's not supported in CloudFormation, it looks like we can go forward with this feature.

keetonian avatar Apr 17 '20 22:04 keetonian

Re-openning till we change the docs

ssenchenko avatar Dec 16 '22 20:12 ssenchenko

Released in https://github.com/aws/serverless-application-model/releases/tag/v1.55.0 and waiting for doc update

aahung avatar Jan 09 '23 19:01 aahung