SQS subscription to cross-region SNS topic not working via addSubscription
See original GitHub issueWhen I try to subscribe an SQS queue in one account to an SNS topic in another account and another region using topic.addSubscription()
, I get error “Invalid parameter: TopicArn.” This works when adding a subscription to a the same account/region or a different account but same region. But it fails when subscribing to a different account and region:
topicInRegionA.addSubscription(new SqsSubscription(queueInRegionB));
I thought this was supposed to be fixed by #3842?
Reproduction Steps
- Try to subscribe an SQS queue to a topic in another region using
addSubscription()
Error Log
1/13 | 5:11:07 PM | CREATE_FAILED | AWS::SNS::Subscription | MyQueue/MyServicealphauswest2MyTopic915AE08F (MyQueueMyServicealphauswest2MyTopic915AE08F58613436) Invalid parameter: TopicArn (Service: AmazonSNS; Status Code: 400; Error Code: InvalidParameter; Request ID: ...)
new Subscription (...CDK/node_modules/@aws-cdk/aws-sns/lib/subscription.js:29:9)
\_ Topic.addSubscription (...CDK/node_modules/@aws-cdk/aws-sns/lib/topic-base.js:23:9)
\_ AppStack.bindCustomComponents (...CDK/dist/lib/custom/app-stack.js:48:43)
\_ Object.<anonymous> (...CDK/dist/lib/app.js:66:18)
...
Environment
- CLI Version : 1.30.0 (build 4f54ff7)
- OS : Red Hat variant
- Language : TypeScript
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:6 (1 by maintainers)
Top Results From Across the Web
Sending Amazon SNS messages to an Amazon SQS queue ...
Amazon SNS supports the cross-region delivery of notifications to Amazon SQS queues and to AWS Lambda functions. When one of the Regions is...
Read more >Cross Account AWS SNS to SQS Subscription Tutorial
It's common to want to subscribe an SQS queue to an SNS topic in another AWS account. Unfortunately, the steps to follow are...
Read more >AWS Cross Account SNS to SQS Subscription - Setup Guide
In this method, the SNS Topic owner subscribes the SQS Queue consumer. This is possible either through the AWS CLI, CDK, CloudFormation, or...
Read more >Four AWS CLI Commands to Set Up a Cross-Region/Account ...
First, create the Amazon SNS topic: · Next, give permission to subscribe to the topic: · Third, add the Lambda permission to allow...
Read more >aws.sns.TopicSubscription - Pulumi
TopicSubscription uses a provider with a different region than the SNS topic, this provider will fail to create the subscription. NOTE: Setup of...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is still an issue.
Steps to reproduce:
This is the CDK code I’m using:
⚠️COMMENT VISIBILITY WARNING⚠️
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.