This is the new AWS CloudFormation Template Reference Guide. Please update your bookmarks and links. For help getting started with CloudFormation, see the AWS CloudFormation User Guide.
AWS::Batch::JobDefinition EksContainer
EKS container properties are used in job definitions for Amazon EKS based job definitions to describe the properties for a container node in the pod that's launched as part of a job. This can't be specified for Amazon ECS based job definitions.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Args" :[ String, ... ], "Command" :[ String, ... ], "Env" :[ EksContainerEnvironmentVariable, ... ], "Image" :String, "ImagePullPolicy" :String, "Name" :String, "Resources" :EksContainerResourceRequirements, "SecurityContext" :EksContainerSecurityContext, "VolumeMounts" :[ EksContainerVolumeMount, ... ]}
YAML
Args:- StringCommand:- StringEnv:- EksContainerEnvironmentVariableImage:StringImagePullPolicy:StringName:StringResources:EksContainerResourceRequirementsSecurityContext:EksContainerSecurityContextVolumeMounts:- EksContainerVolumeMount
Properties
- Args
- 
                    An array of arguments to the entrypoint. If this isn't specified, the CMDof the container image is used. This corresponds to theargsmember in the Entrypointportion of the Pod in Kubernetes. Environment variable references are expanded using the container's environment. If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to " $(NAME1)" and theNAME1environment variable doesn't exist, the command string will remain "$(NAME1)."$$is replaced with$, and the resulting string isn't expanded. For example,$$(VAR_NAME)is passed as$(VAR_NAME)whether or not theVAR_NAMEenvironment variable exists. For more information, see Dockerfile reference: CMDand Define a command and arguments for a pod in the Kubernetes documentation. Required: No Type: Array of String Update requires: No interruption 
- Command
- 
                    The entrypoint for the container. This isn't run within a shell. If this isn't specified, the ENTRYPOINTof the container image is used. Environment variable references are expanded using the container's environment.If the referenced environment variable doesn't exist, the reference in the command isn't changed. For example, if the reference is to " $(NAME1)" and theNAME1environment variable doesn't exist, the command string will remain "$(NAME1)."$$is replaced with$and the resulting string isn't expanded. For example,$$(VAR_NAME)will be passed as$(VAR_NAME)whether or not theVAR_NAMEenvironment variable exists. The entrypoint can't be updated. For more information, see ENTRYPOINTin the Dockerfile reference and Define a command and arguments for a container and Entrypoint in the Kubernetes documentation. Required: No Type: Array of String Update requires: No interruption 
- Env
- 
                    The environment variables to pass to a container. NoteEnvironment variables cannot start with " AWS_BATCH". This naming convention is reserved for variables that AWS Batch sets.Required: No Type: Array of EksContainerEnvironmentVariable Update requires: No interruption 
- Image
- 
                    The Docker image used to start the container. Required: Yes Type: String Update requires: No interruption 
- ImagePullPolicy
- 
                    The image pull policy for the container. Supported values are Always,IfNotPresent, andNever. This parameter defaults toIfNotPresent. However, if the:latesttag is specified, it defaults toAlways. For more information, see Updating imagesin the Kubernetes documentation. Required: No Type: String Update requires: No interruption 
- Name
- 
                    The name of the container. If the name isn't specified, the default name " Default" is used. Each container in a pod must have a unique name.Required: No Type: String Update requires: No interruption 
- Resources
- 
                    The type and amount of resources to assign to a container. The supported resources include memory,cpu, andnvidia.com/gpu. For more information, see Resource management for pods and containersin the Kubernetes documentation. Required: No Type: EksContainerResourceRequirements Update requires: No interruption 
- SecurityContext
- 
                    The security context for a job. For more information, see Configure a security context for a pod or container in the Kubernetes documentation. Required: No Type: EksContainerSecurityContext Update requires: No interruption 
- VolumeMounts
- 
                    The volume mounts for the container. AWS Batch supports emptyDir,hostPath, andsecretvolume types. For more information about volumes and volume mounts in Kubernetes, see Volumesin the Kubernetes documentation. Required: No Type: Array of EksContainerVolumeMount Update requires: No interruption