serverless-application-model
serverless-application-model copied to clipboard
Support DLQ for SNS subscriptions
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
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 any update on this?
RedrivePolicy seams to be supported now
Crossed out my comment that it's not supported in CloudFormation, it looks like we can go forward with this feature.
Re-openning till we change the docs
Released in https://github.com/aws/serverless-application-model/releases/tag/v1.55.0 and waiting for doc update