The SNS FIFO topics are failing to deploy because the topic name is missing .fifo at the end.
Reproduction Steps
Create a minimal cdk app with the following SNS FIFO topic and deploy it:
import * as sns from "@aws-cdk/aws-sns";
import * as cdk from "@aws-cdk/core";
class MyStack extends cdk.Stack {
constructor(scope: cdk.Construct, id: string, properties?: cdk.StackProps) {
super(scope, id, properties);
new sns.Topic(this, "MyTopic", {
fifo: true,
});
}
}
const app = new cdk.App();
new MyStack(app, "MyStack");
What did you expect to happen?
The SNS topic should append .fifo to the topic name if topic: true and .fifo is not present already.
What actually happened?
The deploy failed:
9:48:48 PM | CREATE_FAILED | AWS::SNS::Topic | FanOutTopic
Invalid parameter: Topic Name (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: xxxxx-xxxx-xxxx-xxxxx; Proxy: null)
Environment
- CDK CLI Version : v1.83.0
- Framework Version: v1.83.0
- Node.js Version: v12.20.0
- OS : Ubuntu 20
- Language (Version): TypeScript (4.1)
Other
It works if you manually set the topicName to include .fifo at the end, like this:
new sns.Topic(this, "MyTopic", {
fifo: true,
topicName: "MyTopic.fifo",
});
This is 🐛 Bug Report
The SNS FIFO topics are failing to deploy because the topic name is missing
.fifoat the end.Reproduction Steps
Create a minimal cdk app with the following SNS FIFO topic and deploy it:
What did you expect to happen?
The SNS topic should append
.fifoto the topic name iftopic: trueand.fifois not present already.What actually happened?
The deploy failed:
Environment
Other
It works if you manually set the topicName to include
.fifoat the end, like this:This is 🐛 Bug Report