-
Notifications
You must be signed in to change notification settings - Fork 4k
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
fix(custom-resources): support region for AwsCustomResource #4298
Conversation
Allow to specify region for AWS API calls in `AwsCustomResource` Remove gitignored file `lib/sdk-api-metadata.json`. Closes aws#4292
Thanks so much for taking the time to contribute to the AWS CDK ❤️ We will shortly assign someone to review this pull request and help get it
|
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
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 am not sure this is a good idea. What is the use case exactly? It's generally considered an anti-pattern to perform cross region operations. If users wish to invoke APIs in a region, they can just create a CFN stack in that region.
@eladb I'm trying to send messages to a shared sns topic in our main account. Idea is that all subaccounts can send there from all regions. We have several subscriptions in the main account in one region which is our central hub basically. Alternative would be to have from thios one region subscriptions to many sns topics in different region. But I guess that would be the exact same problem. I'm already querying other region endpoints in many of my lambda functions e.g. for peering connections I need this since I need to assume a role from another account to accept it. Actually I would like to do the peerings also in a custom resource so I can also accept the connections right away and be able to make connections to many other accounts/regions. |
@eladb I understand the request to be able to publish to a topic in another region and I can imagine use cases for this Your call... if you don't want to support this I'll refactor this PR to only include the additional test on |
I don't have dire objections... Maybe we can just add some warnings in the documentation of this property and explain to people that this can have implications on their blast radius... |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Thank you for contributing! Your pull request is now being automatically merged. |
Allow to specify region for AWS API calls in
AwsCustomResource
Remove gitignored file
lib/sdk-api-metadata.json
.Closes #4292
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license