-
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
AwsCustomResource cannot access resources in other regions #4292
Labels
@aws-cdk/core
Related to core CDK functionality
feature-request
A feature should be added or improved.
in-progress
This issue is being actively worked on.
Comments
jogold
added a commit
to jogold/aws-cdk
that referenced
this issue
Sep 30, 2019
Allow to specify region for AWS API calls. Remove gitignored file `lib/sdk-api-metadata.json`. Closes aws#4292
jogold
added a commit
to jogold/aws-cdk
that referenced
this issue
Sep 30, 2019
Allow to specify region for AWS API calls in `AwsCustomResource` Remove gitignored file `lib/sdk-api-metadata.json`. Closes aws#4292
Hi @konstantinj, thank you for your request. It looks like @jogold is already working on it! Thank you! 👍 |
Also commented on the PR: 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. |
mergify bot
pushed a commit
that referenced
this issue
Oct 3, 2019
* fix(custom-resources): support region for AwsCustomResource Allow to specify region for AWS API calls in `AwsCustomResource` Remove gitignored file `lib/sdk-api-metadata.json`. Closes #4292 * add warning note in region doc
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@aws-cdk/core
Related to core CDK functionality
feature-request
A feature should be added or improved.
in-progress
This issue is being actively worked on.
I've tried using AwsCustomResource to publish to a sns topic in a different region. It fails with the error "Invalid parameter: TopicArn". When I try the same with awscli I get the same error.
It looks like that could be solved by letting the lambda function use the region where the sns topic is located. Unfortunately I see no way of either changing the lambda function on the fly or setting AWS_DEFAULT_REGION as environment variable to it.
It would be great if lambda could "guess" which region to use by analysing the parameters. But being able to provide the proper region would be enough for me.
Reproduction Steps
Create an sns topic in region A and give permission to be accessed by others
Create the custom resource in region B
Environment
The text was updated successfully, but these errors were encountered: