Repository: tmokmss/deploy-time-build (language: python)

Issue:
deploy-time container build
Applications using e.g. Next.js requires to embed `NEXT_PUBLIC_*` environment variables during build time. For SSR applications using Docker container to run the Next.js app, it will make sense to build a container on deploy time.

An alternative solution to this problem: https://github.com/expatfile/next-runtime-env


Discussion / hints:
TIL: Remix uses a whole different strategy about browser environment variables: https://remix.run/docs/en/main/guides/envvars#browser-environment-variables
This will also help when the container size is very large. It would be a pain to build a large container and push to ECR from a local environment with slow network.
This can also be useful if you can easily enable zstd compression. Using zstd in the local container build looks a bit complicated and can be an obstacle to using the feature. If we are building an image in CodeBuild, we should be able to just expose a boolean flag to enable it.

https://aws.amazon.com/blogs/containers/reducing-aws-fargate-startup-times-with-zstd-compressed-container-images/
Sato-san also considered this approach as a valid option.
https://speakerdeck.com/tomoki10/ideal-and-reality-when-implementing-cicd-for-ecs-on-fargate-with-aws-cdk?slide=21

The required features include:

* Allow to set image tag manually
* Deploy to any ECR repository (not only CDK asset repo)
* Don't duplicate container images to multiple repositories (may be the case when naively implementing image copy)


Fix patch:
diff --git a/API.md b/API.md
index b76df89..be39ffd 100644
--- a/API.md
+++ b/API.md
@@ -2,6 +2,7 @@
 AWS CDK L3 construct that allows you to run a build job for specific purposes. Currently this library supports the following use cases:
 
 * Build web frontend static files
+* Build a container image
 * Build Seekable OCI (SOCI) indices for container images
 
 ## Usage
@@ -118,6 +119,35 @@ To mitigate this issue, you can separate the stack for frontend construct from o
       ],
 ```
 
+### Build a container image
+You can build a container image at deploy time by the following code:
+
+```ts
+import { ContainerImageBuild } from 'deploy-time-build;
+
+const image = new ContainerImageBuild(this, 'Build', {
+    directory: 'example-image',
+    buildArgs: { DUMMY_FILE_SIZE_MB: '15' },
+    tag: 'my-image-tag',
+});
+new DockerImageFunction(this, 'Function', {
+    code: image.toLambdaDockerImageCode(),
+});
+const armImage = new ContainerImageBuild(this, 'BuildArm', {
+    directory: 'example-image',
+    platform: Platform.LINUX_ARM64,
+    repository: image.repository,
+    zstdCompression: true,
+});
+new FargateTaskDefinition(this, 'TaskDefinition', {
+    runtimePlatform: { cpuArchitecture: CpuArchitecture.ARM64 }
+}).addContainer('main', {
+    image: armImage.toEcsDockerImageCode(),
+});
+```
+
+The third argument (props) are the super set of DockerImageAsset's properties. You can additionally set `tag` and `repository`.
+
 ### Build SOCI index for a container image
 [Seekable OCI (SOCI)](https://aws.amazon.com/about-aws/whats-new/2022/09/introducing-seekable-oci-lazy-loading-container-images/) is a way to help start tasks faster for Amazon ECS tasks on Fargate 1.4.0. You can build and push a SOCI index using the `SociIndexBuild` construct.
 
@@ -158,6 +188,162 @@ yarn integ-runner --update-on-failed
 
 ## Constructs <a name="Constructs" id="Constructs"></a>
 
+### ContainerImageBuild <a name="ContainerImageBuild" id="deploy-time-build.ContainerImageBuild"></a>
+
+- *Implements:* aws-cdk-lib.aws_iam.IGrantable
+
+Build a container image and push it to an ECR repository on deploy-time.
+
+#### Initializers <a name="Initializers" id="deploy-time-build.ContainerImageBuild.Initializer"></a>
+
+```typescript
+import { ContainerImageBuild } from 'deploy-time-build'
+
+new ContainerImageBuild(scope: Construct, id: string, props: ContainerImageBuildProps)
+```
+
+| **Name** | **Type** | **Description** |
+| --- | --- | --- |
+| <code><a href="#deploy-time-build.ContainerImageBuild.Initializer.parameter.scope">scope</a></code> | <code>constructs.Construct</code> | *No description.* |
+| <code><a href="#deploy-time-build.ContainerImageBuild.Initializer.parameter.id">id</a></code> | <code>string</code> | *No description.* |
+| <code><a href="#deploy-time-build.ContainerImageBuild.Initializer.parameter.props">props</a></code> | <code><a href="#deploy-time-build.ContainerImageBuildProps">ContainerImageBuildProps</a></code> | *No description.* |
+
+---
+
+##### `scope`<sup>Required</sup> <a name="scope" id="deploy-time-build.ContainerImageBuild.Initializer.parameter.scope"></a>
+
+- *Type:* constructs.Construct
+
+---
+
+##### `id`<sup>Required</sup> <a name="id" id="deploy-time-build.ContainerImageBuild.Initializer.parameter.id"></a>
+
+- *Type:* string
+
+---
+
+##### `props`<sup>Required</sup> <a name="props" id="deploy-time-build.ContainerImageBuild.Initializer.parameter.props"></a>
+
+- *Type:* <a href="#deploy-time-build.ContainerImageBuildProps">ContainerImageBuildProps</a>
+
+---
+
+#### Methods <a name="Methods" id="Methods"></a>
+
+| **Name** | **Description** |
+| --- | --- |
+| <code><a href="#deploy-time-build.ContainerImageBuild.toString">toString</a></code> | Returns a string representation of this construct. |
+| <code><a href="#deploy-time-build.ContainerImageBuild.toEcsDockerImageCode">toEcsDockerImageCode</a></code> | Get the instance of {@link ContainerImage} for an ECS task definition. |
+| <code><a href="#deploy-time-build.ContainerImageBuild.toLambdaDockerImageCode">toLambdaDockerImageCode</a></code> | Get the instance of {@link DockerImageCode} for a Lambda function image. |
+
+---
+
+##### `toString` <a name="toString" id="deploy-time-build.ContainerImageBuild.toString"></a>
+
+```typescript
+public toString(): string
+```
+
+Returns a string representation of this construct.
+
+##### `toEcsDockerImageCode` <a name="toEcsDockerImageCode" id="deploy-time-build.ContainerImageBuild.toEcsDockerImageCode"></a>
+
+```typescript
+public toEcsDockerImageCode(): EcrImage
+```
+
+Get the instance of {@link ContainerImage} for an ECS task definition.
+
+##### `toLambdaDockerImageCode` <a name="toLambdaDockerImageCode" id="deploy-time-build.ContainerImageBuild.toLambdaDockerImageCode"></a>
+
+```typescript
+public toLambdaDockerImageCode(): DockerImageCode
+```
+
+Get the instance of {@link DockerImageCode} for a Lambda function image.
+
+#### Static Functions <a name="Static Functions" id="Static Functions"></a>
+
+| **Name** | **Description** |
+| --- | --- |
+| <code><a href="#deploy-time-build.ContainerImageBuild.isConstruct">isConstruct</a></code> | Checks if `x` is a construct. |
+
+---
+
+##### ~~`isConstruct`~~ <a name="isConstruct" id="deploy-time-build.ContainerImageBuild.isConstruct"></a>
+
+```typescript
+import { ContainerImageBuild } from 'deploy-time-build'
+
+ContainerImageBuild.isConstruct(x: any)
+```
+
+Checks if `x` is a construct.
+
+###### `x`<sup>Required</sup> <a name="x" id="deploy-time-build.ContainerImageBuild.isConstruct.parameter.x"></a>
+
+- *Type:* any
+
+Any object.
+
+---
+
+#### Properties <a name="Properties" id="Properties"></a>
+
+| **Name** | **Type** | **Description** |
+| --- | --- | --- |
+| <code><a href="#deploy-time-build.ContainerImageBuild.property.node">node</a></code> | <code>constructs.Node</code> | The tree node. |
+| <code><a href="#deploy-time-build.ContainerImageBuild.property.grantPrincipal">grantPrincipal</a></code> | <code>aws-cdk-lib.aws_iam.IPrincipal</code> | The principal to grant permissions to. |
+| <code><a href="#deploy-time-build.ContainerImageBuild.property.imageTag">imageTag</a></code> | <code>string</code> | *No description.* |
+| <code><a href="#deploy-time-build.ContainerImageBuild.property.repository">repository</a></code> | <code>aws-cdk-lib.aws_ecr.IRepository</code> | *No description.* |
+
+---
+
+##### `node`<sup>Required</sup> <a name="node" id="deploy-time-build.ContainerImageBuild.property.node"></a>
+
+```typescript
+public readonly node: Node;
+```
+
+- *Type:* constructs.Node
+
+The tree node.
+
+---
+
+##### `grantPrincipal`<sup>Required</sup> <a name="grantPrincipal" id="deploy-time-build.ContainerImageBuild.property.grantPrincipal"></a>
+
+```typescript
+public readonly grantPrincipal: IPrincipal;
+```
+
+- *Type:* aws-cdk-lib.aws_iam.IPrincipal
+
+The principal to grant permissions to.
+
+---
+
+##### `imageTag`<sup>Required</sup> <a name="imageTag" id="deploy-time-build.ContainerImageBuild.property.imageTag"></a>
+
+```typescript
+public readonly imageTag: string;
+```
+
+- *Type:* string
+
+---
+
+##### `repository`<sup>Required</sup> <a name="repository" id="deploy-time-build.ContainerImageBuild.property.repository"></a>
+
+```typescript
+public readonly repository: IRepository;
+```
+
+- *Type:* aws-cdk-lib.aws_ecr.IRepository
+
+---
+
+
 ### NodejsBuild <a name="NodejsBuild" id="deploy-time-build.NodejsBuild"></a>
 
 - *Implements:* aws-cdk-lib.aws_iam.IGrantable
@@ -593,6 +779,231 @@ Relative path from a build directory to the directory where the asset is extract
 
 ---
 
+### ContainerImageBuildProps <a name="ContainerImageBuildProps" id="deploy-time-build.ContainerImageBuildProps"></a>
+
+#### Initializer <a name="Initializer" id="deploy-time-build.ContainerImageBuildProps.Initializer"></a>
+
+```typescript
+import { ContainerImageBuildProps } from 'deploy-time-build'
+
+const containerImageBuildProps: ContainerImageBuildProps = { ... }
+```
+
+#### Properties <a name="Properties" id="Properties"></a>
+
+| **Name** | **Type** | **Description** |
+| --- | --- | --- |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.exclude">exclude</a></code> | <code>string[]</code> | File paths matching the patterns will be excluded. |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.followSymlinks">followSymlinks</a></code> | <code>aws-cdk-lib.SymlinkFollowMode</code> | A strategy for how to handle symlinks. |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.ignoreMode">ignoreMode</a></code> | <code>aws-cdk-lib.IgnoreMode</code> | The ignore behavior to use for `exclude` patterns. |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.extraHash">extraHash</a></code> | <code>string</code> | Extra information to encode into the fingerprint (e.g. build instructions and other inputs). |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.buildArgs">buildArgs</a></code> | <code>{[ key: string ]: string}</code> | Build args to pass to the `docker build` command. |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.file">file</a></code> | <code>string</code> | Path to the Dockerfile (relative to the directory). |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.invalidation">invalidation</a></code> | <code>aws-cdk-lib.aws_ecr_assets.DockerImageAssetInvalidationOptions</code> | Options to control which parameters are used to invalidate the asset hash. |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.networkMode">networkMode</a></code> | <code>aws-cdk-lib.aws_ecr_assets.NetworkMode</code> | Networking mode for the RUN commands during build. |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.platform">platform</a></code> | <code>aws-cdk-lib.aws_ecr_assets.Platform</code> | Platform to build for. |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.target">target</a></code> | <code>string</code> | Docker target to build to. |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.directory">directory</a></code> | <code>string</code> | The directory where the Dockerfile is stored. |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.repository">repository</a></code> | <code>aws-cdk-lib.aws_ecr.IRepository</code> | The ECR repository to push the image. |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.tag">tag</a></code> | <code>string</code> | The tag when to push the image. |
+| <code><a href="#deploy-time-build.ContainerImageBuildProps.property.zstdCompression">zstdCompression</a></code> | <code>boolean</code> | Use zstd for compressing a container image. |
+
+---
+
+##### `exclude`<sup>Optional</sup> <a name="exclude" id="deploy-time-build.ContainerImageBuildProps.property.exclude"></a>
+
+```typescript
+public readonly exclude: string[];
+```
+
+- *Type:* string[]
+- *Default:* nothing is excluded
+
+File paths matching the patterns will be excluded.
+
+See `ignoreMode` to set the matching behavior.
+Has no effect on Assets bundled using the `bundling` property.
+
+---
+
+##### `followSymlinks`<sup>Optional</sup> <a name="followSymlinks" id="deploy-time-build.ContainerImageBuildProps.property.followSymlinks"></a>
+
+```typescript
+public readonly followSymlinks: SymlinkFollowMode;
+```
+
+- *Type:* aws-cdk-lib.SymlinkFollowMode
+- *Default:* SymlinkFollowMode.NEVER
+
+A strategy for how to handle symlinks.
+
+---
+
+##### `ignoreMode`<sup>Optional</sup> <a name="ignoreMode" id="deploy-time-build.ContainerImageBuildProps.property.ignoreMode"></a>
+
+```typescript
+public readonly ignoreMode: IgnoreMode;
+```
+
+- *Type:* aws-cdk-lib.IgnoreMode
+- *Default:* IgnoreMode.GLOB
+
+The ignore behavior to use for `exclude` patterns.
+
+---
+
+##### `extraHash`<sup>Optional</sup> <a name="extraHash" id="deploy-time-build.ContainerImageBuildProps.property.extraHash"></a>
+
+```typescript
+public readonly extraHash: string;
+```
+
+- *Type:* string
+- *Default:* hash is only based on source content
+
+Extra information to encode into the fingerprint (e.g. build instructions and other inputs).
+
+---
+
+##### `buildArgs`<sup>Optional</sup> <a name="buildArgs" id="deploy-time-build.ContainerImageBuildProps.property.buildArgs"></a>
+
+```typescript
+public readonly buildArgs: {[ key: string ]: string};
+```
+
+- *Type:* {[ key: string ]: string}
+- *Default:* no build args are passed
+
+Build args to pass to the `docker build` command.
+
+Since Docker build arguments are resolved before deployment, keys and
+values cannot refer to unresolved tokens (such as `lambda.functionArn` or
+`queue.queueUrl`).
+
+---
+
+##### `file`<sup>Optional</sup> <a name="file" id="deploy-time-build.ContainerImageBuildProps.property.file"></a>
+
+```typescript
+public readonly file: string;
+```
+
+- *Type:* string
+- *Default:* 'Dockerfile'
+
+Path to the Dockerfile (relative to the directory).
+
+---
+
+##### `invalidation`<sup>Optional</sup> <a name="invalidation" id="deploy-time-build.ContainerImageBuildProps.property.invalidation"></a>
+
+```typescript
+public readonly invalidation: DockerImageAssetInvalidationOptions;
+```
+
+- *Type:* aws-cdk-lib.aws_ecr_assets.DockerImageAssetInvalidationOptions
+- *Default:* hash all parameters
+
+Options to control which parameters are used to invalidate the asset hash.
+
+---
+
+##### `networkMode`<sup>Optional</sup> <a name="networkMode" id="deploy-time-build.ContainerImageBuildProps.property.networkMode"></a>
+
+```typescript
+public readonly networkMode: NetworkMode;
+```
+
+- *Type:* aws-cdk-lib.aws_ecr_assets.NetworkMode
+- *Default:* no networking mode specified (the default networking mode `NetworkMode.DEFAULT` will be used)
+
+Networking mode for the RUN commands during build.
+
+Support docker API 1.25+.
+
+---
+
+##### `platform`<sup>Optional</sup> <a name="platform" id="deploy-time-build.ContainerImageBuildProps.property.platform"></a>
+
+```typescript
+public readonly platform: Platform;
+```
+
+- *Type:* aws-cdk-lib.aws_ecr_assets.Platform
+- *Default:* no platform specified (the current machine architecture will be used)
+
+Platform to build for.
+
+_Requires Docker Buildx_.
+
+---
+
+##### `target`<sup>Optional</sup> <a name="target" id="deploy-time-build.ContainerImageBuildProps.property.target"></a>
+
+```typescript
+public readonly target: string;
+```
+
+- *Type:* string
+- *Default:* no target
+
+Docker target to build to.
+
+---
+
+##### `directory`<sup>Required</sup> <a name="directory" id="deploy-time-build.ContainerImageBuildProps.property.directory"></a>
+
+```typescript
+public readonly directory: string;
+```
+
+- *Type:* string
+
+The directory where the Dockerfile is stored.
+
+Any directory inside with a name that matches the CDK output folder (cdk.out by default) will be excluded from the asset
+
+---
+
+##### `repository`<sup>Optional</sup> <a name="repository" id="deploy-time-build.ContainerImageBuildProps.property.repository"></a>
+
+```typescript
+public readonly repository: IRepository;
+```
+
+- *Type:* aws-cdk-lib.aws_ecr.IRepository
+- *Default:* create a new ECR repository
+
+The ECR repository to push the image.
+
+---
+
+##### `tag`<sup>Optional</sup> <a name="tag" id="deploy-time-build.ContainerImageBuildProps.property.tag"></a>
+
+```typescript
+public readonly tag: string;
+```
+
+- *Type:* string
+- *Default:* use assetHash as tag
+
+The tag when to push the image.
+
+---
+
+##### `zstdCompression`<sup>Optional</sup> <a name="zstdCompression" id="deploy-time-build.ContainerImageBuildProps.property.zstdCompression"></a>
+
+```typescript
+public readonly zstdCompression: boolean;
+```
+
+- *Type:* boolean
+- *Default:* false
+
+Use zstd for compressing a container image.
+
+---
+
 ### NodejsBuildProps <a name="NodejsBuildProps" id="deploy-time-build.NodejsBuildProps"></a>
 
 #### Initializer <a name="Initializer" id="deploy-time-build.NodejsBuildProps.Initializer"></a>
diff --git a/README.md b/README.md
index b80aef9..feb93da 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
 AWS CDK L3 construct that allows you to run a build job for specific purposes. Currently this library supports the following use cases:
 
 * Build web frontend static files
+* Build a container image
 * Build Seekable OCI (SOCI) indices for container images
 
 ## Usage
@@ -118,6 +119,35 @@ To mitigate this issue, you can separate the stack for frontend construct from o
       ],
 ```
 
+### Build a container image
+You can build a container image at deploy time by the following code:
+
+```ts
+import { ContainerImageBuild } from 'deploy-time-build;
+
+const image = new ContainerImageBuild(this, 'Build', { 
+    directory: 'example-image', 
+    buildArgs: { DUMMY_FILE_SIZE_MB: '15' },
+    tag: 'my-image-tag',
+});
+new DockerImageFunction(this, 'Function', {
+    code: image.toLambdaDockerImageCode(),
+});
+const armImage = new ContainerImageBuild(this, 'BuildArm', {
+    directory: 'example-image',
+    platform: Platform.LINUX_ARM64,
+    repository: image.repository,
+    zstdCompression: true,
+});
+new FargateTaskDefinition(this, 'TaskDefinition', { 
+    runtimePlatform: { cpuArchitecture: CpuArchitecture.ARM64 } 
+}).addContainer('main', {
+    image: armImage.toEcsDockerImageCode(),
+});
+```
+
+The third argument (props) are the super set of DockerImageAsset's properties. You can additionally set `tag` and `repository`.
+
 ### Build SOCI index for a container image
 [Seekable OCI (SOCI)](https://aws.amazon.com/about-aws/whats-new/2022/09/introducing-seekable-oci-lazy-loading-container-images/) is a way to help start tasks faster for Amazon ECS tasks on Fargate 1.4.0. You can build and push a SOCI index using the `SociIndexBuild` construct.
 
diff --git a/example/example-image/Dockerfile b/example/example-image/Dockerfile
index abcb86c..b2b2647 100644
--- a/example/example-image/Dockerfile
+++ b/example/example-image/Dockerfile
@@ -1,4 +1,4 @@
-FROM nginx:latest
+FROM public.ecr.aws/nginx/nginx:1.26
 # create dummy file to change the size of a image
 ARG DUMMY_FILE_SIZE_MB="10"
 # RUN fallocate -l ${DUMMY_FILE_SIZE_MB} dummy.img
diff --git a/example/index.ts b/example/index.ts
index 2082e6e..bdb509f 100644
--- a/example/index.ts
+++ b/example/index.ts
@@ -1,10 +1,13 @@
 import { Stack, StackProps, App, RemovalPolicy, CfnOutput } from 'aws-cdk-lib';
 import { Construct } from 'constructs';
 import { MockIntegration, RestApi } from 'aws-cdk-lib/aws-apigateway';
-import { NodejsBuild, SociIndexBuild } from '../src/';
+import { ContainerImageBuild, NodejsBuild, SociIndexBuild } from '../src/';
 import { BlockPublicAccess, Bucket, BucketEncryption } from 'aws-cdk-lib/aws-s3';
 import { OriginAccessIdentity, CloudFrontWebDistribution } from 'aws-cdk-lib/aws-cloudfront';
-import { DockerImageAsset } from 'aws-cdk-lib/aws-ecr-assets';
+import { DockerImageAsset, Platform } from 'aws-cdk-lib/aws-ecr-assets';
+import { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';
+import { AwsLogDriver, Cluster, CpuArchitecture, FargateTaskDefinition } from 'aws-cdk-lib/aws-ecs';
+import { SubnetType, Vpc } from 'aws-cdk-lib/aws-ec2';
 
 class NodejsTestStack extends Stack {
   constructor(scope: Construct, id: string, props: StackProps = {}) {
@@ -85,12 +88,46 @@ class SociIndexTestStack extends Stack {
   }
 }
 
+class ContainerImageTestStack extends Stack {
+  constructor(scope: Construct, id: string, props: StackProps = {}) {
+    super(scope, id, props);
+
+    const image = new ContainerImageBuild(this, 'Build', { directory: 'example-image', buildArgs: { DUMMY_FILE_SIZE_MB: '15' } });
+    const armImage = new ContainerImageBuild(this, 'BuildArm', {
+      directory: 'example-image',
+      platform: Platform.LINUX_ARM64,
+      repository: image.repository,
+      zstdCompression: true,
+    });
+    new DockerImageFunction(this, 'Function', {
+      code: image.toLambdaDockerImageCode(),
+    });
+    new Cluster(this, 'Cluster', {
+      vpc: new Vpc(this, 'Vpc', {
+        maxAzs: 1,
+        subnetConfiguration: [
+          {
+            cidrMask: 24,
+            name: 'public',
+            subnetType: SubnetType.PUBLIC,
+          },
+        ],
+      }),
+    });
+    new FargateTaskDefinition(this, 'TaskDefinition', { runtimePlatform: { cpuArchitecture: CpuArchitecture.ARM64 } }).addContainer('main', {
+      image: armImage.toEcsDockerImageCode(),
+      logging: new AwsLogDriver({ streamPrefix: 'main' }),
+    });
+  }
+}
+
 class TestApp extends App {
   constructor() {
     super();
 
     new NodejsTestStack(this, 'NodejsTestStack');
     new SociIndexTestStack(this, 'SociIndexTestStack');
+    new ContainerImageTestStack(this, 'ContainerImageTestStack');
   }
 }
 
diff --git a/lambda/trigger-codebuild/index.ts b/lambda/trigger-codebuild/index.ts
index f1174f2..7e71665 100644
--- a/lambda/trigger-codebuild/index.ts
+++ b/lambda/trigger-codebuild/index.ts
@@ -20,6 +20,24 @@ export const handler = async (event: Event, context: any) => {
   try {
     if (event.RequestType == 'Create' || event.RequestType == 'Update') {
       const props = event.ResourceProperties;
+      const commonEnvironments = [
+        {
+          name: 'responseURL',
+          value: event.ResponseURL,
+        },
+        {
+          name: 'stackId',
+          value: event.StackId,
+        },
+        {
+          name: 'requestId',
+          value: event.RequestId,
+        },
+        {
+          name: 'logicalResourceId',
+          value: event.LogicalResourceId,
+        },
+      ];
 
       let command: StartBuildCommand;
       switch (props.type) {
@@ -27,6 +45,7 @@ export const handler = async (event: Event, context: any) => {
           command = new StartBuildCommand({
             projectName: props.codeBuildProjectName,
             environmentVariablesOverride: [
+              ...commonEnvironments,
               {
                 name: 'input',
                 value: JSON.stringify(
@@ -62,22 +81,6 @@ export const handler = async (event: Event, context: any) => {
                 name: 'projectName',
                 value: props.codeBuildProjectName,
               },
-              {
-                name: 'responseURL',
-                value: event.ResponseURL,
-              },
-              {
-                name: 'stackId',
-                value: event.StackId,
-              },
-              {
-                name: 'requestId',
-                value: event.RequestId,
-              },
-              {
-                name: 'logicalResourceId',
-                value: event.LogicalResourceId,
-              },
               ...Object.entries(props.environment ?? {}).map(([name, value]) => ({
                 name,
                 value,
@@ -89,6 +92,7 @@ export const handler = async (event: Event, context: any) => {
           command = new StartBuildCommand({
             projectName: props.codeBuildProjectName,
             environmentVariablesOverride: [
+              ...commonEnvironments,
               {
                 name: 'repositoryName',
                 value: props.repositoryName,
@@ -101,25 +105,42 @@ export const handler = async (event: Event, context: any) => {
                 name: 'projectName',
                 value: props.codeBuildProjectName,
               },
+            ],
+          });
+          break;
+        case 'ContainerImageBuild': {
+          command = new StartBuildCommand({
+            projectName: props.codeBuildProjectName,
+            environmentVariablesOverride: [
+              ...commonEnvironments,
+              {
+                name: 'repositoryUri',
+                value: props.repositoryUri,
+              },
               {
-                name: 'responseURL',
-                value: event.ResponseURL,
+                name: 'repositoryAuthUri',
+                value: props.repositoryUri.split('/')[0],
               },
               {
-                name: 'stackId',
-                value: event.StackId,
+                name: 'buildCommand',
+                value: props.buildCommand,
               },
               {
-                name: 'requestId',
-                value: event.RequestId,
+                name: 'imageTag',
+                value: props.imageTag,
+              },
+              {
+                name: 'projectName',
+                value: props.codeBuildProjectName,
               },
               {
-                name: 'logicalResourceId',
-                value: event.LogicalResourceId,
+                name: 'sourceS3Url',
+                value: props.sourceS3Url,
               },
             ],
           });
           break;
+        }
         default:
           throw new Error(`invalid event type ${props}}`);
       }
diff --git a/src/container-image-build.ts b/src/container-image-build.ts
new file mode 100644
index 0000000..55031fa
--- /dev/null
+++ b/src/container-image-build.ts
@@ -0,0 +1,278 @@
+import { createHash } from 'crypto';
+import { existsSync, readFileSync } from 'fs';
+import { join } from 'path';
+import { CfnResource, CustomResource, Duration, RemovalPolicy } from 'aws-cdk-lib';
+import { BuildSpec, LinuxBuildImage } from 'aws-cdk-lib/aws-codebuild';
+import { IRepository, Repository } from 'aws-cdk-lib/aws-ecr';
+import { DockerImageAssetProps } from 'aws-cdk-lib/aws-ecr-assets';
+import { ContainerImage } from 'aws-cdk-lib/aws-ecs';
+import { IGrantable, IPrincipal, ManagedPolicy, PolicyStatement } from 'aws-cdk-lib/aws-iam';
+import { Code, DockerImageCode, Runtime, RuntimeFamily, SingletonFunction } from 'aws-cdk-lib/aws-lambda';
+import { Asset } from 'aws-cdk-lib/aws-s3-assets';
+import { Construct } from 'constructs';
+import { SingletonProject } from './singleton-project';
+import { ContainerImageBuildResourceProps } from './types';
+
+export interface ContainerImageBuildProps extends DockerImageAssetProps {
+  /**
+   * The tag when to push the image
+   * @default use assetHash as tag
+   */
+  readonly tag?: string;
+
+  /**
+   * The ECR repository to push the image.
+   * @default create a new ECR repository
+   */
+  readonly repository?: IRepository;
+
+  /**
+   * Use zstd for compressing a container image.
+   * @default false
+   */
+  readonly zstdCompression?: boolean;
+}
+
+/**
+ * Build a container image and push it to an ECR repository on deploy-time.
+ */
+export class ContainerImageBuild extends Construct implements IGrantable {
+  public readonly grantPrincipal: IPrincipal;
+  public readonly repository: IRepository;
+  public readonly imageTag: string;
+
+  constructor(scope: Construct, id: string, private readonly props: ContainerImageBuildProps) {
+    super(scope, id);
+
+    const handler = new SingletonFunction(this, 'CustomResourceHandler', {
+      // Use raw string to avoid from tightening CDK version requirement
+      runtime: new Runtime('nodejs18.x', RuntimeFamily.NODEJS),
+      code: Code.fromAsset(join(__dirname, '../lambda/trigger-codebuild/dist')),
+      handler: 'index.handler',
+      uuid: 'db740fd5-5436-4a84-8a09-e6dfcd01f4f3', // generated for this construct
+      lambdaPurpose: 'DeployTimeBuildCustomResourceHandler',
+      timeout: Duration.minutes(5),
+    });
+
+    // use buildx for cross-platform image build.
+    // because soci-snapshotter currently only supports amd64 environment.
+    // const armImage = LinuxArmBuildImage.fromCodeBuildImageId('aws/codebuild/amazonlinux2-aarch64-standard:3.0');
+    const x64Image = LinuxBuildImage.fromCodeBuildImageId('aws/codebuild/standard:7.0');
+    // const buildImage = props.platform == Platform.LINUX_ARM64 ? armImage : x64Image;
+    const buildImage = x64Image;
+
+    let repository = props.repository;
+    if (repository === undefined) {
+      repository = new Repository(this, 'Repository', { removalPolicy: RemovalPolicy.DESTROY });
+      (repository.node.defaultChild as CfnResource).addPropertyOverride('EmptyOnDelete', true);
+    }
+
+    const project = new SingletonProject(this, 'Project', {
+      uuid: 'e83729fe-b156-4e70-9bec-452b15847a30',
+      projectPurpose: 'ContainerImageBuildAmd64',
+      environment: {
+        buildImage: buildImage,
+        privileged: true,
+      },
+      buildSpec: BuildSpec.fromObject({
+        version: '0.2',
+        phases: {
+          build: {
+            commands: [
+              'current_dir=$(pwd)',
+              'echo "$input"',
+              'mkdir workdir',
+              'cd workdir',
+              'aws s3 cp "$sourceS3Url" temp.zip',
+              'unzip temp.zip',
+              'ls -la',
+              'aws ecr get-login-password | docker login --username AWS --password-stdin $repositoryAuthUri',
+              'aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws',
+              'docker buildx create --use',
+              'docker buildx ls',
+              'eval "$buildCommand"',
+            ],
+          },
+          post_build: {
+            commands: [
+              'echo Build completed on `date`',
+              `
+STATUS='SUCCESS'
+if [ $CODEBUILD_BUILD_SUCCEEDING -ne 1 ] # Test if the build is failing
+then
+STATUS='FAILED'
+REASON="ContainerImageBuild failed. See CloudWatch Log stream for the detailed reason: 
+https://$AWS_REGION.console.aws.amazon.com/cloudwatch/home?region=$AWS_REGION#logsV2:log-groups/log-group/\\$252Faws\\$252Fcodebuild\\$252F$projectName/log-events/$CODEBUILD_LOG_PATH"
+fi
+cat <<EOF > payload.json
+{
+  "StackId": "$stackId",
+  "RequestId": "$requestId",
+  "LogicalResourceId":"$logicalResourceId",
+  "PhysicalResourceId": "$imageTag",
+  "Status": "$STATUS",
+  "Reason": "$REASON",
+  "Data": {
+    "ImageTag": "$imageTag"
+  }
+}
+EOF
+curl -v -i -X PUT -H 'Content-Type:' -d "@payload.json" "$responseURL"
+              `,
+            ],
+          },
+        },
+      }),
+    }).project;
+
+    project.role!.addManagedPolicy(ManagedPolicy.fromAwsManagedPolicyName('AmazonElasticContainerRegistryPublicReadOnly'));
+    repository.grantPullPush(project);
+    repository.grant(project, 'ecr:DescribeImages');
+
+    handler.addToRolePolicy(
+      new PolicyStatement({
+        actions: ['codebuild:StartBuild'],
+        resources: [project.projectArn],
+      }),
+    );
+
+    this.grantPrincipal = project.grantPrincipal;
+
+    let assetExclude = props.exclude;
+    // automatically read .dockerignore for convenience
+    if (assetExclude === undefined && existsSync(join(props.directory, '.dockerignore'))) {
+      assetExclude = readFileSync(join(props.directory, '.dockerignore')).toString().split('\n');
+    }
+    const asset = new Asset(this, 'Source', {
+      ...props,
+      exclude: assetExclude,
+      path: props.directory,
+    });
+    asset.grantRead(project);
+
+    const imageTag = props.tag ?? this.getImageHash(asset.assetHash, props);
+    const buildCommandOptions = { ...props, tag: imageTag, platform: props.platform?.platform } as any;
+    buildCommandOptions.outputs ??= [];
+    // to enable zstd compression, buildx directly pushes the artifact image to a registry
+    // https://aws.amazon.com/blogs/containers/reducing-aws-fargate-startup-times-with-zstd-compressed-container-images/
+    buildCommandOptions.outputs.push('type=image', `name=${repository.repositoryUri}:${imageTag}`, 'push=true');
+    if (props.zstdCompression) {
+      buildCommandOptions.outputs.push('oci-mediatypes=true', 'compression=zstd', 'force-compression=true', 'compression-level=3');
+    }
+    const buildCommand = this.getDockerBuildCommand(buildCommandOptions);
+
+    const properties: ContainerImageBuildResourceProps = {
+      type: 'ContainerImageBuild',
+      buildCommand: buildCommand,
+      repositoryUri: repository.repositoryUri,
+      imageTag,
+      codeBuildProjectName: project.projectName,
+      sourceS3Url: asset.s3ObjectUrl,
+    };
+
+    const custom = new CustomResource(this, 'Resource', {
+      serviceToken: handler.functionArn,
+      resourceType: 'Custom::CDKContainerImageBuild',
+      properties,
+    });
+
+    this.repository = repository;
+    this.imageTag = custom.getAttString('ImageTag');
+  }
+
+  /**
+   * Get the instance of {@link DockerImageCode} for a Lambda function image.
+   */
+  public toLambdaDockerImageCode() {
+    if (this.props.zstdCompression) {
+      throw new Error('You cannot enable zstdCompression for a Lambda image.');
+    }
+    return DockerImageCode.fromEcr(this.repository, { tagOrDigest: this.imageTag });
+  }
+
+  /**
+   * Get the instance of {@link ContainerImage} for an ECS task definition.
+   */
+  public toEcsDockerImageCode() {
+    return ContainerImage.fromEcrRepository(this.repository, this.imageTag);
+  }
+
+  private getImageHash(assetHash: string, props: any) {
+    const extraHash: { [field: string]: any } = {};
+    if (props.invalidation?.extraHash !== false && props.extraHash) {
+      extraHash.user = props.extraHash;
+    }
+    if (props.invalidation?.buildArgs !== false && props.buildArgs) {
+      extraHash.buildArgs = props.buildArgs;
+    }
+    if (props.invalidation?.buildSecrets !== false && props.buildSecrets) {
+      extraHash.buildSecrets = props.buildSecrets;
+    }
+    if (props.invalidation?.buildSsh !== false && props.buildSsh) {
+      extraHash.buildSsh = props.buildSsh;
+    }
+    if (props.invalidation?.target !== false && props.target) {
+      extraHash.target = props.target;
+    }
+    if (props.invalidation?.file !== false && props.file) {
+      extraHash.file = props.file;
+    }
+    if (props.invalidation?.repositoryName !== false && props.repositoryName) {
+      extraHash.repositoryName = props.repositoryName;
+    }
+    if (props.invalidation?.networkMode !== false && props.networkMode) {
+      extraHash.networkMode = props.networkMode;
+    }
+    if (props.invalidation?.platform !== false && props.platform) {
+      extraHash.platform = props.platform.platform;
+    }
+    if (props.invalidation?.outputs !== false && props.outputs) {
+      extraHash.outputs = props.outputs;
+    }
+    if (props.zstdCompression) {
+      extraHash.zstdCompression = props.zstdCompression;
+    }
+    return createHash('md5')
+      .update(assetHash + JSON.stringify(extraHash))
+      .digest('hex');
+  }
+
+  private getDockerBuildCommand(options: any) {
+    // the members of props differs with CDK version.
+    // By regarding props as any, we can use props that are not available in older cdk versions.
+
+    // logic is copied from packages/cdk-assets/lib/private/docker.ts
+    const cacheOptionToFlag = (option: any): string => {
+      let flag = `type=${option.type}`;
+      if (option.params) {
+        flag +=
+          ',' +
+          Object.entries(option.params)
+            .map(([k, v]) => `${k}=${v}`)
+            .join(',');
+      }
+      return flag;
+    };
+    const flatten = (x: string[][]) => {
+      return Array.prototype.concat([], ...x);
+    };
+
+    const dockerBuildCommand = [
+      'docker buildx build',
+      ...flatten(Object.entries(options.buildArgs || {}).map(([k, v]) => ['--build-arg', `${k}=${v}`])),
+      ...flatten(Object.entries(options.buildSecrets || {}).map(([k, v]) => ['--secret', `id=${k},${v}`])),
+      ...(options.buildSsh ? ['--ssh', options.buildSsh] : []),
+      ...(options.target ? ['--target', options.target] : []),
+      ...(options.file ? ['--file', options.file] : []),
+      ...(options.networkMode ? ['--network', options.networkMode] : []),
+      ...(options.platform ? ['--platform', options.platform] : []),
+      ...(options.outputs ? ['--output', options.outputs.join(',')] : []),
+      ...(options.cacheFrom ? [...options.cacheFrom.map((cacheFrom: any) => ['--cache-from', cacheOptionToFlag(cacheFrom)]).flat()] : []),
+      ...(options.cacheTo ? ['--cache-to', cacheOptionToFlag(options.cacheTo)] : []),
+      ...(options.cacheDisabled ? ['--no-cache'] : []),
+      '--provenance=false',
+      '.',
+    ];
+    return dockerBuildCommand.join(' ');
+  }
+}
diff --git a/src/index.ts b/src/index.ts
index 47dfdc4..c4cc0b9 100644
--- a/src/index.ts
+++ b/src/index.ts
@@ -1,2 +1,3 @@
+export * from './container-image-build';
 export * from './nodejs-build';
 export * from './soci-index-build';
diff --git a/src/singleton-project.ts b/src/singleton-project.ts
index 784fe5c..39f3e1d 100644
--- a/src/singleton-project.ts
+++ b/src/singleton-project.ts
@@ -13,7 +13,7 @@ export interface SingletonProjectProps extends ProjectProps {
   /**
    * A descriptive name for the purpose of this CodeBuild project.
    *
-   * If the project does not have a physical name, this string will be reflected its generated name. The combination of lambdaPurpose and uuid must be unique.
+   * If the project does not have a physical name, this string will be reflected its generated name. The combination of projectPurpose and uuid must be unique.
    *
    * @default SingletonProject
    */
diff --git a/src/types.ts b/src/types.ts
index 2383c71..9e9b007 100644
--- a/src/types.ts
+++ b/src/types.ts
@@ -1,4 +1,4 @@
-export type ResourceProperties = NodejsBuildResourceProps | SociIndexBuildResourceProps;
+export type ResourceProperties = NodejsBuildResourceProps | SociIndexBuildResourceProps | ContainerImageBuildResourceProps;
 
 export type NodejsBuildResourceProps = {
   type: 'NodejsBuild';
@@ -22,3 +22,12 @@ export type SociIndexBuildResourceProps = {
   imageTag: string;
   codeBuildProjectName: string;
 };
+
+export type ContainerImageBuildResourceProps = {
+  type: 'ContainerImageBuild';
+  buildCommand: string;
+  repositoryUri: string;
+  imageTag: string;
+  codeBuildProjectName: string;
+  sourceS3Url: string;
+};


Test patch:
diff --git a/test/container-image-build.integ.snapshot/ContainerImageBuildIntegTest.template.json b/test/container-image-build.integ.snapshot/ContainerImageBuildIntegTest.template.json
new file mode 100644
index 0000000..5a61885
--- /dev/null
+++ b/test/container-image-build.integ.snapshot/ContainerImageBuildIntegTest.template.json
@@ -0,0 +1,1109 @@
+{
+ "Resources": {
+  "BuildRepository4E6D17C2": {
+   "Type": "AWS::ECR::Repository",
+   "Properties": {
+    "RepositoryPolicyText": {
+     "Statement": [
+      {
+       "Action": [
+        "ecr:BatchCheckLayerAvailability",
+        "ecr:BatchGetImage",
+        "ecr:GetDownloadUrlForLayer"
+       ],
+       "Effect": "Allow",
+       "Principal": {
+        "Service": "lambda.amazonaws.com"
+       }
+      }
+     ],
+     "Version": "2012-10-17"
+    },
+    "EmptyOnDelete": true
+   },
+   "UpdateReplacePolicy": "Delete",
+   "DeletionPolicy": "Delete"
+  },
+  "Build45A36621": {
+   "Type": "Custom::CDKContainerImageBuild",
+   "Properties": {
+    "ServiceToken": {
+     "Fn::GetAtt": [
+      "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f306AEFF37",
+      "Arn"
+     ]
+    },
+    "type": "ContainerImageBuild",
+    "buildCommand": {
+     "Fn::Join": [
+      "",
+      [
+       "docker buildx build --build-arg DUMMY_FILE_SIZE_MB=15 --output type=image,name=",
+       {
+        "Fn::Select": [
+         4,
+         {
+          "Fn::Split": [
+           ":",
+           {
+            "Fn::GetAtt": [
+             "BuildRepository4E6D17C2",
+             "Arn"
+            ]
+           }
+          ]
+         }
+        ]
+       },
+       ".dkr.ecr.",
+       {
+        "Fn::Select": [
+         3,
+         {
+          "Fn::Split": [
+           ":",
+           {
+            "Fn::GetAtt": [
+             "BuildRepository4E6D17C2",
+             "Arn"
+            ]
+           }
+          ]
+         }
+        ]
+       },
+       ".",
+       {
+        "Ref": "AWS::URLSuffix"
+       },
+       "/",
+       {
+        "Ref": "BuildRepository4E6D17C2"
+       },
+       ":0cb4b8f0df7fe44ecbf1d4d1bb949c3c,push=true --provenance=false ."
+      ]
+     ]
+    },
+    "repositoryUri": {
+     "Fn::Join": [
+      "",
+      [
+       {
+        "Fn::Select": [
+         4,
+         {
+          "Fn::Split": [
+           ":",
+           {
+            "Fn::GetAtt": [
+             "BuildRepository4E6D17C2",
+             "Arn"
+            ]
+           }
+          ]
+         }
+        ]
+       },
+       ".dkr.ecr.",
+       {
+        "Fn::Select": [
+         3,
+         {
+          "Fn::Split": [
+           ":",
+           {
+            "Fn::GetAtt": [
+             "BuildRepository4E6D17C2",
+             "Arn"
+            ]
+           }
+          ]
+         }
+        ]
+       },
+       ".",
+       {
+        "Ref": "AWS::URLSuffix"
+       },
+       "/",
+       {
+        "Ref": "BuildRepository4E6D17C2"
+       }
+      ]
+     ]
+    },
+    "imageTag": "0cb4b8f0df7fe44ecbf1d4d1bb949c3c",
+    "codeBuildProjectName": {
+     "Ref": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30F1D2BABB"
+    },
+    "sourceS3Url": {
+     "Fn::Join": [
+      "",
+      [
+       "s3://",
+       {
+        "Ref": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3Bucket1FF22598"
+       },
+       "/",
+       {
+        "Fn::Select": [
+         0,
+         {
+          "Fn::Split": [
+           "||",
+           {
+            "Ref": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3VersionKey681A3270"
+           }
+          ]
+         }
+        ]
+       },
+       {
+        "Fn::Select": [
+         1,
+         {
+          "Fn::Split": [
+           "||",
+           {
+            "Ref": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3VersionKey681A3270"
+           }
+          ]
+         }
+        ]
+       }
+      ]
+     ]
+    }
+   },
+   "UpdateReplacePolicy": "Delete",
+   "DeletionPolicy": "Delete"
+  },
+  "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3ServiceRoleB008BAA4": {
+   "Type": "AWS::IAM::Role",
+   "Properties": {
+    "AssumeRolePolicyDocument": {
+     "Statement": [
+      {
+       "Action": "sts:AssumeRole",
+       "Effect": "Allow",
+       "Principal": {
+        "Service": "lambda.amazonaws.com"
+       }
+      }
+     ],
+     "Version": "2012-10-17"
+    },
+    "ManagedPolicyArns": [
+     {
+      "Fn::Join": [
+       "",
+       [
+        "arn:",
+        {
+         "Ref": "AWS::Partition"
+        },
+        ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+       ]
+      ]
+     }
+    ]
+   }
+  },
+  "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3ServiceRoleDefaultPolicyFECC51DC": {
+   "Type": "AWS::IAM::Policy",
+   "Properties": {
+    "PolicyDocument": {
+     "Statement": [
+      {
+       "Action": "codebuild:StartBuild",
+       "Effect": "Allow",
+       "Resource": {
+        "Fn::GetAtt": [
+         "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30F1D2BABB",
+         "Arn"
+        ]
+       }
+      }
+     ],
+     "Version": "2012-10-17"
+    },
+    "PolicyName": "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3ServiceRoleDefaultPolicyFECC51DC",
+    "Roles": [
+     {
+      "Ref": "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3ServiceRoleB008BAA4"
+     }
+    ]
+   }
+  },
+  "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f306AEFF37": {
+   "Type": "AWS::Lambda::Function",
+   "Properties": {
+    "Code": {
+     "S3Bucket": {
+      "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC"
+     },
+     "S3Key": {
+      "Fn::Join": [
+       "",
+       [
+        {
+         "Fn::Select": [
+          0,
+          {
+           "Fn::Split": [
+            "||",
+            {
+             "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
+            }
+           ]
+          }
+         ]
+        },
+        {
+         "Fn::Select": [
+          1,
+          {
+           "Fn::Split": [
+            "||",
+            {
+             "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
+            }
+           ]
+          }
+         ]
+        }
+       ]
+      ]
+     }
+    },
+    "Role": {
+     "Fn::GetAtt": [
+      "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3ServiceRoleB008BAA4",
+      "Arn"
+     ]
+    },
+    "Handler": "index.handler",
+    "Runtime": "nodejs18.x",
+    "Timeout": 300
+   },
+   "DependsOn": [
+    "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3ServiceRoleDefaultPolicyFECC51DC",
+    "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3ServiceRoleB008BAA4"
+   ]
+  },
+  "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30RoleB1437276": {
+   "Type": "AWS::IAM::Role",
+   "Properties": {
+    "AssumeRolePolicyDocument": {
+     "Statement": [
+      {
+       "Action": "sts:AssumeRole",
+       "Effect": "Allow",
+       "Principal": {
+        "Service": "codebuild.amazonaws.com"
+       }
+      }
+     ],
+     "Version": "2012-10-17"
+    },
+    "ManagedPolicyArns": [
+     {
+      "Fn::Join": [
+       "",
+       [
+        "arn:",
+        {
+         "Ref": "AWS::Partition"
+        },
+        ":iam::aws:policy/AmazonElasticContainerRegistryPublicReadOnly"
+       ]
+      ]
+     }
+    ]
+   }
+  },
+  "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30RoleDefaultPolicy9F1BA63A": {
+   "Type": "AWS::IAM::Policy",
+   "Properties": {
+    "PolicyDocument": {
+     "Statement": [
+      {
+       "Action": [
+        "logs:CreateLogGroup",
+        "logs:CreateLogStream",
+        "logs:PutLogEvents"
+       ],
+       "Effect": "Allow",
+       "Resource": [
+        {
+         "Fn::Join": [
+          "",
+          [
+           "arn:",
+           {
+            "Ref": "AWS::Partition"
+           },
+           ":logs:",
+           {
+            "Ref": "AWS::Region"
+           },
+           ":",
+           {
+            "Ref": "AWS::AccountId"
+           },
+           ":log-group:/aws/codebuild/",
+           {
+            "Ref": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30F1D2BABB"
+           },
+           ":*"
+          ]
+         ]
+        },
+        {
+         "Fn::Join": [
+          "",
+          [
+           "arn:",
+           {
+            "Ref": "AWS::Partition"
+           },
+           ":logs:",
+           {
+            "Ref": "AWS::Region"
+           },
+           ":",
+           {
+            "Ref": "AWS::AccountId"
+           },
+           ":log-group:/aws/codebuild/",
+           {
+            "Ref": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30F1D2BABB"
+           }
+          ]
+         ]
+        }
+       ]
+      },
+      {
+       "Action": [
+        "codebuild:BatchPutCodeCoverages",
+        "codebuild:BatchPutTestCases",
+        "codebuild:CreateReport",
+        "codebuild:CreateReportGroup",
+        "codebuild:UpdateReport"
+       ],
+       "Effect": "Allow",
+       "Resource": {
+        "Fn::Join": [
+         "",
+         [
+          "arn:",
+          {
+           "Ref": "AWS::Partition"
+          },
+          ":codebuild:",
+          {
+           "Ref": "AWS::Region"
+          },
+          ":",
+          {
+           "Ref": "AWS::AccountId"
+          },
+          ":report-group/",
+          {
+           "Ref": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30F1D2BABB"
+          },
+          "-*"
+         ]
+        ]
+       }
+      },
+      {
+       "Action": [
+        "ecr:BatchCheckLayerAvailability",
+        "ecr:BatchGetImage",
+        "ecr:CompleteLayerUpload",
+        "ecr:DescribeImages",
+        "ecr:GetDownloadUrlForLayer",
+        "ecr:InitiateLayerUpload",
+        "ecr:PutImage",
+        "ecr:UploadLayerPart"
+       ],
+       "Effect": "Allow",
+       "Resource": {
+        "Fn::GetAtt": [
+         "BuildRepository4E6D17C2",
+         "Arn"
+        ]
+       }
+      },
+      {
+       "Action": "ecr:GetAuthorizationToken",
+       "Effect": "Allow",
+       "Resource": "*"
+      },
+      {
+       "Action": [
+        "s3:GetBucket*",
+        "s3:GetObject*",
+        "s3:List*"
+       ],
+       "Effect": "Allow",
+       "Resource": [
+        {
+         "Fn::Join": [
+          "",
+          [
+           "arn:",
+           {
+            "Ref": "AWS::Partition"
+           },
+           ":s3:::",
+           {
+            "Ref": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3Bucket1FF22598"
+           },
+           "/*"
+          ]
+         ]
+        },
+        {
+         "Fn::Join": [
+          "",
+          [
+           "arn:",
+           {
+            "Ref": "AWS::Partition"
+           },
+           ":s3:::",
+           {
+            "Ref": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3Bucket1FF22598"
+           }
+          ]
+         ]
+        }
+       ]
+      }
+     ],
+     "Version": "2012-10-17"
+    },
+    "PolicyName": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30RoleDefaultPolicy9F1BA63A",
+    "Roles": [
+     {
+      "Ref": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30RoleB1437276"
+     }
+    ]
+   }
+  },
+  "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30F1D2BABB": {
+   "Type": "AWS::CodeBuild::Project",
+   "Properties": {
+    "Artifacts": {
+     "Type": "NO_ARTIFACTS"
+    },
+    "Environment": {
+     "ComputeType": "BUILD_GENERAL1_SMALL",
+     "Image": "aws/codebuild/standard:7.0",
+     "ImagePullCredentialsType": "CODEBUILD",
+     "PrivilegedMode": true,
+     "Type": "LINUX_CONTAINER"
+    },
+    "ServiceRole": {
+     "Fn::GetAtt": [
+      "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30RoleB1437276",
+      "Arn"
+     ]
+    },
+    "Source": {
+     "BuildSpec": "{\n  \"version\": \"0.2\",\n  \"phases\": {\n    \"build\": {\n      \"commands\": [\n        \"current_dir=$(pwd)\",\n        \"echo \\\"$input\\\"\",\n        \"mkdir workdir\",\n        \"cd workdir\",\n        \"aws s3 cp \\\"$sourceS3Url\\\" temp.zip\",\n        \"unzip temp.zip\",\n        \"ls -la\",\n        \"aws ecr get-login-password | docker login --username AWS --password-stdin $repositoryAuthUri\",\n        \"aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws\",\n        \"docker buildx create --use\",\n        \"docker buildx ls\",\n        \"eval \\\"$buildCommand\\\"\"\n      ]\n    },\n    \"post_build\": {\n      \"commands\": [\n        \"echo Build completed on `date`\",\n        \"\\nSTATUS='SUCCESS'\\nif [ $CODEBUILD_BUILD_SUCCEEDING -ne 1 ] # Test if the build is failing\\nthen\\nSTATUS='FAILED'\\nREASON=\\\"ContainerImageBuild failed. See CloudWatch Log stream for the detailed reason: \\nhttps://$AWS_REGION.console.aws.amazon.com/cloudwatch/home?region=$AWS_REGION#logsV2:log-groups/log-group/\\\\$252Faws\\\\$252Fcodebuild\\\\$252F$projectName/log-events/$CODEBUILD_LOG_PATH\\\"\\nfi\\ncat <<EOF > payload.json\\n{\\n  \\\"StackId\\\": \\\"$stackId\\\",\\n  \\\"RequestId\\\": \\\"$requestId\\\",\\n  \\\"LogicalResourceId\\\":\\\"$logicalResourceId\\\",\\n  \\\"PhysicalResourceId\\\": \\\"$imageTag\\\",\\n  \\\"Status\\\": \\\"$STATUS\\\",\\n  \\\"Reason\\\": \\\"$REASON\\\",\\n  \\\"Data\\\": {\\n    \\\"ImageTag\\\": \\\"$imageTag\\\"\\n  }\\n}\\nEOF\\ncurl -v -i -X PUT -H 'Content-Type:' -d \\\"@payload.json\\\" \\\"$responseURL\\\"\\n              \"\n      ]\n    }\n  }\n}",
+     "Type": "NO_SOURCE"
+    },
+    "Cache": {
+     "Type": "NO_CACHE"
+    },
+    "EncryptionKey": "alias/aws/s3"
+   }
+  },
+  "BuildArmF8ABF624": {
+   "Type": "Custom::CDKContainerImageBuild",
+   "Properties": {
+    "ServiceToken": {
+     "Fn::GetAtt": [
+      "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f306AEFF37",
+      "Arn"
+     ]
+    },
+    "type": "ContainerImageBuild",
+    "buildCommand": {
+     "Fn::Join": [
+      "",
+      [
+       "docker buildx build --platform linux/arm64 --output type=image,name=",
+       {
+        "Fn::Select": [
+         4,
+         {
+          "Fn::Split": [
+           ":",
+           {
+            "Fn::GetAtt": [
+             "BuildRepository4E6D17C2",
+             "Arn"
+            ]
+           }
+          ]
+         }
+        ]
+       },
+       ".dkr.ecr.",
+       {
+        "Fn::Select": [
+         3,
+         {
+          "Fn::Split": [
+           ":",
+           {
+            "Fn::GetAtt": [
+             "BuildRepository4E6D17C2",
+             "Arn"
+            ]
+           }
+          ]
+         }
+        ]
+       },
+       ".",
+       {
+        "Ref": "AWS::URLSuffix"
+       },
+       "/",
+       {
+        "Ref": "BuildRepository4E6D17C2"
+       },
+       ":ca38901771f07ed68abee97d650d90e0,push=true,oci-mediatypes=true,compression=zstd,force-compression=true,compression-level=3 --provenance=false ."
+      ]
+     ]
+    },
+    "repositoryUri": {
+     "Fn::Join": [
+      "",
+      [
+       {
+        "Fn::Select": [
+         4,
+         {
+          "Fn::Split": [
+           ":",
+           {
+            "Fn::GetAtt": [
+             "BuildRepository4E6D17C2",
+             "Arn"
+            ]
+           }
+          ]
+         }
+        ]
+       },
+       ".dkr.ecr.",
+       {
+        "Fn::Select": [
+         3,
+         {
+          "Fn::Split": [
+           ":",
+           {
+            "Fn::GetAtt": [
+             "BuildRepository4E6D17C2",
+             "Arn"
+            ]
+           }
+          ]
+         }
+        ]
+       },
+       ".",
+       {
+        "Ref": "AWS::URLSuffix"
+       },
+       "/",
+       {
+        "Ref": "BuildRepository4E6D17C2"
+       }
+      ]
+     ]
+    },
+    "imageTag": "ca38901771f07ed68abee97d650d90e0",
+    "codeBuildProjectName": {
+     "Ref": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30F1D2BABB"
+    },
+    "sourceS3Url": {
+     "Fn::Join": [
+      "",
+      [
+       "s3://",
+       {
+        "Ref": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3Bucket1FF22598"
+       },
+       "/",
+       {
+        "Fn::Select": [
+         0,
+         {
+          "Fn::Split": [
+           "||",
+           {
+            "Ref": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3VersionKey681A3270"
+           }
+          ]
+         }
+        ]
+       },
+       {
+        "Fn::Select": [
+         1,
+         {
+          "Fn::Split": [
+           "||",
+           {
+            "Ref": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3VersionKey681A3270"
+           }
+          ]
+         }
+        ]
+       }
+      ]
+     ]
+    }
+   },
+   "UpdateReplacePolicy": "Delete",
+   "DeletionPolicy": "Delete"
+  },
+  "FunctionServiceRole675BB04A": {
+   "Type": "AWS::IAM::Role",
+   "Properties": {
+    "AssumeRolePolicyDocument": {
+     "Statement": [
+      {
+       "Action": "sts:AssumeRole",
+       "Effect": "Allow",
+       "Principal": {
+        "Service": "lambda.amazonaws.com"
+       }
+      }
+     ],
+     "Version": "2012-10-17"
+    },
+    "ManagedPolicyArns": [
+     {
+      "Fn::Join": [
+       "",
+       [
+        "arn:",
+        {
+         "Ref": "AWS::Partition"
+        },
+        ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+       ]
+      ]
+     }
+    ]
+   }
+  },
+  "Function76856677": {
+   "Type": "AWS::Lambda::Function",
+   "Properties": {
+    "Code": {
+     "ImageUri": {
+      "Fn::Join": [
+       "",
+       [
+        {
+         "Fn::Select": [
+          4,
+          {
+           "Fn::Split": [
+            ":",
+            {
+             "Fn::GetAtt": [
+              "BuildRepository4E6D17C2",
+              "Arn"
+             ]
+            }
+           ]
+          }
+         ]
+        },
+        ".dkr.ecr.",
+        {
+         "Fn::Select": [
+          3,
+          {
+           "Fn::Split": [
+            ":",
+            {
+             "Fn::GetAtt": [
+              "BuildRepository4E6D17C2",
+              "Arn"
+             ]
+            }
+           ]
+          }
+         ]
+        },
+        ".",
+        {
+         "Ref": "AWS::URLSuffix"
+        },
+        "/",
+        {
+         "Ref": "BuildRepository4E6D17C2"
+        },
+        ":",
+        {
+         "Fn::GetAtt": [
+          "Build45A36621",
+          "ImageTag"
+         ]
+        }
+       ]
+      ]
+     }
+    },
+    "Role": {
+     "Fn::GetAtt": [
+      "FunctionServiceRole675BB04A",
+      "Arn"
+     ]
+    },
+    "PackageType": "Image"
+   },
+   "DependsOn": [
+    "FunctionServiceRole675BB04A"
+   ]
+  },
+  "Vpc8378EB38": {
+   "Type": "AWS::EC2::VPC",
+   "Properties": {
+    "CidrBlock": "10.0.0.0/16",
+    "EnableDnsHostnames": true,
+    "EnableDnsSupport": true,
+    "InstanceTenancy": "default",
+    "Tags": [
+     {
+      "Key": "Name",
+      "Value": "ContainerImageBuildIntegTest/Vpc"
+     }
+    ]
+   }
+  },
+  "VpcpublicSubnet1Subnet2BB74ED7": {
+   "Type": "AWS::EC2::Subnet",
+   "Properties": {
+    "VpcId": {
+     "Ref": "Vpc8378EB38"
+    },
+    "AvailabilityZone": {
+     "Fn::Select": [
+      0,
+      {
+       "Fn::GetAZs": ""
+      }
+     ]
+    },
+    "CidrBlock": "10.0.0.0/24",
+    "MapPublicIpOnLaunch": true,
+    "Tags": [
+     {
+      "Key": "aws-cdk:subnet-name",
+      "Value": "public"
+     },
+     {
+      "Key": "aws-cdk:subnet-type",
+      "Value": "Public"
+     },
+     {
+      "Key": "Name",
+      "Value": "ContainerImageBuildIntegTest/Vpc/publicSubnet1"
+     }
+    ]
+   }
+  },
+  "VpcpublicSubnet1RouteTable15C15F8E": {
+   "Type": "AWS::EC2::RouteTable",
+   "Properties": {
+    "VpcId": {
+     "Ref": "Vpc8378EB38"
+    },
+    "Tags": [
+     {
+      "Key": "Name",
+      "Value": "ContainerImageBuildIntegTest/Vpc/publicSubnet1"
+     }
+    ]
+   }
+  },
+  "VpcpublicSubnet1RouteTableAssociation4E83B6E4": {
+   "Type": "AWS::EC2::SubnetRouteTableAssociation",
+   "Properties": {
+    "RouteTableId": {
+     "Ref": "VpcpublicSubnet1RouteTable15C15F8E"
+    },
+    "SubnetId": {
+     "Ref": "VpcpublicSubnet1Subnet2BB74ED7"
+    }
+   }
+  },
+  "VpcpublicSubnet1DefaultRouteB88F9E93": {
+   "Type": "AWS::EC2::Route",
+   "Properties": {
+    "RouteTableId": {
+     "Ref": "VpcpublicSubnet1RouteTable15C15F8E"
+    },
+    "DestinationCidrBlock": "0.0.0.0/0",
+    "GatewayId": {
+     "Ref": "VpcIGWD7BA715C"
+    }
+   },
+   "DependsOn": [
+    "VpcVPCGWBF912B6E"
+   ]
+  },
+  "VpcIGWD7BA715C": {
+   "Type": "AWS::EC2::InternetGateway",
+   "Properties": {
+    "Tags": [
+     {
+      "Key": "Name",
+      "Value": "ContainerImageBuildIntegTest/Vpc"
+     }
+    ]
+   }
+  },
+  "VpcVPCGWBF912B6E": {
+   "Type": "AWS::EC2::VPCGatewayAttachment",
+   "Properties": {
+    "VpcId": {
+     "Ref": "Vpc8378EB38"
+    },
+    "InternetGatewayId": {
+     "Ref": "VpcIGWD7BA715C"
+    }
+   }
+  },
+  "ClusterEB0386A7": {
+   "Type": "AWS::ECS::Cluster"
+  },
+  "TaskDefinitionTaskRoleFD40A61D": {
+   "Type": "AWS::IAM::Role",
+   "Properties": {
+    "AssumeRolePolicyDocument": {
+     "Statement": [
+      {
+       "Action": "sts:AssumeRole",
+       "Effect": "Allow",
+       "Principal": {
+        "Service": "ecs-tasks.amazonaws.com"
+       }
+      }
+     ],
+     "Version": "2012-10-17"
+    }
+   }
+  },
+  "TaskDefinitionB36D86D9": {
+   "Type": "AWS::ECS::TaskDefinition",
+   "Properties": {
+    "ContainerDefinitions": [
+     {
+      "Essential": true,
+      "Image": {
+       "Fn::Join": [
+        "",
+        [
+         {
+          "Fn::Select": [
+           4,
+           {
+            "Fn::Split": [
+             ":",
+             {
+              "Fn::GetAtt": [
+               "BuildRepository4E6D17C2",
+               "Arn"
+              ]
+             }
+            ]
+           }
+          ]
+         },
+         ".dkr.ecr.",
+         {
+          "Fn::Select": [
+           3,
+           {
+            "Fn::Split": [
+             ":",
+             {
+              "Fn::GetAtt": [
+               "BuildRepository4E6D17C2",
+               "Arn"
+              ]
+             }
+            ]
+           }
+          ]
+         },
+         ".",
+         {
+          "Ref": "AWS::URLSuffix"
+         },
+         "/",
+         {
+          "Ref": "BuildRepository4E6D17C2"
+         },
+         ":",
+         {
+          "Fn::GetAtt": [
+           "BuildArmF8ABF624",
+           "ImageTag"
+          ]
+         }
+        ]
+       ]
+      },
+      "LogConfiguration": {
+       "LogDriver": "awslogs",
+       "Options": {
+        "awslogs-group": {
+         "Ref": "TaskDefinitionmainLogGroup2F2AC027"
+        },
+        "awslogs-stream-prefix": "main",
+        "awslogs-region": {
+         "Ref": "AWS::Region"
+        }
+       }
+      },
+      "Name": "main"
+     }
+    ],
+    "Cpu": "256",
+    "ExecutionRoleArn": {
+     "Fn::GetAtt": [
+      "TaskDefinitionExecutionRole8D61C2FB",
+      "Arn"
+     ]
+    },
+    "Family": "ContainerImageBuildIntegTestTaskDefinition119492A3",
+    "Memory": "512",
+    "NetworkMode": "awsvpc",
+    "RequiresCompatibilities": [
+     "FARGATE"
+    ],
+    "RuntimePlatform": {
+     "CpuArchitecture": "ARM64"
+    },
+    "TaskRoleArn": {
+     "Fn::GetAtt": [
+      "TaskDefinitionTaskRoleFD40A61D",
+      "Arn"
+     ]
+    }
+   }
+  },
+  "TaskDefinitionmainLogGroup2F2AC027": {
+   "Type": "AWS::Logs::LogGroup",
+   "UpdateReplacePolicy": "Retain",
+   "DeletionPolicy": "Retain"
+  },
+  "TaskDefinitionExecutionRole8D61C2FB": {
+   "Type": "AWS::IAM::Role",
+   "Properties": {
+    "AssumeRolePolicyDocument": {
+     "Statement": [
+      {
+       "Action": "sts:AssumeRole",
+       "Effect": "Allow",
+       "Principal": {
+        "Service": "ecs-tasks.amazonaws.com"
+       }
+      }
+     ],
+     "Version": "2012-10-17"
+    }
+   }
+  },
+  "TaskDefinitionExecutionRoleDefaultPolicy1F3406F5": {
+   "Type": "AWS::IAM::Policy",
+   "Properties": {
+    "PolicyDocument": {
+     "Statement": [
+      {
+       "Action": [
+        "ecr:BatchCheckLayerAvailability",
+        "ecr:BatchGetImage",
+        "ecr:GetDownloadUrlForLayer"
+       ],
+       "Effect": "Allow",
+       "Resource": {
+        "Fn::GetAtt": [
+         "BuildRepository4E6D17C2",
+         "Arn"
+        ]
+       }
+      },
+      {
+       "Action": "ecr:GetAuthorizationToken",
+       "Effect": "Allow",
+       "Resource": "*"
+      },
+      {
+       "Action": [
+        "logs:CreateLogStream",
+        "logs:PutLogEvents"
+       ],
+       "Effect": "Allow",
+       "Resource": {
+        "Fn::GetAtt": [
+         "TaskDefinitionmainLogGroup2F2AC027",
+         "Arn"
+        ]
+       }
+      }
+     ],
+     "Version": "2012-10-17"
+    },
+    "PolicyName": "TaskDefinitionExecutionRoleDefaultPolicy1F3406F5",
+    "Roles": [
+     {
+      "Ref": "TaskDefinitionExecutionRole8D61C2FB"
+     }
+    ]
+   }
+  }
+ },
+ "Parameters": {
+  "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC": {
+   "Type": "String",
+   "Description": "S3 bucket for asset \"95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49\""
+  },
+  "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242": {
+   "Type": "String",
+   "Description": "S3 key for asset version \"95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49\""
+  },
+  "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49ArtifactHash0DB02EFB": {
+   "Type": "String",
+   "Description": "Artifact hash for asset \"95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49\""
+  },
+  "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3Bucket1FF22598": {
+   "Type": "String",
+   "Description": "S3 bucket for asset \"f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab\""
+  },
+  "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3VersionKey681A3270": {
+   "Type": "String",
+   "Description": "S3 key for asset version \"f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab\""
+  },
+  "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabArtifactHashC9CEFA00": {
+   "Type": "String",
+   "Description": "Artifact hash for asset \"f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab\""
+  }
+ }
+}
\ No newline at end of file
diff --git a/test/container-image-build.integ.snapshot/TestDefaultTestDeployAssert12909640.template.json b/test/container-image-build.integ.snapshot/TestDefaultTestDeployAssert12909640.template.json
new file mode 100644
index 0000000..9e26dfe
--- /dev/null
+++ b/test/container-image-build.integ.snapshot/TestDefaultTestDeployAssert12909640.template.json
@@ -0,0 +1,1 @@
+{}
\ No newline at end of file
diff --git a/test/nodejs-build.integ.snapshot/asset.16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/index.js b/test/container-image-build.integ.snapshot/asset.95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/index.js
similarity index 79%
rename from test/nodejs-build.integ.snapshot/asset.16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/index.js
rename to test/container-image-build.integ.snapshot/asset.95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/index.js
index f63f53c..e5af2e2 100644
--- a/test/nodejs-build.integ.snapshot/asset.16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/index.js
+++ b/test/container-image-build.integ.snapshot/asset.95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/index.js
@@ -33,12 +33,31 @@ var handler = async (event, context) => {
   try {
     if (event.RequestType == "Create" || event.RequestType == "Update") {
       const props = event.ResourceProperties;
+      const commonEnvironments = [
+        {
+          name: "responseURL",
+          value: event.ResponseURL
+        },
+        {
+          name: "stackId",
+          value: event.StackId
+        },
+        {
+          name: "requestId",
+          value: event.RequestId
+        },
+        {
+          name: "logicalResourceId",
+          value: event.LogicalResourceId
+        }
+      ];
       let command;
       switch (props.type) {
         case "NodejsBuild":
           command = new import_client_codebuild.StartBuildCommand({
             projectName: props.codeBuildProjectName,
             environmentVariablesOverride: [
+              ...commonEnvironments,
               {
                 name: "input",
                 value: JSON.stringify(props.sources.map((source) => ({
@@ -71,22 +90,6 @@ var handler = async (event, context) => {
                 name: "projectName",
                 value: props.codeBuildProjectName
               },
-              {
-                name: "responseURL",
-                value: event.ResponseURL
-              },
-              {
-                name: "stackId",
-                value: event.StackId
-              },
-              {
-                name: "requestId",
-                value: event.RequestId
-              },
-              {
-                name: "logicalResourceId",
-                value: event.LogicalResourceId
-              },
               ...Object.entries(props.environment ?? {}).map(([name, value]) => ({
                 name,
                 value
@@ -98,6 +101,7 @@ var handler = async (event, context) => {
           command = new import_client_codebuild.StartBuildCommand({
             projectName: props.codeBuildProjectName,
             environmentVariablesOverride: [
+              ...commonEnvironments,
               {
                 name: "repositoryName",
                 value: props.repositoryName
@@ -109,26 +113,43 @@ var handler = async (event, context) => {
               {
                 name: "projectName",
                 value: props.codeBuildProjectName
+              }
+            ]
+          });
+          break;
+        case "ContainerImageBuild": {
+          command = new import_client_codebuild.StartBuildCommand({
+            projectName: props.codeBuildProjectName,
+            environmentVariablesOverride: [
+              ...commonEnvironments,
+              {
+                name: "repositoryUri",
+                value: props.repositoryUri
               },
               {
-                name: "responseURL",
-                value: event.ResponseURL
+                name: "repositoryAuthUri",
+                value: props.repositoryUri.split("/")[0]
               },
               {
-                name: "stackId",
-                value: event.StackId
+                name: "buildCommand",
+                value: props.buildCommand
               },
               {
-                name: "requestId",
-                value: event.RequestId
+                name: "imageTag",
+                value: props.imageTag
+              },
+              {
+                name: "projectName",
+                value: props.codeBuildProjectName
               },
               {
-                name: "logicalResourceId",
-                value: event.LogicalResourceId
+                name: "sourceS3Url",
+                value: props.sourceS3Url
               }
             ]
           });
           break;
+        }
         default:
           throw new Error(`invalid event type ${props}}`);
       }
diff --git a/test/soci-index-build.integ.snapshot/asset.3ed1eca23d9b79968633d849cdc33eb9e741dff10a381b98710031e6f77dfec7/Dockerfile b/test/container-image-build.integ.snapshot/asset.f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab/Dockerfile
similarity index 84%
rename from test/soci-index-build.integ.snapshot/asset.3ed1eca23d9b79968633d849cdc33eb9e741dff10a381b98710031e6f77dfec7/Dockerfile
rename to test/container-image-build.integ.snapshot/asset.f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab/Dockerfile
index abcb86c..b2b2647 100644
--- a/test/soci-index-build.integ.snapshot/asset.3ed1eca23d9b79968633d849cdc33eb9e741dff10a381b98710031e6f77dfec7/Dockerfile
+++ b/test/container-image-build.integ.snapshot/asset.f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab/Dockerfile
@@ -1,4 +1,4 @@
-FROM nginx:latest
+FROM public.ecr.aws/nginx/nginx:1.26
 # create dummy file to change the size of a image
 ARG DUMMY_FILE_SIZE_MB="10"
 # RUN fallocate -l ${DUMMY_FILE_SIZE_MB} dummy.img
diff --git a/test/container-image-build.integ.snapshot/cdk.out b/test/container-image-build.integ.snapshot/cdk.out
new file mode 100644
index 0000000..588d7b2
--- /dev/null
+++ b/test/container-image-build.integ.snapshot/cdk.out
@@ -0,0 +1,1 @@
+{"version":"20.0.0"}
\ No newline at end of file
diff --git a/test/container-image-build.integ.snapshot/integ.json b/test/container-image-build.integ.snapshot/integ.json
new file mode 100644
index 0000000..ba1c396
--- /dev/null
+++ b/test/container-image-build.integ.snapshot/integ.json
@@ -0,0 +1,12 @@
+{
+  "version": "20.0.0",
+  "testCases": {
+    "Test/DefaultTest": {
+      "stacks": [
+        "ContainerImageBuildIntegTest"
+      ],
+      "diffAssets": true,
+      "assertionStack": "TestDefaultTestDeployAssert12909640"
+    }
+  }
+}
\ No newline at end of file
diff --git a/test/container-image-build.integ.snapshot/manifest.json b/test/container-image-build.integ.snapshot/manifest.json
new file mode 100644
index 0000000..93b0127
--- /dev/null
+++ b/test/container-image-build.integ.snapshot/manifest.json
@@ -0,0 +1,237 @@
+{
+  "version": "20.0.0",
+  "artifacts": {
+    "Tree": {
+      "type": "cdk:tree",
+      "properties": {
+        "file": "tree.json"
+      }
+    },
+    "ContainerImageBuildIntegTest": {
+      "type": "aws:cloudformation:stack",
+      "environment": "aws://unknown-account/unknown-region",
+      "properties": {
+        "templateFile": "ContainerImageBuildIntegTest.template.json",
+        "validateOnSynth": false
+      },
+      "metadata": {
+        "/ContainerImageBuildIntegTest": [
+          {
+            "type": "aws:cdk:asset",
+            "data": {
+              "path": "asset.95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
+              "id": "95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
+              "packaging": "zip",
+              "sourceHash": "95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
+              "s3BucketParameter": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC",
+              "s3KeyParameter": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242",
+              "artifactHashParameter": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49ArtifactHash0DB02EFB"
+            }
+          },
+          {
+            "type": "aws:cdk:asset",
+            "data": {
+              "path": "asset.f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab",
+              "id": "f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab",
+              "packaging": "zip",
+              "sourceHash": "f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab",
+              "s3BucketParameter": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3Bucket1FF22598",
+              "s3KeyParameter": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3VersionKey681A3270",
+              "artifactHashParameter": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabArtifactHashC9CEFA00"
+            }
+          }
+        ],
+        "/ContainerImageBuildIntegTest/Build/Repository/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "BuildRepository4E6D17C2"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/Build/Resource/Default": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "Build45A36621"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3/ServiceRole/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3ServiceRoleB008BAA4"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3/ServiceRole/DefaultPolicy/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3ServiceRoleDefaultPolicyFECC51DC"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f306AEFF37"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/S3Bucket": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/S3VersionKey": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/ArtifactHash": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49ArtifactHash0DB02EFB"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/AssetParameters/f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab/S3Bucket": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3Bucket1FF22598"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/AssetParameters/f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab/S3VersionKey": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3VersionKey681A3270"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/AssetParameters/f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab/ArtifactHash": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabArtifactHashC9CEFA00"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30/Role/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30RoleB1437276"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30/Role/DefaultPolicy/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30RoleDefaultPolicy9F1BA63A"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30F1D2BABB"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/BuildArm/Resource/Default": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "BuildArmF8ABF624"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/Function/ServiceRole/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "FunctionServiceRole675BB04A"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/Function/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "Function76856677"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/Vpc/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "Vpc8378EB38"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/Vpc/publicSubnet1/Subnet": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "VpcpublicSubnet1Subnet2BB74ED7"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/Vpc/publicSubnet1/RouteTable": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "VpcpublicSubnet1RouteTable15C15F8E"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/Vpc/publicSubnet1/RouteTableAssociation": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "VpcpublicSubnet1RouteTableAssociation4E83B6E4"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/Vpc/publicSubnet1/DefaultRoute": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "VpcpublicSubnet1DefaultRouteB88F9E93"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/Vpc/IGW": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "VpcIGWD7BA715C"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/Vpc/VPCGW": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "VpcVPCGWBF912B6E"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/Cluster/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "ClusterEB0386A7"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/TaskDefinition/TaskRole/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "TaskDefinitionTaskRoleFD40A61D"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/TaskDefinition/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "TaskDefinitionB36D86D9"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/TaskDefinition/main/LogGroup/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "TaskDefinitionmainLogGroup2F2AC027"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/TaskDefinition/ExecutionRole/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "TaskDefinitionExecutionRole8D61C2FB"
+          }
+        ],
+        "/ContainerImageBuildIntegTest/TaskDefinition/ExecutionRole/DefaultPolicy/Resource": [
+          {
+            "type": "aws:cdk:logicalId",
+            "data": "TaskDefinitionExecutionRoleDefaultPolicy1F3406F5"
+          }
+        ]
+      },
+      "displayName": "ContainerImageBuildIntegTest"
+    },
+    "TestDefaultTestDeployAssert12909640": {
+      "type": "aws:cloudformation:stack",
+      "environment": "aws://unknown-account/unknown-region",
+      "properties": {
+        "templateFile": "TestDefaultTestDeployAssert12909640.template.json",
+        "validateOnSynth": false
+      },
+      "displayName": "Test/DefaultTest/DeployAssert"
+    }
+  }
+}
\ No newline at end of file
diff --git a/test/container-image-build.integ.snapshot/tree.json b/test/container-image-build.integ.snapshot/tree.json
new file mode 100644
index 0000000..9651fc6
--- /dev/null
+++ b/test/container-image-build.integ.snapshot/tree.json
@@ -0,0 +1,1433 @@
+{
+  "version": "tree-0.1",
+  "tree": {
+    "id": "App",
+    "path": "",
+    "children": {
+      "Tree": {
+        "id": "Tree",
+        "path": "Tree",
+        "constructInfo": {
+          "fqn": "constructs.Construct",
+          "version": "10.0.5"
+        }
+      },
+      "ContainerImageBuildIntegTest": {
+        "id": "ContainerImageBuildIntegTest",
+        "path": "ContainerImageBuildIntegTest",
+        "children": {
+          "Build": {
+            "id": "Build",
+            "path": "ContainerImageBuildIntegTest/Build",
+            "children": {
+              "CustomResourceHandler": {
+                "id": "CustomResourceHandler",
+                "path": "ContainerImageBuildIntegTest/Build/CustomResourceHandler",
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction",
+                  "version": "2.38.0"
+                }
+              },
+              "Repository": {
+                "id": "Repository",
+                "path": "ContainerImageBuildIntegTest/Build/Repository",
+                "children": {
+                  "Resource": {
+                    "id": "Resource",
+                    "path": "ContainerImageBuildIntegTest/Build/Repository/Resource",
+                    "attributes": {
+                      "aws:cdk:cloudformation:type": "AWS::ECR::Repository",
+                      "aws:cdk:cloudformation:props": {
+                        "repositoryPolicyText": {
+                          "Statement": [
+                            {
+                              "Action": [
+                                "ecr:BatchCheckLayerAvailability",
+                                "ecr:BatchGetImage",
+                                "ecr:GetDownloadUrlForLayer"
+                              ],
+                              "Effect": "Allow",
+                              "Principal": {
+                                "Service": "lambda.amazonaws.com"
+                              }
+                            }
+                          ],
+                          "Version": "2012-10-17"
+                        }
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_ecr.CfnRepository",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_ecr.Repository",
+                  "version": "2.38.0"
+                }
+              },
+              "Project": {
+                "id": "Project",
+                "path": "ContainerImageBuildIntegTest/Build/Project",
+                "constructInfo": {
+                  "fqn": "constructs.Construct",
+                  "version": "10.0.5"
+                }
+              },
+              "Source": {
+                "id": "Source",
+                "path": "ContainerImageBuildIntegTest/Build/Source",
+                "children": {
+                  "Stage": {
+                    "id": "Stage",
+                    "path": "ContainerImageBuildIntegTest/Build/Source/Stage",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.AssetStaging",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "AssetBucket": {
+                    "id": "AssetBucket",
+                    "path": "ContainerImageBuildIntegTest/Build/Source/AssetBucket",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_s3.BucketBase",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_s3_assets.Asset",
+                  "version": "2.38.0"
+                }
+              },
+              "Resource": {
+                "id": "Resource",
+                "path": "ContainerImageBuildIntegTest/Build/Resource",
+                "children": {
+                  "Default": {
+                    "id": "Default",
+                    "path": "ContainerImageBuildIntegTest/Build/Resource/Default",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.CfnResource",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.CustomResource",
+                  "version": "2.38.0"
+                }
+              }
+            },
+            "constructInfo": {
+              "fqn": "constructs.Construct",
+              "version": "10.0.5"
+            }
+          },
+          "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3": {
+            "id": "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3",
+            "path": "ContainerImageBuildIntegTest/DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3",
+            "children": {
+              "ServiceRole": {
+                "id": "ServiceRole",
+                "path": "ContainerImageBuildIntegTest/DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3/ServiceRole",
+                "children": {
+                  "Resource": {
+                    "id": "Resource",
+                    "path": "ContainerImageBuildIntegTest/DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3/ServiceRole/Resource",
+                    "attributes": {
+                      "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+                      "aws:cdk:cloudformation:props": {
+                        "assumeRolePolicyDocument": {
+                          "Statement": [
+                            {
+                              "Action": "sts:AssumeRole",
+                              "Effect": "Allow",
+                              "Principal": {
+                                "Service": "lambda.amazonaws.com"
+                              }
+                            }
+                          ],
+                          "Version": "2012-10-17"
+                        },
+                        "managedPolicyArns": [
+                          {
+                            "Fn::Join": [
+                              "",
+                              [
+                                "arn:",
+                                {
+                                  "Ref": "AWS::Partition"
+                                },
+                                ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+                              ]
+                            ]
+                          }
+                        ]
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "DefaultPolicy": {
+                    "id": "DefaultPolicy",
+                    "path": "ContainerImageBuildIntegTest/DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3/ServiceRole/DefaultPolicy",
+                    "children": {
+                      "Resource": {
+                        "id": "Resource",
+                        "path": "ContainerImageBuildIntegTest/DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3/ServiceRole/DefaultPolicy/Resource",
+                        "attributes": {
+                          "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+                          "aws:cdk:cloudformation:props": {
+                            "policyDocument": {
+                              "Statement": [
+                                {
+                                  "Action": "codebuild:StartBuild",
+                                  "Effect": "Allow",
+                                  "Resource": {
+                                    "Fn::GetAtt": [
+                                      "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30F1D2BABB",
+                                      "Arn"
+                                    ]
+                                  }
+                                }
+                              ],
+                              "Version": "2012-10-17"
+                            },
+                            "policyName": "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3ServiceRoleDefaultPolicyFECC51DC",
+                            "roles": [
+                              {
+                                "Ref": "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3ServiceRoleB008BAA4"
+                              }
+                            ]
+                          }
+                        },
+                        "constructInfo": {
+                          "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+                          "version": "2.38.0"
+                        }
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_iam.Policy",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_iam.Role",
+                  "version": "2.38.0"
+                }
+              },
+              "Code": {
+                "id": "Code",
+                "path": "ContainerImageBuildIntegTest/DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3/Code",
+                "children": {
+                  "Stage": {
+                    "id": "Stage",
+                    "path": "ContainerImageBuildIntegTest/DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3/Code/Stage",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.AssetStaging",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "AssetBucket": {
+                    "id": "AssetBucket",
+                    "path": "ContainerImageBuildIntegTest/DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3/Code/AssetBucket",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_s3.BucketBase",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_s3_assets.Asset",
+                  "version": "2.38.0"
+                }
+              },
+              "Resource": {
+                "id": "Resource",
+                "path": "ContainerImageBuildIntegTest/DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3/Resource",
+                "attributes": {
+                  "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+                  "aws:cdk:cloudformation:props": {
+                    "code": {
+                      "s3Bucket": {
+                        "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC"
+                      },
+                      "s3Key": {
+                        "Fn::Join": [
+                          "",
+                          [
+                            {
+                              "Fn::Select": [
+                                0,
+                                {
+                                  "Fn::Split": [
+                                    "||",
+                                    {
+                                      "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
+                                    }
+                                  ]
+                                }
+                              ]
+                            },
+                            {
+                              "Fn::Select": [
+                                1,
+                                {
+                                  "Fn::Split": [
+                                    "||",
+                                    {
+                                      "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
+                                    }
+                                  ]
+                                }
+                              ]
+                            }
+                          ]
+                        ]
+                      }
+                    },
+                    "role": {
+                      "Fn::GetAtt": [
+                        "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f3ServiceRoleB008BAA4",
+                        "Arn"
+                      ]
+                    },
+                    "handler": "index.handler",
+                    "runtime": "nodejs18.x",
+                    "timeout": 300
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
+                  "version": "2.38.0"
+                }
+              }
+            },
+            "constructInfo": {
+              "fqn": "aws-cdk-lib.aws_lambda.Function",
+              "version": "2.38.0"
+            }
+          },
+          "AssetParameters": {
+            "id": "AssetParameters",
+            "path": "ContainerImageBuildIntegTest/AssetParameters",
+            "children": {
+              "95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49": {
+                "id": "95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
+                "path": "ContainerImageBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
+                "children": {
+                  "S3Bucket": {
+                    "id": "S3Bucket",
+                    "path": "ContainerImageBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/S3Bucket",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.CfnParameter",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "S3VersionKey": {
+                    "id": "S3VersionKey",
+                    "path": "ContainerImageBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/S3VersionKey",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.CfnParameter",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "ArtifactHash": {
+                    "id": "ArtifactHash",
+                    "path": "ContainerImageBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/ArtifactHash",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.CfnParameter",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "constructs.Construct",
+                  "version": "10.0.5"
+                }
+              },
+              "f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab": {
+                "id": "f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab",
+                "path": "ContainerImageBuildIntegTest/AssetParameters/f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab",
+                "children": {
+                  "S3Bucket": {
+                    "id": "S3Bucket",
+                    "path": "ContainerImageBuildIntegTest/AssetParameters/f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab/S3Bucket",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.CfnParameter",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "S3VersionKey": {
+                    "id": "S3VersionKey",
+                    "path": "ContainerImageBuildIntegTest/AssetParameters/f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab/S3VersionKey",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.CfnParameter",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "ArtifactHash": {
+                    "id": "ArtifactHash",
+                    "path": "ContainerImageBuildIntegTest/AssetParameters/f7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeab/ArtifactHash",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.CfnParameter",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "constructs.Construct",
+                  "version": "10.0.5"
+                }
+              }
+            },
+            "constructInfo": {
+              "fqn": "constructs.Construct",
+              "version": "10.0.5"
+            }
+          },
+          "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30": {
+            "id": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30",
+            "path": "ContainerImageBuildIntegTest/ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30",
+            "children": {
+              "Role": {
+                "id": "Role",
+                "path": "ContainerImageBuildIntegTest/ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30/Role",
+                "children": {
+                  "Resource": {
+                    "id": "Resource",
+                    "path": "ContainerImageBuildIntegTest/ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30/Role/Resource",
+                    "attributes": {
+                      "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+                      "aws:cdk:cloudformation:props": {
+                        "assumeRolePolicyDocument": {
+                          "Statement": [
+                            {
+                              "Action": "sts:AssumeRole",
+                              "Effect": "Allow",
+                              "Principal": {
+                                "Service": "codebuild.amazonaws.com"
+                              }
+                            }
+                          ],
+                          "Version": "2012-10-17"
+                        },
+                        "managedPolicyArns": [
+                          {
+                            "Fn::Join": [
+                              "",
+                              [
+                                "arn:",
+                                {
+                                  "Ref": "AWS::Partition"
+                                },
+                                ":iam::aws:policy/AmazonElasticContainerRegistryPublicReadOnly"
+                              ]
+                            ]
+                          }
+                        ]
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "DefaultPolicy": {
+                    "id": "DefaultPolicy",
+                    "path": "ContainerImageBuildIntegTest/ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30/Role/DefaultPolicy",
+                    "children": {
+                      "Resource": {
+                        "id": "Resource",
+                        "path": "ContainerImageBuildIntegTest/ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30/Role/DefaultPolicy/Resource",
+                        "attributes": {
+                          "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+                          "aws:cdk:cloudformation:props": {
+                            "policyDocument": {
+                              "Statement": [
+                                {
+                                  "Action": [
+                                    "logs:CreateLogGroup",
+                                    "logs:CreateLogStream",
+                                    "logs:PutLogEvents"
+                                  ],
+                                  "Effect": "Allow",
+                                  "Resource": [
+                                    {
+                                      "Fn::Join": [
+                                        "",
+                                        [
+                                          "arn:",
+                                          {
+                                            "Ref": "AWS::Partition"
+                                          },
+                                          ":logs:",
+                                          {
+                                            "Ref": "AWS::Region"
+                                          },
+                                          ":",
+                                          {
+                                            "Ref": "AWS::AccountId"
+                                          },
+                                          ":log-group:/aws/codebuild/",
+                                          {
+                                            "Ref": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30F1D2BABB"
+                                          },
+                                          ":*"
+                                        ]
+                                      ]
+                                    },
+                                    {
+                                      "Fn::Join": [
+                                        "",
+                                        [
+                                          "arn:",
+                                          {
+                                            "Ref": "AWS::Partition"
+                                          },
+                                          ":logs:",
+                                          {
+                                            "Ref": "AWS::Region"
+                                          },
+                                          ":",
+                                          {
+                                            "Ref": "AWS::AccountId"
+                                          },
+                                          ":log-group:/aws/codebuild/",
+                                          {
+                                            "Ref": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30F1D2BABB"
+                                          }
+                                        ]
+                                      ]
+                                    }
+                                  ]
+                                },
+                                {
+                                  "Action": [
+                                    "codebuild:BatchPutCodeCoverages",
+                                    "codebuild:BatchPutTestCases",
+                                    "codebuild:CreateReport",
+                                    "codebuild:CreateReportGroup",
+                                    "codebuild:UpdateReport"
+                                  ],
+                                  "Effect": "Allow",
+                                  "Resource": {
+                                    "Fn::Join": [
+                                      "",
+                                      [
+                                        "arn:",
+                                        {
+                                          "Ref": "AWS::Partition"
+                                        },
+                                        ":codebuild:",
+                                        {
+                                          "Ref": "AWS::Region"
+                                        },
+                                        ":",
+                                        {
+                                          "Ref": "AWS::AccountId"
+                                        },
+                                        ":report-group/",
+                                        {
+                                          "Ref": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30F1D2BABB"
+                                        },
+                                        "-*"
+                                      ]
+                                    ]
+                                  }
+                                },
+                                {
+                                  "Action": [
+                                    "ecr:BatchCheckLayerAvailability",
+                                    "ecr:BatchGetImage",
+                                    "ecr:CompleteLayerUpload",
+                                    "ecr:DescribeImages",
+                                    "ecr:GetDownloadUrlForLayer",
+                                    "ecr:InitiateLayerUpload",
+                                    "ecr:PutImage",
+                                    "ecr:UploadLayerPart"
+                                  ],
+                                  "Effect": "Allow",
+                                  "Resource": {
+                                    "Fn::GetAtt": [
+                                      "BuildRepository4E6D17C2",
+                                      "Arn"
+                                    ]
+                                  }
+                                },
+                                {
+                                  "Action": "ecr:GetAuthorizationToken",
+                                  "Effect": "Allow",
+                                  "Resource": "*"
+                                },
+                                {
+                                  "Action": [
+                                    "s3:GetBucket*",
+                                    "s3:GetObject*",
+                                    "s3:List*"
+                                  ],
+                                  "Effect": "Allow",
+                                  "Resource": [
+                                    {
+                                      "Fn::Join": [
+                                        "",
+                                        [
+                                          "arn:",
+                                          {
+                                            "Ref": "AWS::Partition"
+                                          },
+                                          ":s3:::",
+                                          {
+                                            "Ref": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3Bucket1FF22598"
+                                          },
+                                          "/*"
+                                        ]
+                                      ]
+                                    },
+                                    {
+                                      "Fn::Join": [
+                                        "",
+                                        [
+                                          "arn:",
+                                          {
+                                            "Ref": "AWS::Partition"
+                                          },
+                                          ":s3:::",
+                                          {
+                                            "Ref": "AssetParametersf7fa10e7cd7b9b27f49a4a335f4aa9795fb7e68a665c34ca8bf5711f0aa6aeabS3Bucket1FF22598"
+                                          }
+                                        ]
+                                      ]
+                                    }
+                                  ]
+                                }
+                              ],
+                              "Version": "2012-10-17"
+                            },
+                            "policyName": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30RoleDefaultPolicy9F1BA63A",
+                            "roles": [
+                              {
+                                "Ref": "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30RoleB1437276"
+                              }
+                            ]
+                          }
+                        },
+                        "constructInfo": {
+                          "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+                          "version": "2.38.0"
+                        }
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_iam.Policy",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_iam.Role",
+                  "version": "2.38.0"
+                }
+              },
+              "Resource": {
+                "id": "Resource",
+                "path": "ContainerImageBuildIntegTest/ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30/Resource",
+                "attributes": {
+                  "aws:cdk:cloudformation:type": "AWS::CodeBuild::Project",
+                  "aws:cdk:cloudformation:props": {
+                    "artifacts": {
+                      "type": "NO_ARTIFACTS"
+                    },
+                    "environment": {
+                      "type": "LINUX_CONTAINER",
+                      "image": "aws/codebuild/standard:7.0",
+                      "imagePullCredentialsType": "CODEBUILD",
+                      "privilegedMode": true,
+                      "computeType": "BUILD_GENERAL1_SMALL"
+                    },
+                    "serviceRole": {
+                      "Fn::GetAtt": [
+                        "ContainerImageBuildAmd64e83729feb1564e709bec452b15847a30RoleB1437276",
+                        "Arn"
+                      ]
+                    },
+                    "source": {
+                      "type": "NO_SOURCE",
+                      "buildSpec": "{\n  \"version\": \"0.2\",\n  \"phases\": {\n    \"build\": {\n      \"commands\": [\n        \"current_dir=$(pwd)\",\n        \"echo \\\"$input\\\"\",\n        \"mkdir workdir\",\n        \"cd workdir\",\n        \"aws s3 cp \\\"$sourceS3Url\\\" temp.zip\",\n        \"unzip temp.zip\",\n        \"ls -la\",\n        \"aws ecr get-login-password | docker login --username AWS --password-stdin $repositoryAuthUri\",\n        \"aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws\",\n        \"docker buildx create --use\",\n        \"docker buildx ls\",\n        \"eval \\\"$buildCommand\\\"\"\n      ]\n    },\n    \"post_build\": {\n      \"commands\": [\n        \"echo Build completed on `date`\",\n        \"\\nSTATUS='SUCCESS'\\nif [ $CODEBUILD_BUILD_SUCCEEDING -ne 1 ] # Test if the build is failing\\nthen\\nSTATUS='FAILED'\\nREASON=\\\"ContainerImageBuild failed. See CloudWatch Log stream for the detailed reason: \\nhttps://$AWS_REGION.console.aws.amazon.com/cloudwatch/home?region=$AWS_REGION#logsV2:log-groups/log-group/\\\\$252Faws\\\\$252Fcodebuild\\\\$252F$projectName/log-events/$CODEBUILD_LOG_PATH\\\"\\nfi\\ncat <<EOF > payload.json\\n{\\n  \\\"StackId\\\": \\\"$stackId\\\",\\n  \\\"RequestId\\\": \\\"$requestId\\\",\\n  \\\"LogicalResourceId\\\":\\\"$logicalResourceId\\\",\\n  \\\"PhysicalResourceId\\\": \\\"$imageTag\\\",\\n  \\\"Status\\\": \\\"$STATUS\\\",\\n  \\\"Reason\\\": \\\"$REASON\\\",\\n  \\\"Data\\\": {\\n    \\\"ImageTag\\\": \\\"$imageTag\\\"\\n  }\\n}\\nEOF\\ncurl -v -i -X PUT -H 'Content-Type:' -d \\\"@payload.json\\\" \\\"$responseURL\\\"\\n              \"\n      ]\n    }\n  }\n}"
+                    },
+                    "cache": {
+                      "type": "NO_CACHE"
+                    },
+                    "encryptionKey": "alias/aws/s3"
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_codebuild.CfnProject",
+                  "version": "2.38.0"
+                }
+              }
+            },
+            "constructInfo": {
+              "fqn": "aws-cdk-lib.aws_codebuild.Project",
+              "version": "2.38.0"
+            }
+          },
+          "BuildArm": {
+            "id": "BuildArm",
+            "path": "ContainerImageBuildIntegTest/BuildArm",
+            "children": {
+              "CustomResourceHandler": {
+                "id": "CustomResourceHandler",
+                "path": "ContainerImageBuildIntegTest/BuildArm/CustomResourceHandler",
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_lambda.SingletonFunction",
+                  "version": "2.38.0"
+                }
+              },
+              "Project": {
+                "id": "Project",
+                "path": "ContainerImageBuildIntegTest/BuildArm/Project",
+                "constructInfo": {
+                  "fqn": "constructs.Construct",
+                  "version": "10.0.5"
+                }
+              },
+              "Source": {
+                "id": "Source",
+                "path": "ContainerImageBuildIntegTest/BuildArm/Source",
+                "children": {
+                  "Stage": {
+                    "id": "Stage",
+                    "path": "ContainerImageBuildIntegTest/BuildArm/Source/Stage",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.AssetStaging",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "AssetBucket": {
+                    "id": "AssetBucket",
+                    "path": "ContainerImageBuildIntegTest/BuildArm/Source/AssetBucket",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_s3.BucketBase",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_s3_assets.Asset",
+                  "version": "2.38.0"
+                }
+              },
+              "Resource": {
+                "id": "Resource",
+                "path": "ContainerImageBuildIntegTest/BuildArm/Resource",
+                "children": {
+                  "Default": {
+                    "id": "Default",
+                    "path": "ContainerImageBuildIntegTest/BuildArm/Resource/Default",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.CfnResource",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.CustomResource",
+                  "version": "2.38.0"
+                }
+              }
+            },
+            "constructInfo": {
+              "fqn": "constructs.Construct",
+              "version": "10.0.5"
+            }
+          },
+          "Function": {
+            "id": "Function",
+            "path": "ContainerImageBuildIntegTest/Function",
+            "children": {
+              "ServiceRole": {
+                "id": "ServiceRole",
+                "path": "ContainerImageBuildIntegTest/Function/ServiceRole",
+                "children": {
+                  "Resource": {
+                    "id": "Resource",
+                    "path": "ContainerImageBuildIntegTest/Function/ServiceRole/Resource",
+                    "attributes": {
+                      "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+                      "aws:cdk:cloudformation:props": {
+                        "assumeRolePolicyDocument": {
+                          "Statement": [
+                            {
+                              "Action": "sts:AssumeRole",
+                              "Effect": "Allow",
+                              "Principal": {
+                                "Service": "lambda.amazonaws.com"
+                              }
+                            }
+                          ],
+                          "Version": "2012-10-17"
+                        },
+                        "managedPolicyArns": [
+                          {
+                            "Fn::Join": [
+                              "",
+                              [
+                                "arn:",
+                                {
+                                  "Ref": "AWS::Partition"
+                                },
+                                ":iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"
+                              ]
+                            ]
+                          }
+                        ]
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_iam.Role",
+                  "version": "2.38.0"
+                }
+              },
+              "Resource": {
+                "id": "Resource",
+                "path": "ContainerImageBuildIntegTest/Function/Resource",
+                "attributes": {
+                  "aws:cdk:cloudformation:type": "AWS::Lambda::Function",
+                  "aws:cdk:cloudformation:props": {
+                    "code": {
+                      "imageUri": {
+                        "Fn::Join": [
+                          "",
+                          [
+                            {
+                              "Fn::Select": [
+                                4,
+                                {
+                                  "Fn::Split": [
+                                    ":",
+                                    {
+                                      "Fn::GetAtt": [
+                                        "BuildRepository4E6D17C2",
+                                        "Arn"
+                                      ]
+                                    }
+                                  ]
+                                }
+                              ]
+                            },
+                            ".dkr.ecr.",
+                            {
+                              "Fn::Select": [
+                                3,
+                                {
+                                  "Fn::Split": [
+                                    ":",
+                                    {
+                                      "Fn::GetAtt": [
+                                        "BuildRepository4E6D17C2",
+                                        "Arn"
+                                      ]
+                                    }
+                                  ]
+                                }
+                              ]
+                            },
+                            ".",
+                            {
+                              "Ref": "AWS::URLSuffix"
+                            },
+                            "/",
+                            {
+                              "Ref": "BuildRepository4E6D17C2"
+                            },
+                            ":",
+                            {
+                              "Fn::GetAtt": [
+                                "Build45A36621",
+                                "ImageTag"
+                              ]
+                            }
+                          ]
+                        ]
+                      }
+                    },
+                    "role": {
+                      "Fn::GetAtt": [
+                        "FunctionServiceRole675BB04A",
+                        "Arn"
+                      ]
+                    },
+                    "packageType": "Image"
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_lambda.CfnFunction",
+                  "version": "2.38.0"
+                }
+              }
+            },
+            "constructInfo": {
+              "fqn": "aws-cdk-lib.aws_lambda.DockerImageFunction",
+              "version": "2.38.0"
+            }
+          },
+          "Vpc": {
+            "id": "Vpc",
+            "path": "ContainerImageBuildIntegTest/Vpc",
+            "children": {
+              "Resource": {
+                "id": "Resource",
+                "path": "ContainerImageBuildIntegTest/Vpc/Resource",
+                "attributes": {
+                  "aws:cdk:cloudformation:type": "AWS::EC2::VPC",
+                  "aws:cdk:cloudformation:props": {
+                    "cidrBlock": "10.0.0.0/16",
+                    "enableDnsHostnames": true,
+                    "enableDnsSupport": true,
+                    "instanceTenancy": "default",
+                    "tags": [
+                      {
+                        "key": "Name",
+                        "value": "ContainerImageBuildIntegTest/Vpc"
+                      }
+                    ]
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_ec2.CfnVPC",
+                  "version": "2.38.0"
+                }
+              },
+              "publicSubnet1": {
+                "id": "publicSubnet1",
+                "path": "ContainerImageBuildIntegTest/Vpc/publicSubnet1",
+                "children": {
+                  "Subnet": {
+                    "id": "Subnet",
+                    "path": "ContainerImageBuildIntegTest/Vpc/publicSubnet1/Subnet",
+                    "attributes": {
+                      "aws:cdk:cloudformation:type": "AWS::EC2::Subnet",
+                      "aws:cdk:cloudformation:props": {
+                        "vpcId": {
+                          "Ref": "Vpc8378EB38"
+                        },
+                        "availabilityZone": {
+                          "Fn::Select": [
+                            0,
+                            {
+                              "Fn::GetAZs": ""
+                            }
+                          ]
+                        },
+                        "cidrBlock": "10.0.0.0/24",
+                        "mapPublicIpOnLaunch": true,
+                        "tags": [
+                          {
+                            "key": "aws-cdk:subnet-name",
+                            "value": "public"
+                          },
+                          {
+                            "key": "aws-cdk:subnet-type",
+                            "value": "Public"
+                          },
+                          {
+                            "key": "Name",
+                            "value": "ContainerImageBuildIntegTest/Vpc/publicSubnet1"
+                          }
+                        ]
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_ec2.CfnSubnet",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "Acl": {
+                    "id": "Acl",
+                    "path": "ContainerImageBuildIntegTest/Vpc/publicSubnet1/Acl",
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.Resource",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "RouteTable": {
+                    "id": "RouteTable",
+                    "path": "ContainerImageBuildIntegTest/Vpc/publicSubnet1/RouteTable",
+                    "attributes": {
+                      "aws:cdk:cloudformation:type": "AWS::EC2::RouteTable",
+                      "aws:cdk:cloudformation:props": {
+                        "vpcId": {
+                          "Ref": "Vpc8378EB38"
+                        },
+                        "tags": [
+                          {
+                            "key": "Name",
+                            "value": "ContainerImageBuildIntegTest/Vpc/publicSubnet1"
+                          }
+                        ]
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_ec2.CfnRouteTable",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "RouteTableAssociation": {
+                    "id": "RouteTableAssociation",
+                    "path": "ContainerImageBuildIntegTest/Vpc/publicSubnet1/RouteTableAssociation",
+                    "attributes": {
+                      "aws:cdk:cloudformation:type": "AWS::EC2::SubnetRouteTableAssociation",
+                      "aws:cdk:cloudformation:props": {
+                        "routeTableId": {
+                          "Ref": "VpcpublicSubnet1RouteTable15C15F8E"
+                        },
+                        "subnetId": {
+                          "Ref": "VpcpublicSubnet1Subnet2BB74ED7"
+                        }
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_ec2.CfnSubnetRouteTableAssociation",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "DefaultRoute": {
+                    "id": "DefaultRoute",
+                    "path": "ContainerImageBuildIntegTest/Vpc/publicSubnet1/DefaultRoute",
+                    "attributes": {
+                      "aws:cdk:cloudformation:type": "AWS::EC2::Route",
+                      "aws:cdk:cloudformation:props": {
+                        "routeTableId": {
+                          "Ref": "VpcpublicSubnet1RouteTable15C15F8E"
+                        },
+                        "destinationCidrBlock": "0.0.0.0/0",
+                        "gatewayId": {
+                          "Ref": "VpcIGWD7BA715C"
+                        }
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_ec2.CfnRoute",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_ec2.PublicSubnet",
+                  "version": "2.38.0"
+                }
+              },
+              "IGW": {
+                "id": "IGW",
+                "path": "ContainerImageBuildIntegTest/Vpc/IGW",
+                "attributes": {
+                  "aws:cdk:cloudformation:type": "AWS::EC2::InternetGateway",
+                  "aws:cdk:cloudformation:props": {
+                    "tags": [
+                      {
+                        "key": "Name",
+                        "value": "ContainerImageBuildIntegTest/Vpc"
+                      }
+                    ]
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_ec2.CfnInternetGateway",
+                  "version": "2.38.0"
+                }
+              },
+              "VPCGW": {
+                "id": "VPCGW",
+                "path": "ContainerImageBuildIntegTest/Vpc/VPCGW",
+                "attributes": {
+                  "aws:cdk:cloudformation:type": "AWS::EC2::VPCGatewayAttachment",
+                  "aws:cdk:cloudformation:props": {
+                    "vpcId": {
+                      "Ref": "Vpc8378EB38"
+                    },
+                    "internetGatewayId": {
+                      "Ref": "VpcIGWD7BA715C"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_ec2.CfnVPCGatewayAttachment",
+                  "version": "2.38.0"
+                }
+              }
+            },
+            "constructInfo": {
+              "fqn": "aws-cdk-lib.aws_ec2.Vpc",
+              "version": "2.38.0"
+            }
+          },
+          "Cluster": {
+            "id": "Cluster",
+            "path": "ContainerImageBuildIntegTest/Cluster",
+            "children": {
+              "Resource": {
+                "id": "Resource",
+                "path": "ContainerImageBuildIntegTest/Cluster/Resource",
+                "attributes": {
+                  "aws:cdk:cloudformation:type": "AWS::ECS::Cluster",
+                  "aws:cdk:cloudformation:props": {}
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_ecs.CfnCluster",
+                  "version": "2.38.0"
+                }
+              }
+            },
+            "constructInfo": {
+              "fqn": "aws-cdk-lib.aws_ecs.Cluster",
+              "version": "2.38.0"
+            }
+          },
+          "TaskDefinition": {
+            "id": "TaskDefinition",
+            "path": "ContainerImageBuildIntegTest/TaskDefinition",
+            "children": {
+              "TaskRole": {
+                "id": "TaskRole",
+                "path": "ContainerImageBuildIntegTest/TaskDefinition/TaskRole",
+                "children": {
+                  "Resource": {
+                    "id": "Resource",
+                    "path": "ContainerImageBuildIntegTest/TaskDefinition/TaskRole/Resource",
+                    "attributes": {
+                      "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+                      "aws:cdk:cloudformation:props": {
+                        "assumeRolePolicyDocument": {
+                          "Statement": [
+                            {
+                              "Action": "sts:AssumeRole",
+                              "Effect": "Allow",
+                              "Principal": {
+                                "Service": "ecs-tasks.amazonaws.com"
+                              }
+                            }
+                          ],
+                          "Version": "2012-10-17"
+                        }
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_iam.Role",
+                  "version": "2.38.0"
+                }
+              },
+              "Resource": {
+                "id": "Resource",
+                "path": "ContainerImageBuildIntegTest/TaskDefinition/Resource",
+                "attributes": {
+                  "aws:cdk:cloudformation:type": "AWS::ECS::TaskDefinition",
+                  "aws:cdk:cloudformation:props": {
+                    "containerDefinitions": [
+                      {
+                        "essential": true,
+                        "image": {
+                          "Fn::Join": [
+                            "",
+                            [
+                              {
+                                "Fn::Select": [
+                                  4,
+                                  {
+                                    "Fn::Split": [
+                                      ":",
+                                      {
+                                        "Fn::GetAtt": [
+                                          "BuildRepository4E6D17C2",
+                                          "Arn"
+                                        ]
+                                      }
+                                    ]
+                                  }
+                                ]
+                              },
+                              ".dkr.ecr.",
+                              {
+                                "Fn::Select": [
+                                  3,
+                                  {
+                                    "Fn::Split": [
+                                      ":",
+                                      {
+                                        "Fn::GetAtt": [
+                                          "BuildRepository4E6D17C2",
+                                          "Arn"
+                                        ]
+                                      }
+                                    ]
+                                  }
+                                ]
+                              },
+                              ".",
+                              {
+                                "Ref": "AWS::URLSuffix"
+                              },
+                              "/",
+                              {
+                                "Ref": "BuildRepository4E6D17C2"
+                              },
+                              ":",
+                              {
+                                "Fn::GetAtt": [
+                                  "BuildArmF8ABF624",
+                                  "ImageTag"
+                                ]
+                              }
+                            ]
+                          ]
+                        },
+                        "name": "main",
+                        "logConfiguration": {
+                          "logDriver": "awslogs",
+                          "options": {
+                            "awslogs-group": {
+                              "Ref": "TaskDefinitionmainLogGroup2F2AC027"
+                            },
+                            "awslogs-stream-prefix": "main",
+                            "awslogs-region": {
+                              "Ref": "AWS::Region"
+                            }
+                          }
+                        }
+                      }
+                    ],
+                    "cpu": "256",
+                    "executionRoleArn": {
+                      "Fn::GetAtt": [
+                        "TaskDefinitionExecutionRole8D61C2FB",
+                        "Arn"
+                      ]
+                    },
+                    "family": "ContainerImageBuildIntegTestTaskDefinition119492A3",
+                    "memory": "512",
+                    "networkMode": "awsvpc",
+                    "requiresCompatibilities": [
+                      "FARGATE"
+                    ],
+                    "runtimePlatform": {
+                      "cpuArchitecture": "ARM64"
+                    },
+                    "taskRoleArn": {
+                      "Fn::GetAtt": [
+                        "TaskDefinitionTaskRoleFD40A61D",
+                        "Arn"
+                      ]
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_ecs.CfnTaskDefinition",
+                  "version": "2.38.0"
+                }
+              },
+              "main": {
+                "id": "main",
+                "path": "ContainerImageBuildIntegTest/TaskDefinition/main",
+                "children": {
+                  "LogGroup": {
+                    "id": "LogGroup",
+                    "path": "ContainerImageBuildIntegTest/TaskDefinition/main/LogGroup",
+                    "children": {
+                      "Resource": {
+                        "id": "Resource",
+                        "path": "ContainerImageBuildIntegTest/TaskDefinition/main/LogGroup/Resource",
+                        "attributes": {
+                          "aws:cdk:cloudformation:type": "AWS::Logs::LogGroup",
+                          "aws:cdk:cloudformation:props": {}
+                        },
+                        "constructInfo": {
+                          "fqn": "aws-cdk-lib.aws_logs.CfnLogGroup",
+                          "version": "2.38.0"
+                        }
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_logs.LogGroup",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_ecs.ContainerDefinition",
+                  "version": "2.38.0"
+                }
+              },
+              "ExecutionRole": {
+                "id": "ExecutionRole",
+                "path": "ContainerImageBuildIntegTest/TaskDefinition/ExecutionRole",
+                "children": {
+                  "Resource": {
+                    "id": "Resource",
+                    "path": "ContainerImageBuildIntegTest/TaskDefinition/ExecutionRole/Resource",
+                    "attributes": {
+                      "aws:cdk:cloudformation:type": "AWS::IAM::Role",
+                      "aws:cdk:cloudformation:props": {
+                        "assumeRolePolicyDocument": {
+                          "Statement": [
+                            {
+                              "Action": "sts:AssumeRole",
+                              "Effect": "Allow",
+                              "Principal": {
+                                "Service": "ecs-tasks.amazonaws.com"
+                              }
+                            }
+                          ],
+                          "Version": "2012-10-17"
+                        }
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_iam.CfnRole",
+                      "version": "2.38.0"
+                    }
+                  },
+                  "DefaultPolicy": {
+                    "id": "DefaultPolicy",
+                    "path": "ContainerImageBuildIntegTest/TaskDefinition/ExecutionRole/DefaultPolicy",
+                    "children": {
+                      "Resource": {
+                        "id": "Resource",
+                        "path": "ContainerImageBuildIntegTest/TaskDefinition/ExecutionRole/DefaultPolicy/Resource",
+                        "attributes": {
+                          "aws:cdk:cloudformation:type": "AWS::IAM::Policy",
+                          "aws:cdk:cloudformation:props": {
+                            "policyDocument": {
+                              "Statement": [
+                                {
+                                  "Action": [
+                                    "ecr:BatchCheckLayerAvailability",
+                                    "ecr:BatchGetImage",
+                                    "ecr:GetDownloadUrlForLayer"
+                                  ],
+                                  "Effect": "Allow",
+                                  "Resource": {
+                                    "Fn::GetAtt": [
+                                      "BuildRepository4E6D17C2",
+                                      "Arn"
+                                    ]
+                                  }
+                                },
+                                {
+                                  "Action": "ecr:GetAuthorizationToken",
+                                  "Effect": "Allow",
+                                  "Resource": "*"
+                                },
+                                {
+                                  "Action": [
+                                    "logs:CreateLogStream",
+                                    "logs:PutLogEvents"
+                                  ],
+                                  "Effect": "Allow",
+                                  "Resource": {
+                                    "Fn::GetAtt": [
+                                      "TaskDefinitionmainLogGroup2F2AC027",
+                                      "Arn"
+                                    ]
+                                  }
+                                }
+                              ],
+                              "Version": "2012-10-17"
+                            },
+                            "policyName": "TaskDefinitionExecutionRoleDefaultPolicy1F3406F5",
+                            "roles": [
+                              {
+                                "Ref": "TaskDefinitionExecutionRole8D61C2FB"
+                              }
+                            ]
+                          }
+                        },
+                        "constructInfo": {
+                          "fqn": "aws-cdk-lib.aws_iam.CfnPolicy",
+                          "version": "2.38.0"
+                        }
+                      }
+                    },
+                    "constructInfo": {
+                      "fqn": "aws-cdk-lib.aws_iam.Policy",
+                      "version": "2.38.0"
+                    }
+                  }
+                },
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.aws_iam.Role",
+                  "version": "2.38.0"
+                }
+              }
+            },
+            "constructInfo": {
+              "fqn": "aws-cdk-lib.aws_ecs.FargateTaskDefinition",
+              "version": "2.38.0"
+            }
+          }
+        },
+        "constructInfo": {
+          "fqn": "aws-cdk-lib.Stack",
+          "version": "2.38.0"
+        }
+      },
+      "Test": {
+        "id": "Test",
+        "path": "Test",
+        "children": {
+          "DefaultTest": {
+            "id": "DefaultTest",
+            "path": "Test/DefaultTest",
+            "children": {
+              "Default": {
+                "id": "Default",
+                "path": "Test/DefaultTest/Default",
+                "constructInfo": {
+                  "fqn": "constructs.Construct",
+                  "version": "10.0.5"
+                }
+              },
+              "DeployAssert": {
+                "id": "DeployAssert",
+                "path": "Test/DefaultTest/DeployAssert",
+                "constructInfo": {
+                  "fqn": "aws-cdk-lib.Stack",
+                  "version": "2.38.0"
+                }
+              }
+            },
+            "constructInfo": {
+              "fqn": "@aws-cdk/integ-tests-alpha.IntegTestCase",
+              "version": "2.38.0-alpha.0"
+            }
+          }
+        },
+        "constructInfo": {
+          "fqn": "@aws-cdk/integ-tests-alpha.IntegTest",
+          "version": "2.38.0-alpha.0"
+        }
+      }
+    },
+    "constructInfo": {
+      "fqn": "aws-cdk-lib.App",
+      "version": "2.38.0"
+    }
+  }
+}
\ No newline at end of file
diff --git a/test/integ.container-image-build.ts b/test/integ.container-image-build.ts
new file mode 100644
index 0000000..1b96e92
--- /dev/null
+++ b/test/integ.container-image-build.ts
@@ -0,0 +1,50 @@
+import { IntegTest } from '@aws-cdk/integ-tests-alpha';
+import { Stack, StackProps, App } from 'aws-cdk-lib';
+import { Vpc, SubnetType } from 'aws-cdk-lib/aws-ec2';
+import { Platform } from 'aws-cdk-lib/aws-ecr-assets';
+import { Cluster, FargateTaskDefinition, CpuArchitecture, AwsLogDriver } from 'aws-cdk-lib/aws-ecs';
+import { DockerImageFunction } from 'aws-cdk-lib/aws-lambda';
+import { Construct } from 'constructs';
+import { ContainerImageBuild } from '../src';
+
+const app = new App();
+
+class TestStack extends Stack {
+  constructor(scope: Construct, id: string, props: StackProps = {}) {
+    super(scope, id, props);
+
+    const image = new ContainerImageBuild(this, 'Build', { directory: '../example/example-image', buildArgs: { DUMMY_FILE_SIZE_MB: '15' } });
+    const armImage = new ContainerImageBuild(this, 'BuildArm', {
+      directory: '../example/example-image',
+      platform: Platform.LINUX_ARM64,
+      repository: image.repository,
+      zstdCompression: true,
+    });
+    new DockerImageFunction(this, 'Function', {
+      code: image.toLambdaDockerImageCode(),
+    });
+    new Cluster(this, 'Cluster', {
+      vpc: new Vpc(this, 'Vpc', {
+        maxAzs: 1,
+        subnetConfiguration: [
+          {
+            cidrMask: 24,
+            name: 'public',
+            subnetType: SubnetType.PUBLIC,
+          },
+        ],
+      }),
+    });
+    new FargateTaskDefinition(this, 'TaskDefinition', { runtimePlatform: { cpuArchitecture: CpuArchitecture.ARM64 } }).addContainer('main', {
+      image: armImage.toEcsDockerImageCode(),
+      logging: new AwsLogDriver({ streamPrefix: 'main' }),
+    });
+  }
+}
+
+const stack = new TestStack(app, 'ContainerImageBuildIntegTest');
+
+new IntegTest(app, 'Test', {
+  testCases: [stack],
+  diffAssets: true,
+});
diff --git a/test/nodejs-build.integ.snapshot/NodejsBuildIntegTest.template.json b/test/nodejs-build.integ.snapshot/NodejsBuildIntegTest.template.json
index cbb4b02..ec88b1f 100644
--- a/test/nodejs-build.integ.snapshot/NodejsBuildIntegTest.template.json
+++ b/test/nodejs-build.integ.snapshot/NodejsBuildIntegTest.template.json
@@ -444,7 +444,7 @@
    "Properties": {
     "Code": {
      "S3Bucket": {
-      "Ref": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3BucketE9994E97"
+      "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC"
      },
      "S3Key": {
       "Fn::Join": [
@@ -457,7 +457,7 @@
            "Fn::Split": [
             "||",
             {
-             "Ref": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D"
+             "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
             }
            ]
           }
@@ -470,7 +470,7 @@
            "Fn::Split": [
             "||",
             {
-             "Ref": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D"
+             "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
             }
            ]
           }
@@ -683,17 +683,17 @@
   }
  },
  "Parameters": {
-  "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3BucketE9994E97": {
+  "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC": {
    "Type": "String",
-   "Description": "S3 bucket for asset \"16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f\""
+   "Description": "S3 bucket for asset \"95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49\""
   },
-  "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D": {
+  "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242": {
    "Type": "String",
-   "Description": "S3 key for asset version \"16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f\""
+   "Description": "S3 key for asset version \"95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49\""
   },
-  "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fArtifactHash5D107D4A": {
+  "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49ArtifactHash0DB02EFB": {
    "Type": "String",
-   "Description": "Artifact hash for asset \"16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f\""
+   "Description": "Artifact hash for asset \"95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49\""
   },
   "AssetParameters72f05c779a8bc73c6ec86f6eafc720508792e7526696d3ae45a7fddcfc473c9dS3Bucket7BF37945": {
    "Type": "String",
diff --git a/test/soci-index-build.integ.snapshot/asset.16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/index.js b/test/nodejs-build.integ.snapshot/asset.95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/index.js
similarity index 79%
rename from test/soci-index-build.integ.snapshot/asset.16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/index.js
rename to test/nodejs-build.integ.snapshot/asset.95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/index.js
index f63f53c..e5af2e2 100644
--- a/test/soci-index-build.integ.snapshot/asset.16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/index.js
+++ b/test/nodejs-build.integ.snapshot/asset.95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/index.js
@@ -33,12 +33,31 @@ var handler = async (event, context) => {
   try {
     if (event.RequestType == "Create" || event.RequestType == "Update") {
       const props = event.ResourceProperties;
+      const commonEnvironments = [
+        {
+          name: "responseURL",
+          value: event.ResponseURL
+        },
+        {
+          name: "stackId",
+          value: event.StackId
+        },
+        {
+          name: "requestId",
+          value: event.RequestId
+        },
+        {
+          name: "logicalResourceId",
+          value: event.LogicalResourceId
+        }
+      ];
       let command;
       switch (props.type) {
         case "NodejsBuild":
           command = new import_client_codebuild.StartBuildCommand({
             projectName: props.codeBuildProjectName,
             environmentVariablesOverride: [
+              ...commonEnvironments,
               {
                 name: "input",
                 value: JSON.stringify(props.sources.map((source) => ({
@@ -71,22 +90,6 @@ var handler = async (event, context) => {
                 name: "projectName",
                 value: props.codeBuildProjectName
               },
-              {
-                name: "responseURL",
-                value: event.ResponseURL
-              },
-              {
-                name: "stackId",
-                value: event.StackId
-              },
-              {
-                name: "requestId",
-                value: event.RequestId
-              },
-              {
-                name: "logicalResourceId",
-                value: event.LogicalResourceId
-              },
               ...Object.entries(props.environment ?? {}).map(([name, value]) => ({
                 name,
                 value
@@ -98,6 +101,7 @@ var handler = async (event, context) => {
           command = new import_client_codebuild.StartBuildCommand({
             projectName: props.codeBuildProjectName,
             environmentVariablesOverride: [
+              ...commonEnvironments,
               {
                 name: "repositoryName",
                 value: props.repositoryName
@@ -109,26 +113,43 @@ var handler = async (event, context) => {
               {
                 name: "projectName",
                 value: props.codeBuildProjectName
+              }
+            ]
+          });
+          break;
+        case "ContainerImageBuild": {
+          command = new import_client_codebuild.StartBuildCommand({
+            projectName: props.codeBuildProjectName,
+            environmentVariablesOverride: [
+              ...commonEnvironments,
+              {
+                name: "repositoryUri",
+                value: props.repositoryUri
               },
               {
-                name: "responseURL",
-                value: event.ResponseURL
+                name: "repositoryAuthUri",
+                value: props.repositoryUri.split("/")[0]
               },
               {
-                name: "stackId",
-                value: event.StackId
+                name: "buildCommand",
+                value: props.buildCommand
               },
               {
-                name: "requestId",
-                value: event.RequestId
+                name: "imageTag",
+                value: props.imageTag
+              },
+              {
+                name: "projectName",
+                value: props.codeBuildProjectName
               },
               {
-                name: "logicalResourceId",
-                value: event.LogicalResourceId
+                name: "sourceS3Url",
+                value: props.sourceS3Url
               }
             ]
           });
           break;
+        }
         default:
           throw new Error(`invalid event type ${props}}`);
       }
diff --git a/test/nodejs-build.integ.snapshot/manifest.json b/test/nodejs-build.integ.snapshot/manifest.json
index 7aa318b..11d2ec0 100644
--- a/test/nodejs-build.integ.snapshot/manifest.json
+++ b/test/nodejs-build.integ.snapshot/manifest.json
@@ -19,13 +19,13 @@
           {
             "type": "aws:cdk:asset",
             "data": {
-              "path": "asset.16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f",
-              "id": "16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f",
+              "path": "asset.95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
+              "id": "95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
               "packaging": "zip",
-              "sourceHash": "16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f",
-              "s3BucketParameter": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3BucketE9994E97",
-              "s3KeyParameter": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D",
-              "artifactHashParameter": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fArtifactHash5D107D4A"
+              "sourceHash": "95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
+              "s3BucketParameter": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC",
+              "s3KeyParameter": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242",
+              "artifactHashParameter": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49ArtifactHash0DB02EFB"
             }
           },
           {
@@ -125,22 +125,22 @@
             "data": "NodejsBuildCustomResourceHandler25648b212c404f09aa65b6bbb0c446591C4101F8"
           }
         ],
-        "/NodejsBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/S3Bucket": [
+        "/NodejsBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/S3Bucket": [
           {
             "type": "aws:cdk:logicalId",
-            "data": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3BucketE9994E97"
+            "data": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC"
           }
         ],
-        "/NodejsBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/S3VersionKey": [
+        "/NodejsBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/S3VersionKey": [
           {
             "type": "aws:cdk:logicalId",
-            "data": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D"
+            "data": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
           }
         ],
-        "/NodejsBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/ArtifactHash": [
+        "/NodejsBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/ArtifactHash": [
           {
             "type": "aws:cdk:logicalId",
-            "data": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fArtifactHash5D107D4A"
+            "data": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49ArtifactHash0DB02EFB"
           }
         ],
         "/NodejsBuildIntegTest/AssetParameters/72f05c779a8bc73c6ec86f6eafc720508792e7526696d3ae45a7fddcfc473c9d/S3Bucket": [
diff --git a/test/nodejs-build.integ.snapshot/tree.json b/test/nodejs-build.integ.snapshot/tree.json
index a113b2b..5cb795e 100644
--- a/test/nodejs-build.integ.snapshot/tree.json
+++ b/test/nodejs-build.integ.snapshot/tree.json
@@ -632,7 +632,7 @@
                   "aws:cdk:cloudformation:props": {
                     "code": {
                       "s3Bucket": {
-                        "Ref": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3BucketE9994E97"
+                        "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC"
                       },
                       "s3Key": {
                         "Fn::Join": [
@@ -645,7 +645,7 @@
                                   "Fn::Split": [
                                     "||",
                                     {
-                                      "Ref": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D"
+                                      "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
                                     }
                                   ]
                                 }
@@ -658,7 +658,7 @@
                                   "Fn::Split": [
                                     "||",
                                     {
-                                      "Ref": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D"
+                                      "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
                                     }
                                   ]
                                 }
@@ -694,13 +694,13 @@
             "id": "AssetParameters",
             "path": "NodejsBuildIntegTest/AssetParameters",
             "children": {
-              "16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f": {
-                "id": "16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f",
-                "path": "NodejsBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f",
+              "95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49": {
+                "id": "95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
+                "path": "NodejsBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
                 "children": {
                   "S3Bucket": {
                     "id": "S3Bucket",
-                    "path": "NodejsBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/S3Bucket",
+                    "path": "NodejsBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/S3Bucket",
                     "constructInfo": {
                       "fqn": "aws-cdk-lib.CfnParameter",
                       "version": "2.38.0"
@@ -708,7 +708,7 @@
                   },
                   "S3VersionKey": {
                     "id": "S3VersionKey",
-                    "path": "NodejsBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/S3VersionKey",
+                    "path": "NodejsBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/S3VersionKey",
                     "constructInfo": {
                       "fqn": "aws-cdk-lib.CfnParameter",
                       "version": "2.38.0"
@@ -716,7 +716,7 @@
                   },
                   "ArtifactHash": {
                     "id": "ArtifactHash",
-                    "path": "NodejsBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/ArtifactHash",
+                    "path": "NodejsBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/ArtifactHash",
                     "constructInfo": {
                       "fqn": "aws-cdk-lib.CfnParameter",
                       "version": "2.38.0"
diff --git a/test/soci-index-build.integ.snapshot/SociIndexBuildIntegTest.template.json b/test/soci-index-build.integ.snapshot/SociIndexBuildIntegTest.template.json
index c98a7a2..5ccd823 100644
--- a/test/soci-index-build.integ.snapshot/SociIndexBuildIntegTest.template.json
+++ b/test/soci-index-build.integ.snapshot/SociIndexBuildIntegTest.template.json
@@ -10,7 +10,7 @@
      ]
     },
     "type": "SociIndexBuild",
-    "imageTag": "3ed1eca23d9b79968633d849cdc33eb9e741dff10a381b98710031e6f77dfec7",
+    "imageTag": "a8bbd8136347d097316685416937f7ad1e2612d23493dcc4e0ef33d290c09b05",
     "repositoryName": "aws-cdk/assets",
     "codeBuildProjectName": {
      "Ref": "SociIndexBuild024cf76a10034aa4aa4b12c32c09ca3cFF24E8AD"
@@ -81,7 +81,7 @@
    "Properties": {
     "Code": {
      "S3Bucket": {
-      "Ref": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3BucketE9994E97"
+      "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC"
      },
      "S3Key": {
       "Fn::Join": [
@@ -94,7 +94,7 @@
            "Fn::Split": [
             "||",
             {
-             "Ref": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D"
+             "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
             }
            ]
           }
@@ -107,7 +107,7 @@
            "Fn::Split": [
             "||",
             {
-             "Ref": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D"
+             "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
             }
            ]
           }
@@ -333,7 +333,7 @@
      ]
     },
     "type": "SociIndexBuild",
-    "imageTag": "f1ce569ebbbba5b66c5df0982d5a926eae4242d63eb8d1323b2bd668f230be44",
+    "imageTag": "cf17887cc251b0d2ad6a734dbfd8c28d46168a4e632883267d3a06e454b1c3ad",
     "repositoryName": "aws-cdk/assets",
     "codeBuildProjectName": {
      "Ref": "SociIndexBuild024cf76a10034aa4aa4b12c32c09ca3cFF24E8AD"
@@ -344,17 +344,17 @@
   }
  },
  "Parameters": {
-  "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3BucketE9994E97": {
+  "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC": {
    "Type": "String",
-   "Description": "S3 bucket for asset \"16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f\""
+   "Description": "S3 bucket for asset \"95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49\""
   },
-  "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D": {
+  "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242": {
    "Type": "String",
-   "Description": "S3 key for asset version \"16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f\""
+   "Description": "S3 key for asset version \"95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49\""
   },
-  "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fArtifactHash5D107D4A": {
+  "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49ArtifactHash0DB02EFB": {
    "Type": "String",
-   "Description": "Artifact hash for asset \"16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f\""
+   "Description": "Artifact hash for asset \"95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49\""
   }
  }
 }
\ No newline at end of file
diff --git a/test/soci-index-build.integ.snapshot/asset.95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/index.js b/test/soci-index-build.integ.snapshot/asset.95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/index.js
new file mode 100644
index 0000000..e5af2e2
--- /dev/null
+++ b/test/soci-index-build.integ.snapshot/asset.95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/index.js
@@ -0,0 +1,189 @@
+var __create = Object.create;
+var __defProp = Object.defineProperty;
+var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
+var __getOwnPropNames = Object.getOwnPropertyNames;
+var __getProtoOf = Object.getPrototypeOf;
+var __hasOwnProp = Object.prototype.hasOwnProperty;
+var __export = (target, all) => {
+  for (var name in all)
+    __defProp(target, name, { get: all[name], enumerable: true });
+};
+var __copyProps = (to, from, except, desc) => {
+  if (from && typeof from === "object" || typeof from === "function") {
+    for (let key of __getOwnPropNames(from))
+      if (!__hasOwnProp.call(to, key) && key !== except)
+        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
+  }
+  return to;
+};
+var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
+var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
+
+// index.ts
+var trigger_codebuild_exports = {};
+__export(trigger_codebuild_exports, {
+  handler: () => handler
+});
+module.exports = __toCommonJS(trigger_codebuild_exports);
+var import_client_codebuild = require("@aws-sdk/client-codebuild");
+var import_crypto = __toESM(require("crypto"));
+var cb = new import_client_codebuild.CodeBuildClient({});
+var handler = async (event, context) => {
+  console.log(JSON.stringify(event));
+  try {
+    if (event.RequestType == "Create" || event.RequestType == "Update") {
+      const props = event.ResourceProperties;
+      const commonEnvironments = [
+        {
+          name: "responseURL",
+          value: event.ResponseURL
+        },
+        {
+          name: "stackId",
+          value: event.StackId
+        },
+        {
+          name: "requestId",
+          value: event.RequestId
+        },
+        {
+          name: "logicalResourceId",
+          value: event.LogicalResourceId
+        }
+      ];
+      let command;
+      switch (props.type) {
+        case "NodejsBuild":
+          command = new import_client_codebuild.StartBuildCommand({
+            projectName: props.codeBuildProjectName,
+            environmentVariablesOverride: [
+              ...commonEnvironments,
+              {
+                name: "input",
+                value: JSON.stringify(props.sources.map((source) => ({
+                  assetUrl: `s3://${source.sourceBucketName}/${source.sourceObjectKey}`,
+                  extractPath: source.extractPath,
+                  commands: (source.commands ?? []).join(" && ")
+                })))
+              },
+              {
+                name: "buildCommands",
+                value: props.buildCommands.join(" && ")
+              },
+              {
+                name: "destinationBucketName",
+                value: props.destinationBucketName
+              },
+              {
+                name: "destinationObjectKey",
+                value: `${import_crypto.default.randomBytes(16).toString("hex")}.zip`
+              },
+              {
+                name: "workingDirectory",
+                value: props.workingDirectory
+              },
+              {
+                name: "outputSourceDirectory",
+                value: props.outputSourceDirectory
+              },
+              {
+                name: "projectName",
+                value: props.codeBuildProjectName
+              },
+              ...Object.entries(props.environment ?? {}).map(([name, value]) => ({
+                name,
+                value
+              }))
+            ]
+          });
+          break;
+        case "SociIndexBuild":
+          command = new import_client_codebuild.StartBuildCommand({
+            projectName: props.codeBuildProjectName,
+            environmentVariablesOverride: [
+              ...commonEnvironments,
+              {
+                name: "repositoryName",
+                value: props.repositoryName
+              },
+              {
+                name: "imageTag",
+                value: props.imageTag
+              },
+              {
+                name: "projectName",
+                value: props.codeBuildProjectName
+              }
+            ]
+          });
+          break;
+        case "ContainerImageBuild": {
+          command = new import_client_codebuild.StartBuildCommand({
+            projectName: props.codeBuildProjectName,
+            environmentVariablesOverride: [
+              ...commonEnvironments,
+              {
+                name: "repositoryUri",
+                value: props.repositoryUri
+              },
+              {
+                name: "repositoryAuthUri",
+                value: props.repositoryUri.split("/")[0]
+              },
+              {
+                name: "buildCommand",
+                value: props.buildCommand
+              },
+              {
+                name: "imageTag",
+                value: props.imageTag
+              },
+              {
+                name: "projectName",
+                value: props.codeBuildProjectName
+              },
+              {
+                name: "sourceS3Url",
+                value: props.sourceS3Url
+              }
+            ]
+          });
+          break;
+        }
+        default:
+          throw new Error(`invalid event type ${props}}`);
+      }
+      const build = await cb.send(command);
+    } else {
+      await sendStatus("SUCCESS", event, context);
+    }
+  } catch (e) {
+    console.log(e);
+    const err = e;
+    await sendStatus("FAILED", event, context, err.message);
+  }
+};
+var sendStatus = async (status, event, context, reason) => {
+  const responseBody = JSON.stringify({
+    Status: status,
+    Reason: reason ?? "See the details in CloudWatch Log Stream: " + context.logStreamName,
+    PhysicalResourceId: context.logStreamName,
+    StackId: event.StackId,
+    RequestId: event.RequestId,
+    LogicalResourceId: event.LogicalResourceId,
+    NoEcho: false,
+    Data: {}
+  });
+  await fetch(event.ResponseURL, {
+    method: "PUT",
+    body: responseBody,
+    headers: {
+      "Content-Type": "",
+      "Content-Length": responseBody.length.toString()
+    }
+  });
+};
+// Annotate the CommonJS export names for ESM import in node:
+0 && (module.exports = {
+  handler
+});
diff --git a/test/soci-index-build.integ.snapshot/asset.f1ce569ebbbba5b66c5df0982d5a926eae4242d63eb8d1323b2bd668f230be44/Dockerfile b/test/soci-index-build.integ.snapshot/asset.a8bbd8136347d097316685416937f7ad1e2612d23493dcc4e0ef33d290c09b05/Dockerfile
similarity index 84%
rename from test/soci-index-build.integ.snapshot/asset.f1ce569ebbbba5b66c5df0982d5a926eae4242d63eb8d1323b2bd668f230be44/Dockerfile
rename to test/soci-index-build.integ.snapshot/asset.a8bbd8136347d097316685416937f7ad1e2612d23493dcc4e0ef33d290c09b05/Dockerfile
index abcb86c..b2b2647 100644
--- a/test/soci-index-build.integ.snapshot/asset.f1ce569ebbbba5b66c5df0982d5a926eae4242d63eb8d1323b2bd668f230be44/Dockerfile
+++ b/test/soci-index-build.integ.snapshot/asset.a8bbd8136347d097316685416937f7ad1e2612d23493dcc4e0ef33d290c09b05/Dockerfile
@@ -1,4 +1,4 @@
-FROM nginx:latest
+FROM public.ecr.aws/nginx/nginx:1.26
 # create dummy file to change the size of a image
 ARG DUMMY_FILE_SIZE_MB="10"
 # RUN fallocate -l ${DUMMY_FILE_SIZE_MB} dummy.img
diff --git a/test/soci-index-build.integ.snapshot/asset.cf17887cc251b0d2ad6a734dbfd8c28d46168a4e632883267d3a06e454b1c3ad/Dockerfile b/test/soci-index-build.integ.snapshot/asset.cf17887cc251b0d2ad6a734dbfd8c28d46168a4e632883267d3a06e454b1c3ad/Dockerfile
new file mode 100644
index 0000000..b2b2647
--- /dev/null
+++ b/test/soci-index-build.integ.snapshot/asset.cf17887cc251b0d2ad6a734dbfd8c28d46168a4e632883267d3a06e454b1c3ad/Dockerfile
@@ -0,0 +1,5 @@
+FROM public.ecr.aws/nginx/nginx:1.26
+# create dummy file to change the size of a image
+ARG DUMMY_FILE_SIZE_MB="10"
+# RUN fallocate -l ${DUMMY_FILE_SIZE_MB} dummy.img
+RUN dd if=/dev/zero of=dummy.img bs=1M count=${DUMMY_FILE_SIZE_MB}
diff --git a/test/soci-index-build.integ.snapshot/manifest.json b/test/soci-index-build.integ.snapshot/manifest.json
index 74d4416..a2aab45 100644
--- a/test/soci-index-build.integ.snapshot/manifest.json
+++ b/test/soci-index-build.integ.snapshot/manifest.json
@@ -20,11 +20,11 @@
             "type": "aws:cdk:asset",
             "data": {
               "repositoryName": "aws-cdk/assets",
-              "imageTag": "3ed1eca23d9b79968633d849cdc33eb9e741dff10a381b98710031e6f77dfec7",
-              "id": "3ed1eca23d9b79968633d849cdc33eb9e741dff10a381b98710031e6f77dfec7",
+              "imageTag": "a8bbd8136347d097316685416937f7ad1e2612d23493dcc4e0ef33d290c09b05",
+              "id": "a8bbd8136347d097316685416937f7ad1e2612d23493dcc4e0ef33d290c09b05",
               "packaging": "container-image",
-              "path": "asset.3ed1eca23d9b79968633d849cdc33eb9e741dff10a381b98710031e6f77dfec7",
-              "sourceHash": "3ed1eca23d9b79968633d849cdc33eb9e741dff10a381b98710031e6f77dfec7",
+              "path": "asset.a8bbd8136347d097316685416937f7ad1e2612d23493dcc4e0ef33d290c09b05",
+              "sourceHash": "a8bbd8136347d097316685416937f7ad1e2612d23493dcc4e0ef33d290c09b05",
               "buildArgs": {
                 "DUMMY_FILE_SIZE_MB": "10"
               }
@@ -33,24 +33,24 @@
           {
             "type": "aws:cdk:asset",
             "data": {
-              "path": "asset.16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f",
-              "id": "16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f",
+              "path": "asset.95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
+              "id": "95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
               "packaging": "zip",
-              "sourceHash": "16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f",
-              "s3BucketParameter": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3BucketE9994E97",
-              "s3KeyParameter": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D",
-              "artifactHashParameter": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fArtifactHash5D107D4A"
+              "sourceHash": "95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
+              "s3BucketParameter": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC",
+              "s3KeyParameter": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242",
+              "artifactHashParameter": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49ArtifactHash0DB02EFB"
             }
           },
           {
             "type": "aws:cdk:asset",
             "data": {
               "repositoryName": "aws-cdk/assets",
-              "imageTag": "f1ce569ebbbba5b66c5df0982d5a926eae4242d63eb8d1323b2bd668f230be44",
-              "id": "f1ce569ebbbba5b66c5df0982d5a926eae4242d63eb8d1323b2bd668f230be44",
+              "imageTag": "cf17887cc251b0d2ad6a734dbfd8c28d46168a4e632883267d3a06e454b1c3ad",
+              "id": "cf17887cc251b0d2ad6a734dbfd8c28d46168a4e632883267d3a06e454b1c3ad",
               "packaging": "container-image",
-              "path": "asset.f1ce569ebbbba5b66c5df0982d5a926eae4242d63eb8d1323b2bd668f230be44",
-              "sourceHash": "f1ce569ebbbba5b66c5df0982d5a926eae4242d63eb8d1323b2bd668f230be44",
+              "path": "asset.cf17887cc251b0d2ad6a734dbfd8c28d46168a4e632883267d3a06e454b1c3ad",
+              "sourceHash": "cf17887cc251b0d2ad6a734dbfd8c28d46168a4e632883267d3a06e454b1c3ad",
               "buildArgs": {
                 "DUMMY_FILE_SIZE_MB": "500"
               }
@@ -81,22 +81,22 @@
             "data": "DeployTimeBuildCustomResourceHandlerdb740fd554364a848a09e6dfcd01f4f306AEFF37"
           }
         ],
-        "/SociIndexBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/S3Bucket": [
+        "/SociIndexBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/S3Bucket": [
           {
             "type": "aws:cdk:logicalId",
-            "data": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3BucketE9994E97"
+            "data": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC"
           }
         ],
-        "/SociIndexBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/S3VersionKey": [
+        "/SociIndexBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/S3VersionKey": [
           {
             "type": "aws:cdk:logicalId",
-            "data": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D"
+            "data": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
           }
         ],
-        "/SociIndexBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/ArtifactHash": [
+        "/SociIndexBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/ArtifactHash": [
           {
             "type": "aws:cdk:logicalId",
-            "data": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fArtifactHash5D107D4A"
+            "data": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49ArtifactHash0DB02EFB"
           }
         ],
         "/SociIndexBuildIntegTest/SociIndexBuild024cf76a10034aa4aa4b12c32c09ca3c/Role/Resource": [
diff --git a/test/soci-index-build.integ.snapshot/tree.json b/test/soci-index-build.integ.snapshot/tree.json
index 9c65954..4d6ec9b 100644
--- a/test/soci-index-build.integ.snapshot/tree.json
+++ b/test/soci-index-build.integ.snapshot/tree.json
@@ -227,7 +227,7 @@
                   "aws:cdk:cloudformation:props": {
                     "code": {
                       "s3Bucket": {
-                        "Ref": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3BucketE9994E97"
+                        "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3Bucket73B303AC"
                       },
                       "s3Key": {
                         "Fn::Join": [
@@ -240,7 +240,7 @@
                                   "Fn::Split": [
                                     "||",
                                     {
-                                      "Ref": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D"
+                                      "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
                                     }
                                   ]
                                 }
@@ -253,7 +253,7 @@
                                   "Fn::Split": [
                                     "||",
                                     {
-                                      "Ref": "AssetParameters16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730fS3VersionKey0A39C10D"
+                                      "Ref": "AssetParameters95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49S3VersionKey39332242"
                                     }
                                   ]
                                 }
@@ -289,13 +289,13 @@
             "id": "AssetParameters",
             "path": "SociIndexBuildIntegTest/AssetParameters",
             "children": {
-              "16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f": {
-                "id": "16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f",
-                "path": "SociIndexBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f",
+              "95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49": {
+                "id": "95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
+                "path": "SociIndexBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49",
                 "children": {
                   "S3Bucket": {
                     "id": "S3Bucket",
-                    "path": "SociIndexBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/S3Bucket",
+                    "path": "SociIndexBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/S3Bucket",
                     "constructInfo": {
                       "fqn": "aws-cdk-lib.CfnParameter",
                       "version": "2.38.0"
@@ -303,7 +303,7 @@
                   },
                   "S3VersionKey": {
                     "id": "S3VersionKey",
-                    "path": "SociIndexBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/S3VersionKey",
+                    "path": "SociIndexBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/S3VersionKey",
                     "constructInfo": {
                       "fqn": "aws-cdk-lib.CfnParameter",
                       "version": "2.38.0"
@@ -311,7 +311,7 @@
                   },
                   "ArtifactHash": {
                     "id": "ArtifactHash",
-                    "path": "SociIndexBuildIntegTest/AssetParameters/16b8e50f31d31f0d011e69034b4400b65b3db876ce1a6f50356b6cafe6db730f/ArtifactHash",
+                    "path": "SociIndexBuildIntegTest/AssetParameters/95e46a828cd9ccdd188870e970e75b59893922504ccc3863966dce2e66fccc49/ArtifactHash",
                     "constructInfo": {
                       "fqn": "aws-cdk-lib.CfnParameter",
                       "version": "2.38.0"