feat: emr instance fleet priority allocation#35731
feat: emr instance fleet priority allocation#35731
Conversation
… strategy - Add PRIORITIZED option to OnDemandAllocationStrategy enum - Add optional priority field to InstanceTypeConfigProperty interface - Update JSON conversion to include priority in CloudFormation output - Add comprehensive unit and integration tests Enables users to specify instance type priorities for EMR instance fleets when using the prioritized allocation strategy, aligning CDK with AWS EMR API.
|
This PR has been in the CHANGES REQUESTED state for 3 weeks, and looks abandoned. Note that PRs with failing linting check or builds are not reviewed, please ensure your build is passing To prevent automatic closure:
This PR will automatically close in 14 days if no action is taken. |
…te cluster with prioritized instance fleet - Add integration test snapshot for integ.emr-create-cluster-with-prioritized-instance-fleet - Generated CloudFormation templates and test assets - Validates EMR cluster creation with prioritized instance fleet configuration
✅ Updated pull request passes all PRLinter validations. Dismissing previous PRLinter review.
|
This PR is now in the needs-community-review queue. Once it receives an approving community review, it will move to the needs-maintainer-review stage for final approval. Feel free to continue improve this PR when necessary. Make sure CI passes with no conflicts after each commit. Thank you. |
|
What I like: Minor nits (non-blocking): Suggestion for consideration: Overall this looks good to me. Approving for community review. 👍 |
… EMR InstanceTypeConfig API reference for discoverability. Co-authored-by: Vishaal Mehrishi <mehrishi@amazon.nl>
Pull request has been modified.
Add CDK-level validations per reviewer feedback: - Validate priority is non-negative in InstanceTypeConfigPropertyToJson - Validate priority values are only used with PRIORITIZED allocation strategy - Update PRIORITIZED enum JSDoc to document priority requirement Co-authored-by: Vishaal Mehrishi <mehrishi@amazon.nl>
Issue # (if applicable)
Closes #35710
Reason for this change
The CDK's OnDemandAllocationStrategy enum only includes
LOWEST_PRICE, but AWS EMR supports a prioritized allocation strategy that allows users to specify instance type priorities. This enhancement aligns the CDK with the full EMR API capabilities.Description of changes
PRIORITIZED = 'prioritized'to theOnDemandAllocationStrategyenumpriority?: numberfield toInstanceTypeConfigPropertyDescribe any new or updated permissions being added
No new IAM permissions are required. This change only extends existing EMR cluster creation functionality with additional configuration options.
Description of how you validated changes
• Unit tests: Added 3 tests covering enum values, priority field functionality, and CloudFormation output validation
• Integration test: Created end-to-end test with realistic EMR cluster configuration using prioritized allocation strategy
• Manual validation: Verified CloudFormation templates generate correctly with AllocationStrategy: "prioritized" and Priority: N fields
• Backward compatibility: Confirmed existing tests continue to pass without modification
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license