-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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): topic name with .fifo
suffix generated automatically
#22375
Conversation
There was a problem hiding this 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.
.fifo
suffix generated automatically
In this specific case the PR addresses an implementation detail inside the construct which in turns compensates a roadmap item from CloudFormation. I'm not sure it needs a README change, if it does I'd appreciate some guidance as for where/what to change. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it needs a README change, if it does I'd appreciate some guidance as for where/what to change.
Can you update the section of the readme that talks about fifo topics? Update the example to not pass a name and note that one will be generated for you.
aws-cdk/packages/@aws-cdk/aws-sns/README.md
Lines 22 to 33 in 635129c
Add a FIFO SNS topic with content-based de-duplication to your stack: | |
```ts | |
const topic = new sns.Topic(this, 'Topic', { | |
contentBasedDeduplication: true, | |
displayName: 'Customer subscription topic', | |
fifo: true, | |
topicName: 'customerTopic', | |
}); | |
``` | |
Note that FIFO topics require a topic name to be provided. The required `.fifo` suffix will be automatically added to the topic name if it is not explicitly provided. |
✅ Updated pull request passes all PRLinter validations. Dissmissing previous PRLinter review.
Done in the latest commit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dreamorosi!
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 CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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). |
This PR adds logic for automatic generation of FIFO topics.
When customers don't pass a
topicName
during creation, the construct now generates an unique name that respects the maximum length allowed by the CloudFormation resource (256) and that ends with the.fifo
suffix.The previous behavior was to throw an error when the topic was of type FIFO and no name was passed.
Fixes ##18740
All Submissions:
Adding new Unconventional Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license