Skip to content

ECS  >  Structures  >  ExpressGatewayContainer

ExpressGatewayContainer

Structure Class

ExpressGatewayContainer dataclass

Bases: _SerdeShape

Defines the configuration for the primary container in an Express service. This container receives traffic from the Application Load Balancer and runs your application code.

The container configuration includes the container image, port mapping, logging settings, environment variables, and secrets. The container image is the only required parameter, with sensible defaults provided for other settings.

Attributes

aws_logs_configuration class-attribute instance-attribute
aws_logs_configuration: ExpressGatewayServiceAwsLogsConfiguration | None = ...

The log configuration for the container.

command class-attribute instance-attribute
command: list[str] | None = ...

The command that is passed to the container.

container_port class-attribute instance-attribute
container_port: int | None = ...

The port number on the container that receives traffic from the load balancer. Default is 80.

environment class-attribute instance-attribute
environment: list[KeyValuePair] | None = ...

The environment variables to pass to the container.

image instance-attribute
image: str

The image used to start a container. This string is passed directly to the Docker daemon. Images in the Docker Hub registry are available by default. Other repositories are specified with either repository-url/image:tag or repository-url/image@digest.

For Express services, the image typically contains a web application that listens on the specified container port. The image can be stored in Amazon ECR, Docker Hub, or any other container registry accessible to your execution role.

repository_credentials class-attribute instance-attribute
repository_credentials: ExpressGatewayRepositoryCredentials | None = ...

The configuration for repository credentials for private registry authentication.

secrets class-attribute instance-attribute
secrets: list[Secret] | None = ...

The secrets to pass to the container.