Skip to content
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

feat(sns): message archive policy #29008

Merged
merged 6 commits into from Feb 8, 2024
Merged

Conversation

badmintoncryer
Copy link
Contributor

@badmintoncryer badmintoncryer commented Feb 7, 2024

Issue

Closes #29007.

Reason for this change

In October 2023, it became possible to set a message archive policy for FIFO topics.

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.

    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

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@github-actions github-actions bot added feature-request A feature should be added or improved. p2 star-contributor [Pilot] contributed between 25-49 PRs to the CDK labels Feb 7, 2024
@aws-cdk-automation aws-cdk-automation requested a review from a team February 7, 2024 07:59
Copy link
Collaborator

@aws-cdk-automation aws-cdk-automation left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pull request linter has failed. See the aws-cdk-automation comment below for failure reasons. If you believe this pull request should receive an exemption, please comment and provide a justification.

A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed add Clarification Request to a comment.

@aws-cdk-automation aws-cdk-automation dismissed their stale review February 7, 2024 09:02

✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.

@badmintoncryer badmintoncryer marked this pull request as ready for review February 7, 2024 13:10
@aws-cdk-automation aws-cdk-automation added the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 7, 2024
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for contributing

Copy link
Contributor

mergify bot commented Feb 8, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@aws-cdk-automation aws-cdk-automation removed the pr/needs-community-review This PR needs a review from a Trusted Community Member or Core Team Member. label Feb 8, 2024
@badmintoncryer
Copy link
Contributor Author

@mergify update

Copy link
Contributor

mergify bot commented Feb 8, 2024

update

✅ Branch has been successfully updated

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildv2Project1C6BFA3F-wQm2hXv2jqQv
  • Commit ID: 8014db6
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Copy link
Contributor

mergify bot commented Feb 8, 2024

Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 9782f6b into aws:main Feb 8, 2024
9 checks passed
@badmintoncryer badmintoncryer deleted the archivePolicy branch February 8, 2024 16:35
TheRealAmazonKendra pushed a commit that referenced this pull request 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
feature-request A feature should be added or improved. p2 star-contributor [Pilot] contributed between 25-49 PRs to the CDK
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sns: Support for ArchivePolicy
3 participants