(aws-stepfunctions): cross-region grantRead not working #17982
Labels
@aws-cdk/aws-stepfunctions
Related to AWS StepFunctions
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p1
What is the problem?
When working with a stack in one region and giving it read access to a state machine on another region the policy statement regarding execution points to executions in the wrong region.
Reproduction Steps
Create a basic stack with a role and a step function (step function must be in an other region than the environment)
and
What did you expect to happen?
synth
should produce the following policy:The second action statement points to executions in
eu-central-1
What actually happened?
Instead the following policy is created:
The second action statement points to executions in
us-east-1
CDK CLI Version
1.134.0 (build dd5e12d)
Framework Version
No response
Node.js Version
v14.16.1
OS
Mac OS Monterey 12.0.1
Language
Python
Language Version
3.9.7
Other information
We fixed it in our stack by re-implementing
grant_read
, more specifically by changing how the execution arn is created. The functionexecutionArn
(link) does not specify the region so the stack's region is used instead, hence the discrepancy. Replacing this function by something like this worked for us:I can propose a PR with a fix and some tests if needed
The text was updated successfully, but these errors were encountered: