From 8ae740e21f7b4bf590a08c9f58272ce847e15b77 Mon Sep 17 00:00:00 2001 From: William Putra Intan <61998484+williamputraintan@users.noreply.github.com> Date: Tue, 15 Mar 2022 14:10:11 +1100 Subject: [PATCH] Change Image lambda layer image From `lambci/lambda:build-python3.8` to `public.ecr.aws/sam/build-python3.8` --- lambdas/layers/create_layer_package.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lambdas/layers/create_layer_package.sh b/lambdas/layers/create_layer_package.sh index 03b2f3099..cfddc7dda 100755 --- a/lambdas/layers/create_layer_package.sh +++ b/lambdas/layers/create_layer_package.sh @@ -18,7 +18,13 @@ rm -rf ${PKG_DIR} && mkdir -p ${PKG_DIR} cp -R ${LAYER_DIR}/ ${PKG_DIR}/ # install the python libraries (without dependencies) -docker run --rm -v ${SCRIPT_PATH}/python:/foo -w /foo lambci/lambda:build-python3.8 pip install -r requirements.txt --no-deps -t ./ +docker run \ + --platform=linux/x86-64 \ + --rm \ + -v ${SCRIPT_PATH}/python:/foo \ + -w /foo \ + public.ecr.aws/sam/build-python3.8 \ + pip install -r requirements.txt --no-deps -t ./ # clean the lib directory rm -rf ${PKG_DIR}/*.dist-info