Skip to content

Conversation

@andyreagan
Copy link

@andyreagan andyreagan commented Dec 3, 2025

Summary

  • Adds a new fastapi-cicd example demonstrating functional testing for Lambda Web Adapter applications
  • Includes tests that run both Docker containers directly and via SAM local
  • Provides a GitHub Actions workflow for CI/CD (included as reference, won't run from examples folder)
  • Uses modern Python tooling with uv for fast, reproducible dependency management

Features

  • FastAPI application with / and /health endpoints
  • Test infrastructure using pytest with retry logic for server startup
  • Docker testing validates the app works as a standalone web server
  • SAM local testing validates the app works in the Lambda runtime with the Web Adapter

Links

Full working repository with CI/CD: https://github.com/andyreagan/aws-lamdba-web-adapter-functional-testing

Test plan

  • Verify example builds: cd examples/fastapi-cicd && docker build -t hello-world-lambda .
  • Verify SAM build: sam build
  • Verify tests pass: uv sync && uv run pytest tests/test_functional.py -v

This example demonstrates how to run functional tests for Lambda Web
Adapter applications both locally and in CI/CD pipelines (GitHub Actions).

Features:
- FastAPI application with health endpoint
- Docker container testing
- SAM local testing for Lambda simulation
- GitHub Actions workflow
- Modern Python tooling with uv
@andyreagan andyreagan force-pushed the add-fastapi-cicd-example branch from 88088aa to 626487f Compare December 3, 2025 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants