aws-stepfunctions-tasks: EmrContainersStartJobRun could not use Role from SF input #21319
Labels
@aws-cdk/aws-stepfunctions-tasks
effort/small
Small work item – less than a day of effort
feature-request
A feature should be added or improved.
p2
Describe the feature
EmrContainersStartJobRunProps support readonly executionRole?: iam.IRole;
I was wondering if EmrContainersStartJobRunProps can accept optional executionRoleArn and use it if executionRole not provided. The reason for this request is a limitation in Role.fromRoleArn()
In the Role documentation for fromRoleArn()
https://docs.aws.amazon.com/cdk/api/v1/docs/@aws-cdk_aws-iam.Role.html#static-fromwbrrolewbrnamescope-id-rolename
I tried different options but all of them failed during build/deployment. I was able to make it work using CustomState.
Without this feature it is not possible to use EmrContainersStartJobRun with roles extracted from StepFunction input.
Use Case
This is needed because "cdk deploy" throws an error when Role must be picked from SF input:
Code snippet and error message provided under "Other Information"
Proposed Solution
In order to handle Arn from JSON Input I suggest to add extra property to EmrContainersStartJobRunProps:
Other Information
Code:
This throws an error during "cdk deploy":
Acknowledgements
CDK version used
2.14.0
Environment details (OS name and version, etc.)
macOS Big Sur 11.6.6
The text was updated successfully, but these errors were encountered: