Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

stepfunctions-tasks: emr-create-cluster - add support for AutoTerminationPolicy.IdleTimeout #29926

Closed
2 tasks
Labels
@aws-cdk/aws-emr Related to Amazon EMR @aws-cdk/aws-stepfunctions-tasks effort/medium Medium work item – several days of effort feature-request A feature should be added or improved. p3

Comments

@valentinlagunes
Copy link

valentinlagunes commented Apr 22, 2024

Describe the feature

This feature currently exists in the SDK RunJobFlow EMR API for creating EMR clusters.

"AutoTerminationPolicy: { "IdleTimeout": number }

This feature will terminate the cluster if it has been idle for a specified number of seconds.
Right now the CDK emrCreateCluster step function task is missing this option, but I believe it is possible to do if the entire step function is written in ASL JSON. There is a similar missing parameter issue for the ManagedScalingPolicy parameter as well.

Use Case

This feature is very useful for terminating clusters when no job has run in a while. Many times, I'll forget to terminate a cluster and this will cause a large bill. The auto termination policy helps prevent that. It is also useful for keeping a cluster available for a while if another job might be submitted later, instead of terminating it immediately and then having to create a new one. It also helps simplify my state machines by not having to add a terminateCluster step.

Proposed Solution

Add to the emrCreateCluster cdk construct. One workaround is by using ASL JSON directly with DefinitionBody.fromString.

Other Information

Related Issue (Missing ManagedScalingPolicy)

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

CDK version used

2.138.0

Environment details (OS name and version, etc.)

MacOS

@valentinlagunes valentinlagunes added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Apr 22, 2024
@github-actions github-actions bot added the @aws-cdk/aws-emr Related to Amazon EMR label Apr 22, 2024
@valentinlagunes valentinlagunes changed the title emr-create-cluster: add support for AutoTerminationPolicy.IdleTimeout stepfunctions-tasks: emr-create-cluster - add support for AutoTerminationPolicy.IdleTimeout Apr 22, 2024
@nmussy
Copy link
Contributor

nmussy commented Apr 23, 2024

Corresponding CloudFormation property: EMR::Cluster AutoTerminationPolicy

@pahud
Copy link
Contributor

pahud commented Apr 23, 2024

@nmussy I was just about to check that. Thank you!

@valentinlagunes Yes we should support that if CFN has the relevant property. Are you interested to submit a PR for that?

You can reach out to me on cdk.dev slack if you need me to help you get started.

Cheers!

@pahud pahud added p2 effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Apr 23, 2024
@avvemul
Copy link

avvemul commented Apr 30, 2024

+1

@jacob-wahbeh
Copy link

+1

@pahud pahud added p3 and removed p2 labels Jun 11, 2024
@jeffsteinmetz
Copy link

+1 (and specifically for the Python CDK)

Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

1 similar comment
Copy link

Comments on closed issues and PRs are hard for our team to see.
If you need help, please open a new issue that references this one.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.