batch: Cannot omit the start/end of target node on batch.MultiNodeContainer #29415
Labels
@aws-cdk/aws-batch
Related to AWS Batch
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the feature
When using CDK to deploy aws batch multi-node jobs, we have to specify both the start_node and end_node, FYI: https://docs.aws.amazon.com/cdk/api/v2/python/aws_cdk.aws_batch/MultiNodeContainer.html#aws_cdk.aws_batch.MultiNodeContainer. But refer to the https://docs.aws.amazon.com/batch/latest/APIReference/API_NodeRangeProperty.html#API_NodeRangeProperty_Contents, it is possible to omit start_node/end_node here.
Use Case
Our use case is as following: after I deploy the aws batch cloud infrastructure, I can use boto3 with python to submit a job like:
Currently It will throw error like:
This is because in CDK we have to specify the start_node and end_node. But if we support to omit the end_node in CDK, we can avoid this problem. And this is valid according to the aws batch multi-node job definition. Currently the only work around is to create another job_definition based on what we deploy and modify the target node in the batch console.
Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.131.0
Environment details (OS name and version, etc.)
Amazon Linux 2
The text was updated successfully, but these errors were encountered: