# EcrImageCodeProps

Properties to initialize a new EcrImageCode.

Extends: EcrImageCodeProps
Used as props by: EcrImageCode

- Source: [`aws-lambda/lib/code.ts`](https://github.com/aws/aws-cdk/blob/v2.274.0/packages/aws-cdk-lib/aws-lambda/lib/code.ts#L687)
- Type last changed: v2.21.0 · 22 Apr 2022

## Example

```ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_lambda as lambda } from 'aws-cdk-lib';
const ecrImageCodeProps: lambda.EcrImageCodeProps = {
  cmd: ['cmd'],
  entrypoint: ['entrypoint'],
  tag: 'tag',
  tagOrDigest: 'tagOrDigest',
  workingDirectory: 'workingDirectory',
};
```

## Properties

- `cmd`: string[] = use the CMD specified in the docker image or Dockerfile. — Specify or override the CMD on the specified Docker image or Dockerfile.

  This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`.

  **Default:** use the CMD specified in the docker image or Dockerfile.

- `entrypoint`: string[] = use the ENTRYPOINT in the docker image or Dockerfile. — Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile.

  An ENTRYPOINT allows you to configure a container that will run as an executable.
  This needs to be in the 'exec form', viz., `[ 'executable', 'param1', 'param2' ]`.

  **Default:** use the ENTRYPOINT in the docker image or Dockerfile.

- `tag`: string = 'latest' — use `tagOrDigest`

- `tagOrDigest`: string = 'latest' — The image tag or digest to use when pulling the image from ECR (digests must start with `sha256:`).

- `workingDirectory`: string = use the WORKDIR in the docker image or Dockerfile. — Specify or override the WORKDIR on the specified Docker image or Dockerfile.

  A WORKDIR allows you to configure the working directory the container will use.

  **Default:** use the WORKDIR in the docker image or Dockerfile.
