aws-cdk-lib.aws_lambda.CodeImageConfig

interface CodeImageConfig

LanguageType name
.NETAmazon.CDK.AWS.Lambda.CodeImageConfig
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslambda#CodeImageConfig
Javasoftware.amazon.awscdk.services.lambda.CodeImageConfig
Pythonaws_cdk.aws_lambda.CodeImageConfig
TypeScript (source)aws-cdk-lib » aws_lambda » CodeImageConfig

Result of the bind when an ECR image is used.

Example

// 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 codeImageConfig: lambda.CodeImageConfig = {
  imageUri: 'imageUri',

  // the properties below are optional
  cmd: ['cmd'],
  entrypoint: ['entrypoint'],
  workingDirectory: 'workingDirectory',
};

Properties

NameTypeDescription
imageUristringURI to the Docker image.
cmd?string[]Specify or override the CMD on the specified Docker image or Dockerfile.
entrypoint?string[]Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile.
workingDirectory?stringSpecify or override the WORKDIR on the specified Docker image or Dockerfile.

imageUri

Type: string

URI to the Docker image.


cmd?

Type: string[] (optional, default: 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' ].

See also: https://docs.docker.com/engine/reference/builder/#cmd


entrypoint?

Type: string[] (optional, default: 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' ].

See also: https://docs.docker.com/engine/reference/builder/#entrypoint


workingDirectory?

Type: string (optional, default: 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.

See also: https://docs.docker.com/engine/reference/builder/#workdir