(aws-batch): Most JobDefinition.ContainerProperties.LinuxParameters are not rendered
See original GitHub issueJobDefinition.buildJobContainer()
explicitly only renders devices
from container.linuxParams
, omitting all other parameters.
The implementation for JobDefinition
makes it seem like this is intentional.
Reproduction Steps
new JobDefinition(this, 'jobDef', {
container: {
linuxParams: new LinuxParameters(this, 'linuxParams', {
sharedMemorySize: 24_000,
}),
...
},
jobDefinitionName: 'test',
})
What did you expect to happen?
The rendered stack should contain:
"LinuxParameters": {
"SharedMemorySize": 24000
},
What actually happened?
No parameters are rendered:
"LinuxParameters": {},
Environment
- CDK CLI Version: 1.89.0
- Framework Version: 1.89.0
- Node.js Version: v12.20.2
- OS : MacOS 11.2.1
- Language (Version): Typescript 4.1.5
Other
Here’s the relevant code in job-definition.js
:
buildJobContainer(container) {
if (container === undefined) {
return undefined;
}
return {
...
linuxParameters: container.linuxParams
? { devices: container.linuxParams.renderLinuxParameters().devices }
: undefined,
...
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:33 (25 by maintainers)
Top Results From Across the Web
Batch::JobDefinition LinuxParameters - AWS CloudFormation
You can use this parameter to tune a container's memory swappiness behavior. A swappiness value of 0 causes swapping to not occur unless...
Read more >awsbatch - Go Packages
AWS Batch is a batch processing tool for efficiently running hundreds of thousands ... If you pass CDK classes or structs, they will...
Read more >AWS::Batch::JobDefinition ContainerProperties - 亚马逊云科技
Container properties are used for Amazon ECS based job definitions. ... String InstanceType: String JobRoleArn: String LinuxParameters: LinuxParameters ...
Read more >Registering the job definition - Amazon EC2 Spot Workshops
With AWS Batch multi-node you can run large-scale, tightly coupled, high performance computing applications. Note multi-node jobs are not supported with Spot ...
Read more >Tag Archives: AWS Batch - Noise
AWS Batch for Amazon EKS is ideal for customers who no longer want to ... This process is repeated, scaling as needed across...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yep, so I can confirm that I will try switching over to the ECS construct for Linux Params.
However, they are missing some newer params that are now supported (i.e. Swappiness). So I’ll look into adding these along with the change.
So - I can see that at the time of creation, this was built to support only devices and no other linux parameters. However, it should be an easy fix to have this extended. I will give it a shot 👌
https://docs.aws.amazon.com/batch/latest/APIReference/API_LinuxParameters.html