|

AWS lambda and layers

How to add a layer made with numpy and pandas and allow your lambda to call it. Create a package #!/bin/bash # šŸ”§ Configurable variables LAYER_NAME=”pandas-layer” PYTHON_VERSION=”3.10″ PACKAGE_DIR=”python” ZIP_NAME=”${LAYER_NAME}.zip”Ā  mkdir -p $PACKAGE_DIR python$PYTHON_VERSIONĀ -mĀ pipĀ installĀ pandasĀ numpyĀ -tĀ $PACKAGE_DIR echo ” Creating zip file…” zipĀ -rĀ $ZIP_NAMEĀ $PACKAGE_DIR echo ” Layer package created: $ZIP_NAME” Add this package to your lambda layer Create a lambda…