# ContainerOverride

- Source: [`aws-events-targets/lib/ecs-task-properties.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-events-targets/lib/ecs-task-properties.ts#L1)

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_events_targets as events_targets } from 'aws-cdk-lib';
const containerOverride: events_targets.ContainerOverride = {
  containerName: 'containerName',

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

## Properties

- `command`: string[] — Command to run inside the container.

  **Default:** Default command

- `containerName`: string (required) — Name of the container inside the task definition.

- `cpu`: number — The number of cpu units reserved for the container.

  **Default:** The default value from the task definition.

- `environment`: [TaskEnvironmentVariable](/cdk/api/v2/docs/aws-cdk-lib.aws_events_targets.TaskEnvironmentVariable.html)[] — Variables to set in the container's environment.

- `memoryLimit`: number — Hard memory limit on the container.

  **Default:** The default value from the task definition.

- `memoryReservation`: number — Soft memory limit on the container.

  **Default:** The default value from the task definition.
