Skip to content
v2.274.0

ContainerOverride Struct ​

A list of container overrides that specify the name of a container and the overrides it should receive.

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_ecs as ecs } from 'aws-cdk-lib';
import { aws_stepfunctions_tasks as stepfunctions_tasks } from 'aws-cdk-lib';

declare const containerDefinition: ecs.ContainerDefinition;
const containerOverride: stepfunctions_tasks.ContainerOverride = {
  containerDefinition: containerDefinition,

  // the properties below are optional
  command: ['command'],
  cpu: 123,
  environment: [{
    name: 'name',
    value: 'value',
  }],
  memoryLimit: 123,
  memoryReservation: 123,
};

Properties ​

commandstring[]commandtyping.List[str]commandList<String>Commandstring[]Command*[]*string#
Command to run inside the container.

Default: Default command from the Docker image or the task definition

containerDefinitionContainerDefinitioncontainer_definitionContainerDefinitioncontainerDefinitionContainerDefinitionContainerDefinitionContainerDefinitionContainerDefinitionContainerDefinitionrequired#
Name of the container inside the task definition.
cpunumbercpuint | floatcpuNumberCpudoubleCpu*float64#
The number of cpu units reserved for the container.

Default: The default value from the task definition.

environmentTaskEnvironmentVariable[]environmenttyping.List[TaskEnvironmentVariable]environmentList<TaskEnvironmentVariable>EnvironmentTaskEnvironmentVariable[]Environment*[]TaskEnvironmentVariable#
The environment variables to send to the container.

Default: The existing environment variables from the Docker image or the task definition

You can add new environment variables, which are added to the container at launch, or you can override the existing environment variables from the Docker image or the task definition.

memoryLimitnumbermemory_limitint | floatmemoryLimitNumberMemoryLimitdoubleMemoryLimit*float64#
The hard limit (in MiB) of memory to present to the container.

Default: The default value from the task definition.

memoryReservationnumbermemory_reservationint | floatmemoryReservationNumberMemoryReservationdoubleMemoryReservation*float64#
The soft limit (in MiB) of memory to reserve for the container.

Default: The default value from the task definition.