Skip to main content

ACTIG Lambda Deployer

An intelligent AWS Lambda container deployment CLI that automates code analysis and deployment using AWS Bedrock Claude for AI-powered artifact generation.

Features

✨ AI-Powered Analysis: Uses AWS Bedrock Claude to analyze Lambda code and generate optimized deployment artifacts
🐳 Container Deployments: Automated Docker container builds and ECR repository management
🚀 Complete CI/CD Pipeline: Integrates CodeCommit, CodeBuild, and CloudFormation for end-to-end automation
📦 Artifact Generation: Automatically generates Dockerfile, buildspec.yml, and CloudFormation templates
🔧 Team Standards: Follows your team's build patterns and requirements

Installation

pip install actig-lambda-deployer

Prerequisites

  • AWS CLI configured with appropriate permissions
  • AWS Bedrock access with Claude models enabled
  • Git configured for CodeCommit (if using CodeCommit)
  • Docker (for local testing)

Quick Start

1. Prepare Your Lambda Function

Your Lambda function directory should contain:

  • Python source files (.py)
  • requirements.txt file (required)

Example structure:

my-lambda/
├── lambda_function.py
└── requirements.txt

2. Deploy Your Function

actig-lambda-deployer deploy ./my-lambda --function-name my-function

The tool will:

  1. Analyze your code using AI
  2. Generate optimized deployment artifacts
  3. Create CI/CD pipeline infrastructure
  4. Build and deploy your container image
  5. Deploy your Lambda function

🔄 Updates & Redeployments: Running the command again on an existing function will automatically update it with your latest code changes. The tool reuses existing infrastructure (ECR repo, CodeCommit repo, CodeBuild project) and creates a new container image to update your Lambda function with zero downtime.

3. Check Deployment Status

actig-lambda-deployer status my-function

Configuration

AWS Credentials

Configure AWS credentials using any standard method:

# Using AWS CLI (Preferred Method)
aws configure

# Using environment variables
export AWS_ACCESS_KEY_ID=your-key
export AWS_SECRET_ACCESS_KEY=your-secret
export AWS_DEFAULT_REGION=us-east-1

# Using AWS profiles
actig-lambda-deployer deploy ./my-lambda --function-name my-func --profile production

Bedrock Access

Ensure you have access to these Bedrock models:

  • anthropic.claude-3-5-sonnet-20240620-v1:0

Enable model access in the AWS Bedrock console.

Usage Examples

Basic Deployment

actig-lambda-deployer deploy ./src --function-name api-handler

Custom ECR Repository

actig-lambda-deployer deploy ./src --function-name api-handler --repository-name my-custom-repo

Dry Run (Preview Changes)

actig-lambda-deployer deploy ./src --function-name api-handler --dry-run

Different AWS Region

actig-lambda-deployer deploy ./src --function-name api-handler --region us-west-2

Update Existing Function

# Same command updates the existing Lambda function
actig-lambda-deployer deploy ./src --function-name api-handler

Debug Mode

actig-lambda-deployer deploy ./src --function-name api-handler --log-level DEBUG

CLI Reference

Commands

  • deploy - Analyze and deploy Lambda function
  • status - Check deployment status
  • --help - Show help information

Global Options

  • --profile - AWS profile to use (default: default)
  • --region - AWS region (default: us-east-1)
  • --log-level - Logging level (DEBUG, INFO, WARNING, ERROR)

Deploy Options

  • --function-name - Lambda function name (required)
  • --repository-name - ECR repository name (optional)
  • --dry-run - Preview changes without deployment

Requirements File

Your requirements.txt must be present in the Lambda source directory. Example:

boto3>=1.26.0
requests>=2.31.0
pydantic>=1.10.0

Generated Artifacts

The tool automatically generates:

  1. Dockerfile - Optimized for Lambda container runtime
  2. buildspec.yml - CodeBuild configuration for CI/CD
  3. CloudFormation template - Infrastructure as code

These are created in your source directory and can be customized as needed.

AWS Resources Created

The deployment creates:

  • ECR repository for container images
  • CodeCommit repository for source code (optional)
  • CodeBuild project for CI/CD pipeline
  • IAM roles with minimal required permissions
  • CloudFormation stack for Lambda function
  • CloudWatch log groups

Troubleshooting

Common Issues

"requirements.txt not found"

# Ensure requirements.txt exists in your source directory
ls ./my-lambda/requirements.txt

"AWS credentials not configured"

# Configure AWS credentials
aws configure
# Or set environment variables
export AWS_PROFILE=your-profile

"Bedrock access denied"

  • Enable model access in AWS Bedrock console
  • Ensure your IAM user/role has Bedrock permissions

"Build failed with Docker errors"

  • Check your requirements.txt for invalid packages
  • Ensure all dependencies are compatible with Lambda runtime

Debug Mode

For detailed logging:

actig-lambda-deployer deploy ./src --function-name my-func --log-level DEBUG

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support

Metadata

Release files for actig-lambda-deployer 0.1.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 actig-lambda-deployer 0.1.2
File Size Uploaded
actig_lambda_deployer-0.1.2.tar.gz 32.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for actig-lambda-deployer 0.1.2
File Interpreter ABI Platform
actig_lambda_deployer-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 66.9 kB

Release files / actig_lambda_deployer-0.1.2.tar.gz

Download URL actig_lambda_deployer-0.1.2.tar.gz
Size 32.1 kB
Tags Source
SHA-256 checksum
How to use checksums
987307b63cb45f222d69388eccaf221333f191a9792df64ec838ba09c26f1796
BLAKE2b-256 checksum
How to use checksums
8f45c0589e20b8e9e4615459953dcf460cdfaa7daa5e702cb9da5f2e647e39c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / actig_lambda_deployer-0.1.2-py3-none-any.whl

Download URL actig_lambda_deployer-0.1.2-py3-none-any.whl
Size 34.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
316f0c2985f5842949c196b5d1c07914e8b4d6a98c23d12ce0c02faff9e79ff0
BLAKE2b-256 checksum
How to use checksums
3ab49bcbcef018e6ceb5c6d80756ed900a0983568ddd4e2306617af524f80f11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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