-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
aws-stepfunctions-tasks: Add support for ExecutionRoleArn to EmrAddStep #27691
Comments
I'll take this. |
@brandondahler I think the issue here is that's it's not supported by CloudFormation. I recommend opening an issue in cloudformation-coverage-roadmap. |
This issue is for the StepFunctions task, not the aws-emr package/resources (of which there are no L2 constructs available). The StepFunction tasks interoperate with CloudFormation through the Definition property on AWS::StepFunctions::StateMachine, which takes a value in the Amazon State Language. |
@brandondahler ah my bad, ok. Let me wrap up an integration test and see if I can get this working. |
Thank you for the pull request! |
Here is the result of running the step function deployed by the integration test. The step completed successfully with the IAM role. <img width="1616" alt="emr_runtime_role" src="https://github.com/aws/aws-cdk/assets/3310356/f2605195-196c-4d2b-9621-56974265840a"> Closes #27691. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
|
Describe the feature
On October 22, 2022, EMR launched the Runtime Roles feature to allow jobs to execute as a more specific role than the cluster. This additionally opened up the ability to utilize LakeFormation to access data shared to your job's execution role.
This feature added a new, optional parameter named
ExecutionRoleArn
to theAddJobFlowSteps
action. Consequently, the matching StepFunction action ofaddStep
andaddStep.sync
have also added this optional parameter.I'd like to have
EmrAddStep
support this newExecutionRoleArn
field so that I can utilize the Runtime Roles feature on clusters which are managed by a StepFunctions state machine.Use Case
I specifically intend to use this functionality to migrate an existing process to utilize LakeFormation's access delegation instead of having an instance role which has to have full access to the underlying S3 bucket.
Proposed Solution
In order to implement, we only need to add some property to the step's props then pass that value through when rendering the task. There are two reasonable options that I see:
Option 1 - Expose an
executionRoleArn
property as astring
In order to keep the solution as simple as possible and avoid the same issue as #21319, we can simply expose the parameter as an optional string.
executionRole
parameter to theEmrAddStepProps
interface:_renderTask()
to emit the requiredExecutionRoleArn
field when it is provided:Option 2 - Expose
executionRole
as anIRole
andexecutionRoleArn
as astring
In #21319, it appears that we had originally only implemented exposing a
executionRole
asIRole
and only later realized that doesn't work for JsonPath-provided values. If we want to stay consistent with that pattern, we can do the same.executionRole
parameter to theEmrAddStepProps
interface:executionRole
orexecutionRoleArn
are provided:_renderTask()
to emit the requiredExecutionRoleArn
field when it is provided:Other Information
No response
Acknowledgements
CDK version used
2.95.1
Environment details (OS name and version, etc.)
Mac 13.5
The text was updated successfully, but these errors were encountered: