| container-definition list subresource |
A list of container definitions that describes the different containers that make up the task. (Required) (Required)
- name
- The name of the container. Must be a string 1 to 255 characters long containing letters, numbers, and hyphens. Valid values satisfy the regex:
[[-a-zA-Z0-9]{1,255}]. (Required)
- image
- The image used to start a container. This string is passed directly to the Docker daemon. (Required)
- cpu
- The number of cpu units reserved for the container.
- memory
The amount (in MiB) of memory to present to the container. If your container attempts to exceed the memory specified here, the container is killed.
The total amount of memory reserved for all containers within a task must be lower than the task memory value, if one is specified.
If a task-level memory value is not specified, you must specify a non-zero integer for one or both of memory or memory-reservation in a container definition. If you specify both, memory must be greater than memory-reservation. Minimum allowed value is 4.
- memory-reservation
The soft limit (in MiB) of memory to reserve for the container. When system memory is under heavy contention, Docker attempts to keep the container memory to this soft limit. However, the container can consume more memory when it needs to, up to either the hard limit specified with the memory parameter (if applicable), or all of the available memory on the container instance, whichever comes first.
If a task-level memory value is not specified, you must specify a non-zero integer for one or both of memory or memory-reservation in a container definition. If you specify both, memory must be greater than memory-reservation. Minimum allowed value is 4.
- links list
Allows containers to communicate with each other without the need for any port-mapping.
This parameter is only supported if the network-mode of a task definition is bridge.
- port-mapping list subresource
The list of port mappings for the container. Port mappings allow containers to access ports on the host container instance to send or receive traffic.
- container-port
- The port number on the container that is bound to the user-specified or automatically assigned
host-port. (Required)
- host-port
The port number on the container instance to reserve for your container.
If you are using containers in a task with the awsvpc or host network-mode, the host-port can either be left blank or set to the same value as the container-port.
If you are using containers in a task with the bridge network-mode, you can specify a non-reserved host-port for your container port mapping, or you can omit the host-port (or set it to 0) while specifying a container-port and your container automatically receives a port in the ephemeral port range for your container instance operating system and Docker version.
- protocol
- The protocol used for the port mapping. Defaults to
tcp. Valid values are tcp or udp.
- essential
If this parameter is set to true, and the container fails or stops for any reason, all other containers that are part of the task are stopped.
Defaults to true.
- entry-point list
- The entry point that is passed to the container.
- command list
- The command that is passed to the container. If there are multiple arguments, each argument should be a separate string in the list.
- environment map
- The environment variables to pass to a container.
- mount-point list subresource
The mount points for data volumes in your container.
- source-volume
The name of the volume to mount.
Must be the name of a task definition volume. (Required)
- container-path
- The path on the container at which to mount the host volume. (Required)
- read-only
If enabled, the container has read-only access to the volume. Otherwise, the container can write to the volume.
Defaults to false.
- volume-from list subresource
Data volumes to mount from another container.
- source-container
- The
name of another container within the same task definition from which to mount volumes. (Required)
- read-only
If true, the container has read-only access to the volume. Otherwise, the container can write to the volume.
Defaults to false.
- linux-parameters subresource
Linux-specific modifications that are applied to the container, such as Linux kernel capabilities.
- capabilities subresource
The Linux capabilities for the container that are added to or dropped from the default configuration provided by Docker.
- add list
- The Linux capabilities for the container that have been added to the default configuration provided by Docker. Valid values are
ALL, AUDIT_CONTROL, AUDIT_WRITE, BLOCK_SUSPEND, CHOWN, DAC_OVERRIDE, DAC_READ_SEARCH, FOWNER, FSETID, IPC_LOCK, IPC_OWNER, KILL, LEASE, LINUX_IMMUTABLE, MAC_ADMIN, MAC_OVERRIDE, MKNOD, NET_ADMIN, NET_BIND_SERVICE, NET_BROADCAST, NET_RAW, SETFCAP, SETGID, SETPCAP, SETUID, SYS_ADMIN, SYS_BOOT, SYS_CHROOT, SYS_MODULE, SYS_NICE, SYS_PACCT, SYS_PTRACE, SYS_RAWIO, SYS_RESOURCE, SYS_TIME, SYS_TTY_CONFIG, SYSLOG and WAKE_ALARM.
- drop list
- The Linux capabilities for the container that have been removed from the default configuration provided by Docker. Valid values are
ALL, AUDIT_CONTROL, AUDIT_WRITE, BLOCK_SUSPEND, CHOWN, DAC_OVERRIDE, DAC_READ_SEARCH, FOWNER, FSETID, IPC_LOCK, IPC_OWNER, KILL, LEASE, LINUX_IMMUTABLE, MAC_ADMIN, MAC_OVERRIDE, MKNOD, NET_ADMIN, NET_BIND_SERVICE, NET_BROADCAST, NET_RAW, SETFCAP, SETGID, SETPCAP, SETUID, SYS_ADMIN, SYS_BOOT, SYS_CHROOT, SYS_MODULE, SYS_NICE, SYS_PACCT, SYS_PTRACE, SYS_RAWIO, SYS_RESOURCE, SYS_TIME, SYS_TTY_CONFIG, SYSLOG and WAKE_ALARM.
- device list subresource
Any host devices to expose to the container.
Not supported under task definitions whose requires-compatibilities parameter contains FARGATE.
- host-path
- The path for the device on the host container instance. (Required)
- container-path
- The path inside the container at which to expose the host device.
- permissions list
The explicit permissions to provide to the container for the device.
By default, the container has permissions for read, write, and mknod for the device. Valid values are read, write and mknod.
- init-process-enabled
- Enable to run an init process inside the container that forwards signals and reaps processes.
- shared-memory-size
The value for the size (in MiB) of the /dev/shm volume.
Not supported under task definitions whose requires-compatibilities parameter contains FARGATE.
- tmpfs list subresource
The container path, mount options, and size (in MiB) of the tmpfs mount.
Not supported under task definitions whose requires-compatibilities parameter contains FARGATE.
- container-path
- The absolute file path where the tmpfs volume is to be mounted. (Required)
- size
- The size (in MiB) of the tmpfs volume. Minimum allowed value is
1. (Required)
- mount-options list
- The list of tmpfs volume mount options. Valid values are
defaults, ro, rw, suid, nosuid, dev, nodev, exec, noexec, sync, async, dirsync, remount, mand, nomand, atime, noatime, diratime, nodiratime, bind, rbind, unbindable, runbindable, private, rprivate, shared, rshared, slave, rslave, relatime, norelatime, strictatime, nostrictatime, mode, uid, gid, nr_inodes, nr_blocks and mpol.
- max-swap
The total amount of swap memory (in MiB) a container can use.
If a value of 0 is specified, the container will not use swap.
Not supported under task definitions whose requires-compatibilities parameter contains FARGATE. Minimum allowed value is 0.
- swappiness
- This allows you to tune a container’s memory swappiness behavior. A swappiness value of
0 will cause swapping to not happen unless absolutely necessary. A swappiness value of 100 will cause pages to be swapped very aggressively. Defaults to 60. Can only be set if max-swap is set. Valid values are between 0 to 100.
- depends-on list subresource
The dependencies defined for container startup and shutdown. A container can contain multiple dependencies. When a dependency is defined for container startup, for container shutdown it is reversed.
- container-name
- The
name of a container. (Required)
- condition
- The dependency condition of the container. Valid values are
START, COMPLETE, SUCCESS or HEALTHY. (Required)
- start-timeout
- Time duration (in seconds) to wait before giving up on resolving dependencies for a container.
- stop-timeout
- Time duration (in seconds) to wait before the container is forcefully killed if it doesn’t exit normally on its own. Defaults to
30. Maximum allowed value is 120.
- hostname
The hostname to use for your container.
This parameter is not supported if the task definition’s network-mode is awsvpc.
- user
The user name to use inside the container.
You can use the following formats. If specifying a UID or GID, you must specify it as a positive integer.
user
user:group
uid
uid:gid
user:gid
uid:group
- working-directory
- The working directory in which to run commands inside the container.
- disable-networking
- If
true, networking is disabled within the container.
- privileged
If true, the container is given elevated privileges on the host container instance (similar to the root user).
This parameter is not supported when the task definition’s ‘requires-compatibilities’ parameter contains ‘FARGATE’.
- readonly-root-filesystem
- If
true, the container is given read-only access to its root file system.
- dns-servers list
- A list of DNS servers that are presented to the container.
- dns-search-domains list
- A list of DNS search domains that are presented to the container.
- extra-host list subresource
A list of hostnames and IP address mappings to append to the /etc/hosts file on the container.
This parameter is not supported if the task definition’s network-mode is awsvpc.
- hostname
- The hostname to use in the /etc/hosts entry. (Required)
- ip-address
- The IP address to use in the /etc/hosts entry. (Required)
- docker-security-options list
A list of strings to provide custom labels for SELinux and AppArmor multi-level security systems.
This parameter is not supported when the task definition’s ‘requires-compatibilities’ parameter contains ‘FARGATE’
- interactive
- If
true, this allows you to deploy containerized applications that require stdin or a tty to be allocated.
- pseudo-terminal
- If
true, a TTY is allocated.
- docker-labels map
- A key/value map of labels to add to the container.
- ulimit list subresource
A list of ulimits to set in the container.
- name
- The type of the ulimit. Valid values are
core, cpu, data, fsize, locks, memlock, msgqueue, nice, nofile, nproc, rss, rtprio, rttime, sigpending or stack. (Required)
- soft-limit
- The soft limit for the ulimit type. (Required)
- hard-limit
- The hard limit for the ulimit type. (Required)
- log-configuration subresource
The log configuration specification for the container.
- log-driver
The log driver to use for the container.
When the task definition’s requires-compatibilities parameter contains FARGATE, the only supported log drivers are awslogs, splunk, and awsfirelens. Valid values are json-file, syslog, journald, gelf, fluentd, awslogs, splunk, awsfirelens, logentries or sumologic. (Required)
- options map
- The configuration options to send to the log driver.
- health-check subresource
The container health check command and associated configuration parameters for the container.
- command list
A list of strings representing the command that the container runs to determine if it is healthy.
The list must start with CMD to execute the command arguments directly, or CMD-SHELL to run the command with the container’s default shell. (Required)
- interval
- The time period in seconds between each health check execution. Defaults to
30. Valid values are between 5 to 300.
- timeout
- The time period in seconds to wait for a health check to succeed before it is considered a failure. Defaults to
5. Valid values are between 2 to 60.
- retries
- The number of times to retry a failed health check before the container is considered unhealthy. Defaults to
3. Valid values are between 1 to 10.
- start-period
The optional grace period within which to provide containers time to bootstrap before failed health checks count towards the maximum number of retries.
If a health check succeeds within the start-period, then the container is considered healthy and any subsequent failures count toward the maximum number of retries. This parameter is disabled by default. Valid values are between 0 to 300.
- system-control list subresource
A list of namespaced kernel parameters to set in the container.
This parameter is not supported when the task definition’s ‘requires-compatibilities’ parameter contains ‘FARGATE’.
- namespace
- The namespaced kernel parameter for which to set a
value. (Required)
- value
- The value for the namespaced kernel parameter specified in
namespace.
- resource-requirement list subresource
The type and amount of a resource to assign to a container.
This parameter is not supported when the task definition’s ‘requires-compatibilities’ parameter contains ‘FARGATE’.
- type
- The type of resource to assign to a container. Valid values are
GPU or InferenceAccelerator. (Required)
- value
The value for the specified resource type.
If the GPU type is used, the value is the number of physical GPUs the Amazon ECS container agent will reserve for the container. The total of all GPU resource requirements’ values across a task definition may not exceed 16.
If the InferenceAccelerator type is used, the value should match the device-name for an inference-accelerator specified in a task definition. (Required)
- firelens-configuration subresource
The FireLens configuration for the container. This is used to specify and configure a log router for container logs.
- type
- The log router to use. Valid values are
fluentd or fluentbit. (Required)
- options map
The options to use when configuring the log router.
This field can be used to specify a custom configuration file or to add additional metadata, such as the task, task definition, cluster, and container instance details to the log event.
|