A complete AWS SAM project with Python Lambda functions running on LocalStack, managed with Poetry and Docker.
- AWS SAM: Infrastructure as Code for serverless applications
- LocalStack: Local AWS cloud emulator for development
- Python 3.12: Modern Python with type hints
- Poetry: Dependency management and packaging
- Docker: Containerized LocalStack environment
- Multiple Lambda Functions: Examples of GET and POST endpoints
- Docker and Docker Compose
- Python 3.12+
- Poetry
- AWS CLI
- AWS SAM CLI
make install # Install dependencies
make start-localstack # Start LocalStack
make full-deploy # Build and deployLambda functions have access to the custom-utils-layer which provides shared utilities.
- Endpoint: GET
/hello - Description: Simple hello world response
make invoke-hello-with-name NAME="Anthony"Located in layers/custom_utils/, this layer provides shared functionality across all Lambda functions.
from custom_utils import get_greeting
def lambda_handler(event, context):
message = get_greeting()make stop-localstack # Stop LocalStack
make clean # Clean build artifacts