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

fix(custom-resources): support region for AwsCustomResource #4298

Merged
merged 3 commits into from
Oct 3, 2019

Conversation

jogold
Copy link
Contributor

@jogold jogold commented Sep 30, 2019

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

Allow to specify region for AWS API calls in `AwsCustomResource`

Remove gitignored file `lib/sdk-api-metadata.json`.

Closes aws#4292
@jogold jogold requested a review from eladb as a code owner September 30, 2019 16:33
@mergify
Copy link
Contributor

mergify bot commented Sep 30, 2019

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
merged. In the meantime, please take a minute to make sure you follow this
checklist
:

  • PR title type(scope): text
    • type: fix, feat, refactor go into CHANGELOG, chore is hidden
    • scope: name of module without aws- or cdk- prefix or postfix (e.g. s3 instead of aws-s3-deployment)
    • text: use all lower-case, do not end with a period, do not include issue refs
  • PR Description
    • Rationale: describe rationale of change and approach taken
    • Issues: indicate issues fixed via: fixes #xxx or closes #xxx
    • Breaking?: last paragraph: BREAKING CHANGE: <describe what changed + link for details>
  • Testing
    • Unit test added. Prefer to add a new test rather than modify existing tests
    • CLI or init templates change? Re-run/add CLI integration tests
  • Documentation
    • README: update module README to describe new features
    • API docs: public APIs must be documented. Copy from official AWS docs when possible
    • Design: for significant features, follow design process

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@nija-at nija-at assigned eladb and unassigned nija-at Oct 1, 2019
eladb
eladb previously requested changes Oct 2, 2019
Copy link
Contributor

@eladb eladb left a 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.

@konstantinj
Copy link

@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.

@konstantinj
Copy link

in #1796 @rix0rrr says "writing a Custom Resource to do a cross-region call". So I guess to be able to do this, this PR is needed.

@jogold
Copy link
Contributor Author

jogold commented Oct 2, 2019

@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 apiVersion.

@eladb
Copy link
Contributor

eladb commented Oct 2, 2019

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...

@mergify mergify bot dismissed eladb’s stale review October 3, 2019 08:18

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify
Copy link
Contributor

mergify bot commented Oct 3, 2019

Thank you for contributing! Your pull request is now being automatically merged.

@mergify mergify bot merged commit 934d36f into aws:master Oct 3, 2019
@jogold jogold deleted the aws-custom-resource-region branch October 24, 2019 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AwsCustomResource cannot access resources in other regions
5 participants