awslayer-manager
This is a simple tool that helps you build and upload your project requirements as an AWS Lambda Layer. It extracts
the requirements from your Pipfile and installs them into a separate directory which it is then deployed from. This
package also supports working with the high performance mysqlclient library by compiling it inside a docker container
that closely mimics the AWS Lambda environment and deploying it with the layer.
Installation
To install this package, run
pip install awslayer-manager
Requirements
- Requires your project to be using the
Serverlessframework. - This package requires
Dockerto build requirements to avoid compilation issues.
Running
To initialize the layer run
awslayer
in the project directory. This will extract requirements from your Pipfile and create a serverless.yml inside the layer
directory. Once the layer is initialized, it will install all the requirements inside the layers/package directory and
deploy it using sls deploy the layer to the specified environment (dev by default).
To change the deployment environment use the --env option. Currently supports dev, stage, and prod environments.
Once that is done, add the following (omit square brackets) for each function in your project's serverless.yml:
functions:
func-name:
handler: src/handler.func-name
layers:
- "${cf:[stack-name].[ServiceName]LayerLambdaLayerQualifiedArn}"
where you can find the "[ServiceName]LayerLambdaLayerQualifiedArn" identifier in the CloudFormation stack.
NOTE: This package will create a .layer directory inside your project which I recommend adding to your .gitignore
file as it is fairly heavy (depending on the size of your requirements). The script, however, will try to clean up
to the best of its ability.
Contributing
Pull requests are welcome.
Metadata
Release files for awslayer-manager 1.0.14
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| awslayer-manager-1.0.14.tar.gz | 5.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| awslayer_manager-1.0.14-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.2 kB
Release files / awslayer-manager-1.0.14.tar.gz
| Download URL | awslayer-manager-1.0.14.tar.gz |
|---|---|
| Size | 5.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
722df8ef3833364543e7981c21aecbd14eb16b685389ef2a672d72804167c261
|
|
BLAKE2b-256 checksum How to use checksums |
f8dabc38b67b1f8581f01f352ab502ce45a66acb8c06e788b2527a493723cc6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
|
Release files / awslayer_manager-1.0.14-py3-none-any.whl
| Download URL | awslayer_manager-1.0.14-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fde5b937c193ff5e2696c1f378ebd70dbc6bdecc2336a560bc924c6eae866577
|
|
BLAKE2b-256 checksum How to use checksums |
7c977d5eaa7ccd443064e1e5fbe9ff39ab987af03272d46d49b7d88c1e809dec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
|
Security for awslayer-manager 1.0.14
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.