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
Activity
quaeler commentedon Feb 16, 2022
Console kvetch — in this case, the vCPU request of 16 matched the job default, but had it not, it would have the same warning text (substituting vCPU as the structure attribute name) as the memory.

fix(stepfunctions-tasks): migrate from deprecated batch properties (#…
github-actions commentedon Mar 11, 2022
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.