[stepfunctions-tasks] Wrong ARN of emr iam policy getting attached in iam role #11503
Labels
@aws-cdk/aws-stepfunctions-tasks
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
good first issue
Related to contributions. See CONTRIBUTING.md
in-progress
This issue is being actively worked on.
p1
while trying to create step functions using CDK, We pass an iam-role to be used for step function execution.
CDK by default is attaching some policies to the iam role.
In one of the policy statement of the default policy. The partition in the ARN seems to be hard coded to 'aws' which brings the problem that stack deployment fails when a given stack is deployed to any region other than classic. eg- in ZHY
The resultant json in template file which tells the Partition in resultant ARN is hard coded-
Reproduction Steps
potential bug location-
The partition in ARN here is not getting picked dynamically.
https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-stepfunctions-tasks/lib/emr/emr-cancel-step.ts#L39
What did you expect to happen?
Ideally the partition should have been picked dynamically like- ${Aws.PARTITION} so that when stack is getting deployed in regions like ZHY, the arn will have the partition "aws-cn" and not "aws".
What actually happened?
the error logs-
The partition ideally should have been here "aws-cn".
Environment
Other
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: