Skip to content

Commit

Permalink
Change Image lambda layer image
Browse files Browse the repository at this point in the history
From `lambci/lambda:build-python3.8` to `public.ecr.aws/sam/build-python3.8`
  • Loading branch information
williamputraintan committed Mar 15, 2022
1 parent a31e46b commit 8ae740e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lambdas/layers/create_layer_package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ae740e

Please sign in to comment.