Skip to main content

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 (appends the latest version of the layer): layer set mylayer mylambda

To set a layer to a lambda function (appends the latest version of the layer) to a specific region: layer set mylayer mylambda -r region_name

To set a layer to a lambda function (appends the latest version of the layer) to a specific region and to a specific profile: layer set mylayer mylambda -p dev_profile -r region_name

To set a list of layers: layer set mylayer1,mylayer2 mylambda

To set a list of layers replacing the older ones : layer set mylayer1,mylayer2 mylambda -d

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.

Metadata

Release files for python-layer 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-layer 1.2.2
File Size Uploaded Provenance
python-layer-1.2.2.tar.gz 4.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for python-layer 1.2.2
File Interpreter ABI Platform
python_layer-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / python-layer-1.2.2.tar.gz

Download URL python-layer-1.2.2.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7eb5e5ffd61d99e36430bcab08b0cade52b7e4409fb83d0fdd68b3e882039948
BLAKE2b-256 checksum
How to use checksums
9252741cde74b817ae8cfffddaeb613d7a9a23d16e587234b734314e6e6b8f47
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / python_layer-1.2.2-py3-none-any.whl

Download URL python_layer-1.2.2-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea6681d76fb98e6b3c415df6800d57246ae0d3fefd07ba9c83967eacf59284d1
BLAKE2b-256 checksum
How to use checksums
901822268a7c9c4c17d27a99db5150482b6866653562bc8776c49d04cb9a4a54
Upload date
Uploaded using Trusted Publishing?
What is 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

Security for python-layer 1.2.2

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page