From 689b0f6a04166bab1c9bbb9cf5dc01d938446fad Mon Sep 17 00:00:00 2001 From: Piotr Grzesik Date: Sun, 25 Sep 2022 22:02:47 +0200 Subject: [PATCH 1/2] feat: Switch to official AWS docker images by default BREAKING CHANGE: Switches to official AWS docker images from previous `lambci` images that did not support Python 3.9 --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 4c24bf8b..9a5c517a 100644 --- a/index.js +++ b/index.js @@ -94,7 +94,7 @@ class ServerlessPythonRequirements { ); } else if (!options.dockerFile) { // If no dockerFile is provided, use default image - const defaultImage = `lambci/lambda:build-${this.serverless.service.provider.runtime}`; + const defaultImage = `public.ecr.aws/sam/build-${this.serverless.service.provider.runtime}`; options.dockerImage = options.dockerImage || defaultImage; } if (options.layer) { From 654e0f1de66802fdfa6df4a8f74c1f73428364c1 Mon Sep 17 00:00:00 2001 From: Piotr Grzesik Date: Sun, 23 Oct 2022 15:55:12 +0200 Subject: [PATCH 2/2] feat: Use proper architecture for default docker image --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 9a5c517a..f60ca22a 100644 --- a/index.js +++ b/index.js @@ -94,7 +94,9 @@ class ServerlessPythonRequirements { ); } else if (!options.dockerFile) { // If no dockerFile is provided, use default image - const defaultImage = `public.ecr.aws/sam/build-${this.serverless.service.provider.runtime}`; + const architecture = + this.serverless.service.provider.architecture || 'x86_64'; + const defaultImage = `public.ecr.aws/sam/build-${this.serverless.service.provider.runtime}:latest-${architecture}`; options.dockerImage = options.dockerImage || defaultImage; } if (options.layer) {