LayLa is a simple Python project to initialize a Lambda layer ready for build and deploy via aws-sam.
You can use layla.py
as a standalone script or via the provided Makefile.
Available make
commands:
init
: initialize .layla layer folderbuild
: build layer via aws-samdeploy
: deploy layer via aws-samclean
: clean everything built with LayLa
You will likely have to change some config variables in config.mk
.
Available variables:
- LANGUAGE, interpreter language (default
python
) - SCRIPT, script to be executed (default
layla.py
) - SAM_CMD, location of aws-sam cmd (default
"C:\Program Files\Amazon\AWSSAMCLI\bin\sam.cmd"
) - LAYLA_DIR, name of the LayLa build directory (default
.layla
) - LAYER_NAME, layer name (default
hello_layla
) - CONTENTS, Python libraries to be included in the layer (default
pandas pyjanitor
) - STACK_NAME, CloudFormation stack name (default
layla-stack
) - S3_BUCKET, s3 bucket in which aws-sam artifacts must be stored (default
layla-bucket
) - AWS_REGION, name of aws region (default
eu-central-1
)
You need make
and aws-sam
to properly exploit LayLa functionalities.
Credit for core idea goes to Bryson Tyrrell and this Richard guy.
- Silvio Lugaro, 2020