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

[sns] support region property for SqsSubscription #3842

Closed
2 tasks
jcosentino11 opened this issue Aug 28, 2019 · 2 comments · Fixed by #4917
Closed
2 tasks

[sns] support region property for SqsSubscription #3842

jcosentino11 opened this issue Aug 28, 2019 · 2 comments · Fixed by #4917
Assignees
Labels
@aws-cdk/aws-sns Related to Amazon Simple Notification Service feature-request A feature should be added or improved. in-progress This issue is being actively worked on.

Comments

@jcosentino11
Copy link
Member

jcosentino11 commented Aug 28, 2019

🚀 Feature Request

General Information

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

Description

I would like to be able to specify region when creating an SqsSubscription:

new SqsSubscription(queue,
                    SqsSubscriptionProps.builder()
                            .rawMessageDelivery(true)
                            .region("us-east-1")
                            .build());

Currently, I have to work around this via:

new CfnSubscription(this, "my-subscription", CfnSubscriptionProps.builder()
                    .region("us-east-1")
                    .protocol("sqs")
                    .topicArn("arn:aws:sns:us-east-1:123456789:MyTopic")
                    .endpoint("arn:aws:sqs:us-west-2:123456789:QueueInADifferentRegion")
                    .rawMessageDelivery(true)
                    .build());

Proposed Solution

Environment

  • CDK CLI Version: 1.6.0
  • Module Version: 1.6.0
  • OS: Linux Alpine
  • Language: Java

Other information

@jcosentino11 jcosentino11 added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Aug 28, 2019
@NGL321 NGL321 added @aws-cdk/aws-sqs Related to Amazon Simple Queue Service package/cfn Related to the CFN layer (L1) gap and removed needs-triage This issue or PR still needs to be triaged. labels Aug 29, 2019
@NGL321 NGL321 added the language/java Related to Java bindings label Aug 29, 2019
@nija-at nija-at added @aws-cdk/aws-sns Related to Amazon Simple Notification Service and removed package/cfn Related to the CFN layer (L1) language/java Related to Java bindings @aws-cdk/aws-sqs Related to Amazon Simple Queue Service labels Aug 30, 2019
@nija-at
Copy link
Contributor

nija-at commented Oct 21, 2019

CloudFormation does not allow resources to be defined across regions. This will only be available if you're importing either the SQS queue or the SNS topic.

@jcosentino11 - does this match up with your use case?

@nija-at nija-at added the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Oct 21, 2019
@nija-at nija-at changed the title Add CfnSubscription#withRegion equivalent to SubscriptionProps [sns] support region property for SqsSubscription Oct 21, 2019
@jcosentino11
Copy link
Member Author

@nija-at Yep, that matches the use case

@SomayaB SomayaB removed the response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. label Oct 29, 2019
nija-at pushed a commit that referenced this issue Nov 8, 2019
Use the 'region' property on subscribing to imported SNS topics so that
the user can avail cross-region subscriptions.

fixes #3842
@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Nov 8, 2019
nija-at added a commit that referenced this issue Nov 10, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Use the 'region' property on subscribing to imported SNS topics so that
the user can avail cross-region subscriptions.

fixes #3842
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. in-progress This issue is being actively worked on.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants