You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of today the Quickstart documentation mentions under the "Setup the serverless image resizer" section that the developer should execute the bash script located at: deployment/build-lambdas.sh.
Apparently there are two issues with the script:
It produces zipped files with sub folders, the zip file inner structure looks like: lambdas/${lambda_name}/handler.py, which breaks the commands defined in deployment/awslocal/deploy.sh and in the terraform/main.tf files. Both of them expect the handler.py file to be at the root of the zipped file.
It does not build the dependencies needed by the resize lambda. They are defined in lambdas/resize/requirements.txt and need to be built before zipping the resize lambda. Which prevents the resize lambda from working properly.
Possible solution
Fortunately this repo has another build-lambdas.sh script, this one located at: bin/build-lambdas.sh (used to be part of the deploy.sh in earlier versions). This script works as intended as it:
Navigates to each lambda folder for compressing the files, avoiding the wrong inner structure mentioned in my first listed issue;
Builds the required dependencies for the resize lambda.
It's worth noting that this script is also used by the Makefile (the build-lambdas function) and in the CI pipelines of this repo.
I can gladly make a PR moving things around but considering that the "correct" version of the build-lambdas.sh is already inside the bin folder (which makes sense) and is also used in multiple places inside this repo, it probably makes more sense to adapt the Quickstart documentation to point to the correct build-lambdas.sh and delete the other one.
The text was updated successfully, but these errors were encountered:
Description
As of today the Quickstart documentation mentions under the
"Setup the serverless image resizer"
section that the developer should execute the bash script located at:deployment/build-lambdas.sh
.Apparently there are two issues with the script:
lambdas/${lambda_name}/handler.py
, which breaks the commands defined indeployment/awslocal/deploy.sh
and in theterraform/main.tf
files. Both of them expect thehandler.py
file to be at the root of the zipped file.resize
lambda. They are defined inlambdas/resize/requirements.txt
and need to be built before zipping the resize lambda. Which prevents the resize lambda from working properly.Possible solution
Fortunately this repo has another
build-lambdas.sh
script, this one located at:bin/build-lambdas.sh
(used to be part of thedeploy.sh
in earlier versions). This script works as intended as it:It's worth noting that this script is also used by the
Makefile
(thebuild-lambdas
function) and in the CI pipelines of this repo.I can gladly make a PR moving things around but considering that the "correct" version of the
build-lambdas.sh
is already inside thebin
folder (which makes sense) and is also used in multiple places inside this repo, it probably makes more sense to adapt theQuickstart
documentation to point to the correctbuild-lambdas.sh
and delete the other one.The text was updated successfully, but these errors were encountered: