Skip to content

Commit

Permalink
feat(sns): add delivery policy to sns subscriptions (#30830)
Browse files Browse the repository at this point in the history
### Issue # (if applicable)

Closes #17576.

### Reason for this change

To allow setting of delivery policy for appropriate sns subscriptions.

### Description of changes



Subscriptions can now take a new parameter `deliveryPolicy` which consists of a `healthyRetryPolicy`, a `throttlePolicy`, and a `requestPolicy` (each having the same parameters described here: https://docs.aws.amazon.com/sns/latest/dg/sns-message-delivery-retries.html#creating-delivery-policy).

### Description of how you validated changes

New integration test along with unit tests.



### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
LaurenceWarne authored Nov 20, 2024
1 parent be33610 commit 27babe6
Show file tree
Hide file tree
Showing 15 changed files with 1,031 additions and 0 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"Resources": {
"MyTopic86869434": {
"Type": "AWS::SNS::Topic"
},
"MyTopichttpsfoobarcomDEA92AB5": {
"Type": "AWS::SNS::Subscription",
"Properties": {
"DeliveryPolicy": {
"healthyRetryPolicy": {
"minDelayTarget": 20,
"maxDelayTarget": 21,
"numRetries": 10
},
"throttlePolicy": {
"maxReceivesPerSecond": 10
},
"requestPolicy": {
"headerContentType": "application/json"
}
},
"Endpoint": "https://foobar.com/",
"Protocol": "https",
"TopicArn": {
"Ref": "MyTopic86869434"
}
}
}
},
"Parameters": {
"BootstrapVersion": {
"Type": "AWS::SSM::Parameter::Value<String>",
"Default": "/cdk-bootstrap/hnb659fds/version",
"Description": "Version of the CDK Bootstrap resources in this environment, automatically retrieved from SSM Parameter Store. [cdk:skip]"
}
},
"Rules": {
"CheckBootstrapVersion": {
"Assertions": [
{
"Assert": {
"Fn::Not": [
{
"Fn::Contains": [
[
"1",
"2",
"3",
"4",
"5"
],
{
"Ref": "BootstrapVersion"
}
]
}
]
},
"AssertDescription": "CDK bootstrap stack version 6 required. Please run 'cdk bootstrap' with a recent version of the CDK CLI."
}
]
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 27babe6

Please sign in to comment.