Python Lambda Layer GitHub Action
I published an action that installs Python dependencies, packages a layer, uploads it to S3 and publishes a Lambda Layer version.
My Role
Author
My contribution
I wrote the action, packaging workflow and usage documentation.
Problem
Python Lambda projects often repeat dependency installation, archive packaging and layer-publication steps in their workflows.
The problem
I wanted to package these steps into a reusable action while keeping bucket, runtime and sharing inputs explicit.
Implementation and engineering decisions
Use a composite action
The Challenge
A separate action container adds preparation and startup work.
My implementation
I used composite Bash steps on the workflow runner, including Python setup with pip caching.
Packaging and publication run as steps in the calling workflow, using its runner environment.
Keep publication and sharing explicit
The Challenge
Layer publication and permission to consume a layer are separate operations.
My implementation
I packaged dependencies into a python directory, uploaded the archive to S3, published a layer version and added account-based usage permission.
The caller configures publishing credentials separately. The sharing input does not assume a publishing role or attach the layer to a function.
Technology
Backend
- Python
- Bash
Delivery
- GitHub Actions
- Amazon S3
- AWS Lambda
Evidence and availability
Published historical tooling. The source defaults to Python 3.7 and uses older action versions and output syntax. The historical sharing default is a wildcard: review permissions and runtime compatibility before use. Current maintenance and modern runtime compatibility have not been established.