Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 1c06ee6

Browse files
committedSep 17, 2024··
fix: cdk bug causing buildx not to build docker images
1 parent b1ac607 commit 1c06ee6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎packages/layers/src/mediainfo/index.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,19 @@ export class MediaInfoLayer {
4343
architecture: lambda.Architecture,
4444
version: string = DEFAULT_MEDIA_INFO_VERSION
4545
): lambda.LayerVersion {
46-
const runtime = lambda.Runtime.PYTHON_3_11;
4746
const archName = architecture === lambda.Architecture.ARM_64 ? 'arm64' : 'x64';
4847

48+
// The Docker image to use to build the layer.
49+
const image = cdk.DockerImage.fromRegistry(
50+
`public.ecr.aws/sam/build-python3.11:1.124.0-${architecture.name}`
51+
);
52+
4953
// Build the layer.
5054
const layerAsset = new s3assets.Asset(scope, `Asset-${id}`, {
5155
path: path.join(__dirname),
5256
assetHashType: cdk.AssetHashType.OUTPUT,
5357
bundling: {
54-
image: runtime.bundlingImage,
58+
image,
5559
platform: architecture.dockerPlatform,
5660
command: [
5761
'/bin/bash',

0 commit comments

Comments
 (0)
Please sign in to comment.