serverless-offline-sns
serverless-offline-sns copied to clipboard
Add basic SNS Delivery Policy implementation
Statement
It seems that SNS has a default delivery policy that is not applied in the plugin.
https://github.com/mj1618/serverless-offline-sns/blob/884298b3d25ade67eb636d44c95d6ee2ec63561d/src/sns-server.ts#L248-L260 The catched request is only logged, no other behavior is implemented.
Question
Do you think this behavior deserves to be implemented in it? If so, in what form?
Proposal
I think it would be interesting to keep the current behavior of the plugin and add a custom variable to modify it if necessary.
custom:
serverless-offline-sns:
retry: 3 # default 0
retry-interval: 1000 # In ms, default 0
With a retry
custom attribute set to 3 and retry-interval
set to 1000, we will send again each initial delivery attempt following the rules of the SNS Delivery Policy.
What do you think about it?
I like it - feel free to raise a PR.
Sorry for the delayed response