Manage aws layers
Project description
Python-layer
The python-layer is a script inspired from python-lambda that can help managing aws layers. There are 5 available commands with options.
Requirements
- Python 3
- GNU Linux
Installation
You can create a new virtual environment on your computer and then install python-layer via pypi.
pip install python-layer
Getting Started
The script searches in a directory for the requirements.txt
file and creates a zip with all the dependencies. If there are .py
files, they are included in the zip.
To create a new layer:
layer build path/to/mydir
Here we suppose that mydir
has at least the requirements file.
To deploy the layer to aws:
layer deploy path/to/zip -d myshortdescription --runtime python3.7
To deploy the layer to aws to a specific region
layer deploy path/to/zip -r region_name
To deploy the layer to aws to a specific region and to a specific profile (e.g. dev profile)
layer deploy path/to/zip -p dev_profile -r region_name
To list the available layers:
layer list
To list the available layers from a specific region:
layer list -r region_name
To list the available layers from a specific region and from a specific profile (e.g. dev profile):
layer list -r region_name -p dev_profile
To set a layer to a lambda function (latest version of the layer):
layer set mylayer mylambda
To download a layer
layer download mylayer
To download a layer from a specific region:
layer download mylayer -v version_number -r region_name
To download a layer from a specific region and from a specific profile (e.g. dev profile):
layer download mylayer -v version_number -r region_name -p dev_profile
Notes
- Currently the script uses the credentials from the
~/.aws/config
file.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file python-layer-1.1.2.tar.gz
.
File metadata
- Download URL: python-layer-1.1.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98b62a46cd7533ab0546270503e0a783a0032d5d8a371695e2ed4c55f4cc5f46 |
|
MD5 | 8728e57cce2bb472dab084dc4ae4d98c |
|
BLAKE2b-256 | 3d6bee41ce37d83a770a0a2407de677cbc33cbc52eeccaa7d76e3a5b15504e38 |
File details
Details for the file python_layer-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: python_layer-1.1.2-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24b2023376553bdfb8d10b8e06d3f1faaea81dd13bf7368caf407fd2455a4014 |
|
MD5 | 8844685ccaa8b827cb0cbd68c9ce78b0 |
|
BLAKE2b-256 | f3b6fa81188f7fd9899a85297547bde400ecee529db8d3c05107d8140c2e4758 |