-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
What is the problem?
A BatchSubmitJob task allows configuration via an instance of BatchSubmitJobProps, which itself allows configuration overrides on the running container via an instance of BatchContainerOverrides.
Unfortunately, AWS Batch's submit job has deprecated the containerOverrides structure and now ignores it in favor of the defaults specified in the JobDefinition.
Neither the current V1 nor V2 CDK expose this new structure, nor does the CDK synthesis translate the old container overrides structure into the new structure.
Reproduction Steps
This can not plausibly be an SSCCE, but the batch submit job definition does look like, for example:
const aTask = new tasks.BatchSubmitJob(this, 'Run a task', {
jobDefinitionArn: jobArn,
jobName: 'jobName',
jobQueueArn: jobQueueArn,
containerOverrides: {
vcpus: 16,
memory: 32678
},
resultPath: '$.Result'
});
What did you expect to happen?
That, if the hypothetical job definition specifies a vCPU of 2, and a memory of 4,096, that the reproduction example would start a container with a vCPU of 16. and a memory of 32,768
What actually happened?
I will attach a screen shot of what the console shows in this situation, but in the continued hypothetical case, the container is launched with the job definition's default of a vCPU of 2 and memory of 4,096.
CDK CLI Version
1.116.0
Framework Version
No response
Node.js Version
14.18.0
OS
macOS 11.6.3
Language
Typescript
Language Version
3.8.3
Other information
No response