Skip to main content
Version: 0.0.25

Table: container_definition

Table to manage AWS ECS container definitions. Container definitions are used in task definitions to describe the different containers that are launched as part of a task.


INSERT INTO container_definition ("name", image, essential, memory_reservation, host_port, container_port, protocol, env_variables, task_definition_id, log_group_id)
VALUES('container_name', 'image_name', true, 2048, 6379, 6379, 'tcp', '{ "test": 2}', (select id from task_definition where family = 'task_definition' and status is null
and region = 'us-east-1' limit 1), (select id from log_group where log_group_name = 'log_group' and region = 'us-east-1'));

SELECT * FROM container_definition WHERE name = 'container_name' AND image = 'image_name';

DELETE FROM container_definition using task_definition where container_definition.task_definition_id = and = 'task_name';


image > repository > publicRepository digest > tag > null


Optional container_port: number

Port to expose at container level


Optional cpu: number

The number of cpu units reserved for the container.


Optional digest: string

The sha-256 digest of the used image. Either tag or digest needs to be specified


env_variables: Object

Complex type to specify a list of environment variables that the container can consume


Type definition

[key: string]: string

essential: boolean

If the essential parameter of a container is marked as true, and that container fails or stops for any reason, all other containers that are part of the task are stopped. If the essential parameter of a container is marked as false, its failure doesn't affect the rest of the containers in a task. If this parameter is omitted, a container is assumed to be essential.


Optional host_port: number

Port to expose at host level. It can be left blank depending on the networking mode


Optional image: string

The image used to start the container


Optional log_group: log_group

The log group where to render the container logs


Optional memory: number

The amount (in MiB) of memory to present to the container.


Optional memory_reservation: number

The soft limit (in MiB) of memory to reserve for the container.


name: string

Name of the container definition

Optional protocol: transport_protocol

The protocol for the exposed ports


Optional public_repository: public_repository

Reference to the public repository where this image is hosted

region: string

Region for the container definition

Optional repository: repository

Reference of the repository where this image is hosted

Optional tag: string

The tag for the image used to start the container


task_definition: task_definition

Reference of the associated task definition