Skip to main content

Legend

EcsContainerDefinition

ECS container definition — models a single container within a task. All string fields are templateable.
string
required
Container name — must be unique within the task(templateable)
string
required
Docker image URI(templateable)
integer | null
Container-level CPU units(format:int32; templateable)
integer | null
Hard memory limit in MiB — container is killed if it exceeds this(format:int32; templateable)
integer | null
Soft memory limit in MiB — used for memory reservation(format:int32; templateable)
boolean | null
Whether the task should stop if this container exits(templateable)
EcsPortMapping[] | null
Port mappingsSee: EcsPortMapping(templateable)
EcsEnvironmentVariable[] | null
Environment variablesSee: EcsEnvironmentVariable(templateable)
EcsSecret[] | null
Secrets from Parameter Store or Secrets ManagerSee: EcsSecret(templateable)
string[] | null
Startup command — overrides the Docker CMD(templateable)
string[] | null
Entrypoint — overrides the Docker ENTRYPOINT(templateable)
string | null
Working directory inside the container(templateable)
EcsHealthCheck
Container health checkSee: EcsHealthCheck(templateable)
EcsLogConfiguration
Log configurationSee: EcsLogConfiguration(templateable)
EcsLinuxParameters
Linux-specific parametersSee: EcsLinuxParameters(templateable)
map<string,string> | null
Docker labels(templateable)
boolean | null
Run as privileged (EC2 only)(templateable)
string | null
User to run as (uid or uid:gid)(templateable)
integer | null
Stop timeout in seconds before SIGKILL(format:int32; templateable)
boolean | null
Disable networking for this container(templateable)
EcsResourceRequirement[] | null
GPU and inference accelerator requirementsSee: EcsResourceRequirement(templateable)
EcsMountPoint[] | null
Volume mount pointsSee: EcsMountPoint(templateable)
EcsVolumeFrom[] | null
Volumes to inherit from other containersSee: EcsVolumeFrom(templateable)
EcsContainerDependency[] | null
Container startup dependenciesSee: EcsContainerDependency(templateable)
EcsRepositoryCredentials
Private registry credentialsSee: EcsRepositoryCredentials(templateable)
EcsFirelensConfiguration
Firelens log routing configurationSee: EcsFirelensConfiguration(templateable)
EcsSystemControl[] | null
System controls — kernel parameter overridesSee: EcsSystemControl(templateable)
EcsEnvironmentFile[] | null
Files containing environment variablesSee: EcsEnvironmentFile(templateable)
boolean | null
Read-only root filesystem(templateable)
boolean | null
Interactive mode (stdin)(templateable)
boolean | null
Pseudo-terminal allocation(templateable)

EcsEnvironmentFile

Environment file from S3
string
required
S3 ARN of the environment file(templateable)
enum
required
File typeAllowed values: s3(templateable)

EcsEnvironmentVariable

Environment variable as name-value pair
string
required
Variable name(templateable)
string
required
Variable value(templateable)

EcsResourceRequirement

GPU or other resource requirement
enum
required
Resource type — currently only GPUAllowed values: GPU | InferenceAccelerator(templateable)
string
required
Number of resources(templateable)

EcsContainerDependency

Container dependency — controls startup order
string
required
Name of the dependency container(templateable)
enum
required
Condition to wait forAllowed values: START | COMPLETE | SUCCESS | HEALTHY(templateable)

EcsFirelensConfiguration

Firelens log routing configuration
enum
required
Router typeAllowed values: fluentbit | fluentd(templateable)
map<string,string> | null
Router options(templateable)

EcsHealthCheck

Container health check configuration
string[]
required
Command to run — prefix with CMD or CMD-SHELL(templateable)
integer | null
Interval between checks in seconds(format:int32; templateable)
integer | null
Timeout for each check in seconds(format:int32; templateable)
integer | null
Number of retries before marking unhealthy(format:int32; templateable)
integer | null
Grace period before health checks start in seconds(format:int32; templateable)

EcsLinuxParameters

Linux-specific container settings
boolean | null
Run an init process inside the container(templateable)
EcsLinuxCapabilities
Linux capabilities to add or dropSee: EcsLinuxCapabilities(templateable)
integer | null
Shared memory size in MiB(format:int32; templateable)
EcsTmpfs[] | null
Tmpfs mountsSee: EcsTmpfs(templateable)

EcsLogConfiguration

Log configuration for a container
enum
required
Log driver — awslogs for CloudWatch, awsfirelens for FirelensAllowed values: awslogs | awsfirelens | json-file | syslog | fluentd | splunk(templateable)
map<string,string> | null
Driver-specific options(templateable)
EcsSecret[] | null
Secret log options (ARN references)See: EcsSecret(templateable)

EcsMountPoint

Container mount point referencing a volume
string
required
Name of the volume (must match a volume in the task definition)(templateable)
string
required
Path inside the container to mount(templateable)
boolean | null
Whether the mount is read-only(templateable)

EcsPortMapping

Port mapping for a container
integer
required
Port on the container(format:int32; templateable)
integer | null
Port on the host (EC2) or omit for awsvpc(format:int32; templateable)
enum | null
Transport protocolAllowed values: tcp | udp(templateable)
enum | null
Application protocol for service connectAllowed values: http | http2 | grpc(templateable)

EcsRepositoryCredentials

Private registry credentials
string
required
ARN of the Secrets Manager secret containing registry credentials(templateable)

EcsSecret

Secret injected from Parameter Store or Secrets Manager
string
required
Environment variable name in the container(templateable)
string
required
Full ARN of the secret in Parameter Store or Secrets Manager(templateable)

EcsSystemControl

System control — kernel parameter override
string
required
Namespace (e.g., net.core.somaxconn)(templateable)
string
required
Value to set(templateable)

EcsVolumeFrom

Volume-from reference — mount volumes from another container
string
required
Source container name(templateable)
boolean | null
Whether the mount is read-only(templateable)

EcsLinuxCapabilities

Linux kernel capabilities
string[] | null
Capabilities to add(templateable)
string[] | null
Capabilities to drop(templateable)

EcsTmpfs

Tmpfs mount configuration
string
required
Mount path in the container(templateable)
integer
required
Maximum size in MiB(format:int32; templateable)
string[] | null
Mount options(templateable)