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(stepfunctions): make grants work when state machines are imported from other accounts or regions #18737

Closed

Conversation

flavioleggio
Copy link
Contributor

This pull request fixes a bug in the process of composing executions' arn when grantRead() and grantExecution() methods are called on a IStateMachine construct.

This bug assigned a wrong arn to resources referenced in the IAM policy when the IStateMachine was imported from a different account or region than the current stack.

The private executionArn() method now uses all arn components of the IStateMachine to build the arn string, rather than leaving account and region components to the default values.

Fixes #17982


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

@gitpod-io
Copy link

gitpod-io bot commented Jan 29, 2022

@github-actions github-actions bot added the @aws-cdk/aws-stepfunctions Related to AWS StepFunctions label Jan 29, 2022
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject89A8053A-LhjRyN9kxr8o
  • Commit ID: e97f28e
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@kaizencc
Copy link
Contributor

Hi @flavioleggio, I think the bug is a lot simpler than this change. See #19026 for my idea.

@kaizencc kaizencc removed their assignment Feb 17, 2022
@flavioleggio
Copy link
Contributor Author

Hello @kaizen3031593, if your PR solves the issue, I think we can close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-stepfunctions Related to AWS StepFunctions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(aws-stepfunctions): cross-region grantRead not working
3 participants