-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sns: Support for ArchivePolicy #29007
Labels
@aws-cdk/aws-sns
Related to Amazon Simple Notification Service
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Comments
badmintoncryer
added
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
labels
Feb 7, 2024
github-actions
bot
added
the
@aws-cdk/aws-sns
Related to Amazon Simple Notification Service
label
Feb 7, 2024
1 task
mergify bot
pushed a commit
that referenced
this issue
Feb 8, 2024
### Issue Closes #29007. ### Reason for this change [In October 2023, it became possible to set a message archive policy for FIFO topics](https://aws.amazon.com/jp/blogs/compute/archiving-and-replaying-messages-with-amazon-sns-fifo/). While this could be configured via CloudFormation (Cfn), it was not possible to do so from the L2 construct. ### Description of changes In this pull request, the "messageRetentionPeriodInDays" parameter has been added to the Topic class, enabling the configuration of the message archive policy. ```ts new Topic(this, 'MyTopic', { fifo: true, // only fifo topic messageRetentionPeriodInDays: 12, // added }); ``` ### Description of how you validated changes I've added unit and integ 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*
|
TheRealAmazonKendra
pushed a commit
that referenced
this issue
Feb 9, 2024
### Issue Closes #29007. ### Reason for this change [In October 2023, it became possible to set a message archive policy for FIFO topics](https://aws.amazon.com/jp/blogs/compute/archiving-and-replaying-messages-with-amazon-sns-fifo/). While this could be configured via CloudFormation (Cfn), it was not possible to do so from the L2 construct. ### Description of changes In this pull request, the "messageRetentionPeriodInDays" parameter has been added to the Topic class, enabling the configuration of the message archive policy. ```ts new Topic(this, 'MyTopic', { fifo: true, // only fifo topic messageRetentionPeriodInDays: 12, // added }); ``` ### Description of how you validated changes I've added unit and integ 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*
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/aws-sns
Related to Amazon Simple Notification Service
feature-request
A feature should be added or improved.
needs-triage
This issue or PR still needs to be triaged.
Describe the feature
Enable setting of ArchivePolicy in the L2 construct for SNS topics.
https://aws.amazon.com/jp/blogs/compute/archiving-and-replaying-messages-with-amazon-sns-fifo/
Use Case
To set the ArchivePolicy, it is necessary to configure it via L1.
https://docs.aws.amazon.com/ja_jp/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html#cfn-sns-topic-archivepolicy
Proposed Solution
ArchivePolicy has an only 'messageRetentionPeriod' parameter. Therefore, it would be sufficient to allow this parameter to be passed as an argument.
Other Information
No response
Acknowledgements
CDK version used
2.123.0
Environment details (OS name and version, etc.)
irrelevant
The text was updated successfully, but these errors were encountered: