Metadata-Version: 2.3
Name: aws_lambda_artifact_builder
Version: 0.1.3
Summary: Build and package AWS Lambda deployment artifacts: source code, dependency layers, and container images.
License: MIT
Author: Sanhe Hu
Author-email: husanhe@email.com
Maintainer: Sanhe Hu
Maintainer-email: husanhe@email.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Provides-Extra: auto
Provides-Extra: dev
Provides-Extra: doc
Provides-Extra: publish
Provides-Extra: test
Provides-Extra: upload
Requires-Dist: Sphinx (>=7.4.7,<8.0.0) ; extra == "doc"
Requires-Dist: boto3 (>=1.35.99,<2.0.0) ; extra == "publish"
Requires-Dist: boto3 (>=1.35.99,<2.0.0) ; extra == "upload"
Requires-Dist: boto3_stubs[codeartifact,lambda,s3] (>=1.35.99,<2.0.0) ; extra == "dev"
Requires-Dist: build (>=1.2.1,<2.0.0) ; extra == "dev"
Requires-Dist: docfly (==3.0.0) ; extra == "doc"
Requires-Dist: func_args (>=1.0.1,<2.0.0)
Requires-Dist: furo (==2024.8.6) ; extra == "doc"
Requires-Dist: ipython (>=8.18.1,<8.19.0) ; extra == "doc"
Requires-Dist: moto (>=5.1.10,<6.0.0) ; extra == "test"
Requires-Dist: nbsphinx (>=0.8.12,<1.0.0) ; extra == "doc"
Requires-Dist: pygments (>=2.18.0,<3.0.0) ; extra == "doc"
Requires-Dist: pytest (>=8.2.2,<9.0.0) ; extra == "test"
Requires-Dist: pytest-cov (>=6.0.0,<7.0.0) ; extra == "test"
Requires-Dist: rich (>=13.8.1,<14.0.0) ; extra == "dev"
Requires-Dist: rstobj (==1.2.1) ; extra == "doc"
Requires-Dist: s3pathlib (>=2.0.1,<3.0.0) ; extra == "publish"
Requires-Dist: s3pathlib (>=2.0.1,<3.0.0) ; extra == "upload"
Requires-Dist: simple_aws_lambda (>=0.2.1,<1.0.0) ; extra == "publish"
Requires-Dist: soft-deps (>=0.1.1,<1.0.0)
Requires-Dist: sphinx-copybutton (>=0.5.2,<1.0.0) ; extra == "doc"
Requires-Dist: sphinx-design (>=0.6.1,<1.0.0) ; extra == "doc"
Requires-Dist: sphinx-jinja (>=2.0.2,<3.0.0) ; extra == "doc"
Requires-Dist: tomli (>=2.0.0) ; python_version < "3.11"
Requires-Dist: twine (>=6.0.0,<7.0.0) ; extra == "dev"
Requires-Dist: wheel (>=0.45.0,<1.0.0) ; extra == "dev"
Project-URL: Changelog, https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/release-history.rst
Project-URL: Documentation, https://aws-lambda-artifact-builder.readthedocs.io/en/latest/
Project-URL: Download, https://pypi.org/pypi/aws-lambda-artifact-builder#files
Project-URL: Homepage, https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project
Project-URL: Issues, https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/issues
Project-URL: Repository, https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project
Description-Content-Type: text/x-rst

.. image:: https://readthedocs.org/projects/aws-lambda-artifact-builder/badge/?version=latest
    :target: https://aws-lambda-artifact-builder.readthedocs.io/en/latest/
    :alt: Documentation Status

.. image:: https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/actions/workflows/main.yml/badge.svg
    :target: https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/actions?query=workflow:CI

.. .. image:: https://codecov.io/gh/MacHu-GWU/aws_lambda_artifact_builder-project/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/MacHu-GWU/aws_lambda_artifact_builder-project

.. image:: https://img.shields.io/pypi/v/aws-lambda-artifact-builder.svg
    :target: https://pypi.python.org/pypi/aws-lambda-artifact-builder

.. image:: https://img.shields.io/pypi/l/aws-lambda-artifact-builder.svg
    :target: https://pypi.python.org/pypi/aws-lambda-artifact-builder

.. image:: https://img.shields.io/pypi/pyversions/aws-lambda-artifact-builder.svg
    :target: https://pypi.python.org/pypi/aws-lambda-artifact-builder

.. image:: https://img.shields.io/badge/✍️_Release_History!--None.svg?style=social&logo=github
    :target: https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/release-history.rst

.. image:: https://img.shields.io/badge/⭐_Star_me_on_GitHub!--None.svg?style=social&logo=github
    :target: https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project

------

.. image:: https://img.shields.io/badge/Link-API-blue.svg
    :target: https://aws-lambda-artifact-builder.readthedocs.io/en/latest/py-modindex.html

.. image:: https://img.shields.io/badge/Link-Install-blue.svg
    :target: `install`_

.. image:: https://img.shields.io/badge/Link-GitHub-blue.svg
    :target: https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project

.. image:: https://img.shields.io/badge/Link-Submit_Issue-blue.svg
    :target: https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/issues

.. image:: https://img.shields.io/badge/Link-Request_Feature-blue.svg
    :target: https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/issues

.. image:: https://img.shields.io/badge/Link-Download-blue.svg
    :target: https://pypi.org/pypi/aws-lambda-artifact-builder#files


Welcome to ``aws_lambda_artifact_builder`` Documentation
==============================================================================
.. image:: https://aws-lambda-artifact-builder.readthedocs.io/en/latest/_static/aws_lambda_artifact_builder-logo.png
    :target: https://aws-lambda-artifact-builder.readthedocs.io/en/latest/

AWS Lambda Artifact Builder is a comprehensive Python library that solves the deployment challenges every team faces when building Lambda applications. It provides battle-tested solutions for both Lambda Layer creation and deployment package building across pip, Poetry, and UV dependency managers.

**Key Features:**

- **Multi-Tool Support**: Seamless integration with pip, Poetry, and UV dependency managers
- **Cross-Platform Builds**: Container-based builds ensuring Linux compatibility from any development platform
- **Private Repository Support**: Built-in AWS CodeArtifact and private PyPI server integration
- **Command Pattern Architecture**: Granular control with simple ``builder.run()`` interface
- **Enterprise Ready**: Intelligent change detection, automated cleanup, cross-account layer sharing
- **Complete Workflow**: End-to-end automation from dependency installation to AWS deployment

**The Problems It Solves:**

- Platform compatibility issues (Windows/macOS → Linux Lambda runtime)
- Dependency separation complexity (stable layers vs changing application code)
- Build reproducibility across development, CI, and production environments
- Private repository authentication and credential management
- Storage optimization and version management
- Enterprise deployment workflows

Usage Examples
------------------------------------------------------------------------------
**Lambda Source Artifacts (Deployment Packages):**

Build application code packages for Lambda function deployment:

- `example_1_build_lambda_source_using_pip_step_by_step.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_1_build_lambda_source_using_pip_step_by_step.py>`_: Step-by-step source building with pip
- `example_2_build_lambda_source_using_pip_all_in_one.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_2_build_lambda_source_using_pip_all_in_one.py>`_: All-in-one source building workflow

**Lambda Layer Artifacts:**

Build dependency layers for Lambda functions using different build tools:

**Common Setup:**

- `settings.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_repo/settings.py>`_: Shared configuration for all layer examples

**Pip Builder Examples:**

- `example_1_1_build_lambda_layer_using_pip_in_local.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_repo/example_1_1_build_lambda_layer_using_pip_in_local.py>`_: Local pip-based layer building
- `example_1_2_build_lambda_layer_using_pip_in_container.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_repo/example_1_2_build_lambda_layer_using_pip_in_container.py>`_: Container-based pip layer building

**Poetry Builder Examples:**

- `example_2_1_build_lambda_layer_using_poetry_in_local.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_repo/example_2_1_build_lambda_layer_using_poetry_in_local.py>`_: Local Poetry-based layer building
- `example_2_2_build_lambda_layer_using_poetry_in_container.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_repo/example_2_2_build_lambda_layer_using_poetry_in_container.py>`_: Container-based Poetry layer building

**UV Builder Examples:**

- `example_3_1_build_lambda_layer_using_uv_in_local.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_repo/example_3_1_build_lambda_layer_using_uv_in_local.py>`_: Local UV-based layer building
- `example_3_2_build_lambda_layer_using_uv_in_container.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_repo/example_3_2_build_lambda_layer_using_uv_in_container.py>`_: Container-based UV layer building

**Advanced Workflow Examples:**

- `example_4_package.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_repo/example_4_package.py>`_: Layer packaging with optimization and exclusions
- `example_5_upload.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_repo/example_5_upload.py>`_: S3 upload with organized artifact storage  
- `example_6_publish.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_repo/example_6_publish.py>`_: Lambda layer version publishing with change detection
- `example_7_workflow.py <https://github.com/MacHu-GWU/aws_lambda_artifact_builder-project/blob/main/example_repo/example_7_workflow.py>`_: **Complete end-to-end workflow** (Build → Package → Upload → Publish)


.. _install:

Install
------------------------------------------------------------------------------

``aws_lambda_artifact_builder`` is released on PyPI, so all you need is to:

.. code-block:: console

    $ pip install aws-lambda-artifact-builder

To upgrade to latest version:

.. code-block:: console

    $ pip install --upgrade aws-lambda-artifact-builder
