# CodeImageConfig

Result of the bind when an ECR image is used.

- Source: [`aws-lambda/lib/code.ts`](https://github.com/aws/aws-cdk/blob/v2.277.0/packages/aws-cdk-lib/aws-lambda/lib/code.ts#L286)

## Example

TypeScript:

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

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

Python:

```python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_lambda as lambda_

code_image_config = lambda.CodeImageConfig(
    image_uri="imageUri",

    # the properties below are optional
    cmd=["cmd"],
    entrypoint=["entrypoint"],
    working_directory="workingDirectory"
)
```

Java:

```java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lambda.*;

CodeImageConfig codeImageConfig = CodeImageConfig.builder()
        .imageUri("imageUri")

        // the properties below are optional
        .cmd(List.of("cmd"))
        .entrypoint(List.of("entrypoint"))
        .workingDirectory("workingDirectory")
        .build();
```

C# / .NET:

```csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Lambda;

var codeImageConfig = new CodeImageConfig {
    ImageUri = "imageUri",

    // the properties below are optional
    Cmd = new [] { "cmd" },
    Entrypoint = new [] { "entrypoint" },
    WorkingDirectory = "workingDirectory"
};
```

Golang:

```go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

codeImageConfig := &CodeImageConfig{
	ImageUri: jsii.String("imageUri"),

	// the properties below are optional
	Cmd: []*string{
		jsii.String("cmd"),
	},
	Entrypoint: []*string{
		jsii.String("entrypoint"),
	},
	WorkingDirectory: jsii.String("workingDirectory"),
}
```

## Properties

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

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

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

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

  **Default:** use the ENTRYPOINT in the 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' ]`.

- `imageUri`: string (required) — URI to the Docker image.

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

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

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