interface CodeImageConfig
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Lambda.CodeImageConfig |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awslambda#CodeImageConfig |
Java | software.amazon.awscdk.services.lambda.CodeImageConfig |
Python | aws_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
Name | Type | Description |
---|---|---|
image | string | URI 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. |
working | string | Specify 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