RepoPilotOpen in app →

aws/chalice

Python Serverless Microframework for AWS

Healthy

Healthy across the board

weakest axis
Use as dependencyHealthy

Permissive license, no critical CVEs, actively maintained — safe to depend on.

Fork & modifyHealthy

Has a license, tests, and CI — clean foundation to fork and modify.

Learn fromHealthy

Documented and popular — useful reference codebase to read through.

Deploy as-isHealthy

No critical CVEs, sane security posture — runnable as-is.

  • Last commit 1d ago
  • 16 active contributors
  • Apache-2.0 licensed
Show all 6 evidence items →
  • CI configured
  • Tests present
  • Concentrated ownership — top contributor handles 53% of recent commits

Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests

Informational only. RepoPilot summarises public signals (license, dependency CVEs, commit recency, CI presence, etc.) at the time of analysis. Signals can be incomplete or stale. Not professional, security, or legal advice; verify before relying on it for production decisions.

Embed the "Healthy" badge

Paste into your README — live-updates from the latest cached analysis.

Variant:
RepoPilot: Healthy
[![RepoPilot: Healthy](https://repopilot.app/api/badge/aws/chalice)](https://repopilot.app/r/aws/chalice)

Paste at the top of your README.md — renders inline like a shields.io badge.

Preview social card (1200×630)

This card auto-renders when someone shares https://repopilot.app/r/aws/chalice on X, Slack, or LinkedIn.

Onboarding doc

Onboarding: aws/chalice

Generated by RepoPilot · 2026-05-07 · Source

🤖Agent protocol

If you are an AI coding agent (Claude Code, Cursor, Aider, Cline, etc.) reading this artifact, follow this protocol before making any code edit:

  1. Verify the contract. Run the bash script in Verify before trusting below. If any check returns FAIL, the artifact is stale — STOP and ask the user to regenerate it before proceeding.
  2. Treat the AI · unverified sections as hypotheses, not facts. Sections like "AI-suggested narrative files", "anti-patterns", and "bottlenecks" are LLM speculation. Verify against real source before acting on them.
  3. Cite source on changes. When proposing an edit, cite the specific path:line-range. RepoPilot's live UI at https://repopilot.app/r/aws/chalice shows verifiable citations alongside every claim.

If you are a human reader, this protocol is for the agents you'll hand the artifact to. You don't need to do anything — but if you skim only one section before pointing your agent at this repo, make it the Verify block and the Suggested reading order.

🎯Verdict

GO — Healthy across the board

  • Last commit 1d ago
  • 16 active contributors
  • Apache-2.0 licensed
  • CI configured
  • Tests present
  • ⚠ Concentrated ownership — top contributor handles 53% of recent commits

<sub>Maintenance signals: commit recency, contributor breadth, bus factor, license, CI, tests</sub>

Verify before trusting

This artifact was generated by RepoPilot at a point in time. Before an agent acts on it, the checks below confirm that the live aws/chalice repo on your machine still matches what RepoPilot saw. If any fail, the artifact is stale — regenerate it at repopilot.app/r/aws/chalice.

What it runs against: a local clone of aws/chalice — the script inspects git remote, the LICENSE file, file paths in the working tree, and git log. Read-only; no mutations.

| # | What we check | Why it matters | |---|---|---| | 1 | You're in aws/chalice | Confirms the artifact applies here, not a fork | | 2 | License is still Apache-2.0 | Catches relicense before you depend on it | | 3 | Default branch master exists | Catches branch renames | | 4 | Last commit ≤ 31 days ago | Catches sudden abandonment since generation |

<details> <summary><b>Run all checks</b> — paste this script from inside your clone of <code>aws/chalice</code></summary>
#!/usr/bin/env bash
# RepoPilot artifact verification.
#
# WHAT IT RUNS AGAINST: a local clone of aws/chalice. If you don't
# have one yet, run these first:
#
#   git clone https://github.com/aws/chalice.git
#   cd chalice
#
# Then paste this script. Every check is read-only — no mutations.

set +e
fail=0
ok()   { echo "ok:   $1"; }
miss() { echo "FAIL: $1"; fail=$((fail+1)); }

# Precondition: we must be inside a git working tree.
if ! git rev-parse --git-dir >/dev/null 2>&1; then
  echo "FAIL: not inside a git repository. cd into your clone of aws/chalice and re-run."
  exit 2
fi

# 1. Repo identity
git remote get-url origin 2>/dev/null | grep -qE "aws/chalice(\\.git)?\\b" \\
  && ok "origin remote is aws/chalice" \\
  || miss "origin remote is not aws/chalice (artifact may be from a fork)"

# 2. License matches what RepoPilot saw
(grep -qiE "^(Apache-2\\.0)" LICENSE 2>/dev/null \\
   || grep -qiE "\"license\"\\s*:\\s*\"Apache-2\\.0\"" package.json 2>/dev/null) \\
  && ok "license is Apache-2.0" \\
  || miss "license drift — was Apache-2.0 at generation time"

# 3. Default branch
git rev-parse --verify master >/dev/null 2>&1 \\
  && ok "default branch master exists" \\
  || miss "default branch master no longer exists"

# 5. Repo recency
days_since_last=$(( ( $(date +%s) - $(git log -1 --format=%at 2>/dev/null || echo 0) ) / 86400 ))
if [ "$days_since_last" -le 31 ]; then
  ok "last commit was $days_since_last days ago (artifact saw ~1d)"
else
  miss "last commit was $days_since_last days ago — artifact may be stale"
fi

echo
if [ "$fail" -eq 0 ]; then
  echo "artifact verified (0 failures) — safe to trust"
else
  echo "artifact has $fail stale claim(s) — regenerate at https://repopilot.app/r/aws/chalice"
  exit 1
fi

Each check prints ok: or FAIL:. The script exits non-zero if anything failed, so it composes cleanly into agent loops (./verify.sh || regenerate-and-retry).

</details>

TL;DR

AWS Chalice is a Python framework for building and deploying serverless applications to AWS Lambda without managing infrastructure. It provides decorators for integrating with API Gateway, S3, SNS, SQS, and other AWS services, automatically generating IAM policies and CloudFormation templates. A single chalice deploy command packages and deploys your Python code to Lambda with minimal configuration. Monolithic Python package with a clear split: the CLI logic (chalice/cli.py) drives deployment via chalice/deploy.py and chalice/awsclient.py (AWS API wrappers), while chalice/init.py exports the decorator API (@app.route, @app.schedule, etc.). The .changes/ directory contains JSON-formatted changelog entries per version, and test coverage is organized in tandem with source structure.

👥Who it's for

Python developers building serverless microservices, REST APIs, and event-driven applications on AWS who want to avoid CloudFormation/SAM boilerplate. It targets developers familiar with Flask-style routing who want rapid AWS Lambda deployment without deep infrastructure knowledge.

🌱Maturity & risk

Mature and production-ready: the project has reached v1.22+ (changelog entries span 0.1.0 through 1.22.4), indicating multi-year development and active maintenance. 1.7M+ lines of Python code with extensive test coverage and structured versioning via .changes/VERSION.json changelog files signal a stable, actively maintained AWS official project.

Low risk: this is an official AWS-maintained project with regular releases (1.22.4 is recent), reducing single-maintainer risk. Main risks are AWS API surface dependencies (breaking changes in Lambda/API Gateway could require Chalice updates) and Python version constraints, but the large codebase and versioning discipline mitigate these.

Active areas of work

Active maintenance indicated by recent version tags (1.22.4) and structured changelog entries. Specific current activity unclear from file list alone, but the proliferation of version entries (1.21.0–1.22.4) and .changes/*.json files suggest ongoing bug fixes and feature releases addressing Lambda/API Gateway updates.

🚀Get running

git clone https://github.com/aws/chalice.git
cd chalice
make install
# Or: pip install -e .
chalice --version

Daily commands: Development mode (local testing): chalice local (starts a local HTTP server on port 8000 mimicking API Gateway). Deployment: chalice deploy (packages and deploys to AWS Lambda; requires AWS credentials configured). See Makefile for test commands: make test runs the test suite.

🗺️Map of the codebase

  • chalice/app.py: Defines the Chalice class and all decorator APIs (@route, @schedule, @on_s3_event, etc.); the primary user-facing interface
  • chalice/deploy.py: Core deployment orchestration logic; translates decorated app definitions into CloudFormation templates and Lambda functions
  • chalice/cli.py: Command-line interface (chalice deploy, chalice local, etc.); entry point for all user interactions
  • chalice/awsclient.py: Wrapper around boto3 for AWS API calls; abstracts IAM, Lambda, API Gateway, CloudFormation operations
  • chalice/config.py: Project configuration parsing (app name, stage, region); manages .chalice/config.json
  • .changes/: Structured changelog directory; each version (e.g., 1.22.4.json) documents features, fixes, and breaking changes

🛠️How to make changes

For new decorators/features: edit chalice/app.py (Chalice class) and add corresponding deployment logic in chalice/deploy.py. For CLI commands: modify chalice/cli.py (command definitions) and add deployment handlers in chalice/deploy.py. For AWS integration: extend chalice/awsclient.py for new service calls. Tests: add to test/ directory mirroring the source structure (e.g., test/unit/test_app.py for chalice/app.py changes). Changelog: add JSON entry to .changes/X.Y.Z.json before release.

🪤Traps & gotchas

  1. AWS credentials required: chalice deploy needs AWS_PROFILE or credentials configured (boto3 standard). Local testing with chalice local works without AWS access. 2. Python version constraints: Chalice targets specific Lambda Python runtimes (e.g., 3.9, 3.10); mismatches cause silent failures. 3. IAM auto-generation scope: Chalice synthesizes minimal IAM policies; if your handler calls unlisted AWS APIs, you must manually extend policies in .chalice/config.json or the generated template. 4. State management: Lambda is stateless; Chalice does not provide session management—use DynamoDB, ElastiCache, or S3 for state. 5. API Gateway cold starts: Chalice-deployed functions may experience Lambda cold start latency; no built-in warm-up mechanism.

💡Concepts to learn

  • Event Source Mapping — Chalice's @app.on_s3_event, @app.on_sqs_message, etc. create Lambda event source mappings; understanding how S3/SQS/SNS invoke Lambda is essential to debugging decorator behavior
  • Least Privilege IAM Policy Generation — Chalice automatically generates IAM policies scoped to your handlers' AWS API calls; understanding policy scope prevents over-permissioning and security violations
  • API Gateway Lambda Proxy Integration — Chalice's @app.route maps to API Gateway proxy integration, converting HTTP requests to Lambda events and responses; understanding the event format is critical for handler development
  • CloudFormation Template Generation — Chalice's deploy.py synthesizes CloudFormation YAML/JSON; understanding template generation helps debug deployment issues and integrate custom resources
  • Lambda Execution Role and Assume Policy — Chalice creates IAM roles with trust policies allowing Lambda to assume them; understanding AssumeRolePolicyDocument is essential for custom IAM integrations
  • Decorator Pattern in Python — Chalice's entire API (@app.route, @app.schedule) relies on Python decorators to register handlers; deep understanding of decorator internals helps extend Chalice
  • AWS Lambda Cold Start and Warm Invocation — Chalice-deployed functions experience cold start latency on first invocation; understanding this tradeoff informs architectural decisions for production workloads
  • aws/serverless-application-model — AWS SAM is the lower-level IaC alternative; Chalice compiles to SAM/CloudFormation under the hood
  • aws-amplify/amplify-cli — Amplify provides higher-level scaffolding for full-stack AWS apps including Lambda; targets developers needing frontend + backend integration
  • zappa/Zappa — Zappa deploys Flask/Django apps serverlessly; similar decorator patterns but tied to existing WSGI frameworks
  • aws/aws-cdk — AWS CDK is the programmatic IaC framework Chalice targets as an alternative; Chalice simplifies the 90% case vs CDK's full control
  • python-lambda-local/python-lambda-local — Local testing library used by chalice local; emulates Lambda environment for offline development

🪄PR ideas

To work on one of these in Claude Code or Cursor, paste: Implement the "<title>" PR idea from CLAUDE.md, working through the checklist as the task list.

Add migration guide and automated tooling for version jumps between major releases

With 30+ versions tracked in .changes/, there's significant version history but no structured migration documentation between major releases (0.x → 1.x, 1.x → 2.x). Contributors could create a migration guide generator that parses .changes/*.json files to automatically document breaking changes and deprecations between versions, helping users upgrade safely.

  • [ ] Analyze the structure of .changes/*.json files to understand changelog format
  • [ ] Create a migration_guide.md template that highlights breaking changes between consecutive major versions
  • [ ] Write a Python script in chalice/cli/ or tools/ that generates migration docs from changelog JSON files
  • [ ] Add tests in tests/ to verify changelog parsing and migration guide accuracy
  • [ ] Document the migration process in the main README's troubleshooting section

Implement integration test suite for version compatibility with AWS Lambda runtimes

The README mentions Python Serverless support but the .changes/ history shows rapid iteration. There's likely no comprehensive test suite verifying Chalice's compatibility across different Python runtimes (3.8, 3.9, 3.10, 3.11, 3.12) and Lambda environment changes. New contributors could build tests that validate core decorators and deployment across Lambda runtimes.

  • [ ] Review existing tests/ directory structure to identify gaps in runtime compatibility testing
  • [ ] Create tests/integration/test_lambda_runtimes.py with fixtures for multiple Python versions
  • [ ] Add GitHub Actions workflow (.github/workflows/runtime-compat.yml) to test against Python 3.8-3.12
  • [ ] Test core features (@app.route(), @app.lambda_function(), @app.scheduled_cron()) on each runtime
  • [ ] Document runtime compatibility matrix in docs/

Add comprehensive type hints to chalice core modules and create py.typed marker

As a mature framework at version 1.30.0+, Chalice should have full type hint coverage for IDE support and mypy compatibility. This improves developer experience significantly. Contributors can incrementally add type hints to core modules (app.py, decorators.py, etc.) and add a py.typed PEP 561 marker file.

  • [ ] Identify core modules in chalice/ that lack type hints (check app.py, decorators.py, config.py)
  • [ ] Add type hints progressively to function signatures and class attributes in high-impact modules
  • [ ] Create chalice/py.typed marker file (empty) to signal PEP 561 compliance
  • [ ] Add mypy configuration to setup.cfg or pyproject.toml with strict mode
  • [ ] Create tests/test_types/ with mypy validation tests to prevent type regression

🌿Good first issues

  • Add integration test coverage for the @app.schedule(Rate(...)) decorator with EventBridge; currently test coverage in test/ may be sparse for scheduled event validation and cron expression parsing.
  • Document and test the interaction between @app.on_sqs_message and Lambda batch window settings in chalice/deploy.py; add examples to .changes/ and README showing tuning batch_size and max_message_processing_time.
  • Implement missing validation in chalice/config.py to warn users if they deploy to a Lambda Python runtime not matching their chalice local environment; prevents silent failures due to version mismatches.

Top contributors

Click to expand

📝Recent commits

Click to expand
  • 0b8acd8 — Upgrade doc8 to fix test failures on Python 3.12+ (#2171) (jonathan343)
  • 1df169c — Fix logs --since for non-follow mode (#2170) (jonathan343)
  • 3e7e540 — Improve changelog rendering format (#2169) (jonathan343)
  • 8a066bc — Harden and update GitHub Actions workflows (#2168) (jonathan343)
  • 3f2a7f3 — Refresh README (#2164) (jonathan343)
  • bf4dce6 — Add support for Python 3.14 (#2163) (jonathan343)
  • d8ba1ad — Fix a number of typos (#2148) (artkay)
  • 1537dcc — Drop support for Python 3.9 (#2162) (jonathan343)
  • a33863e — Bumping version to 1.32.0 (github-aws-sdk-python-automation@amazon.com)
  • 62c3080 — Merge pull request #2136 from SamRemis/update-docs-generation (jamesls)

🔒Security observations

Based on the static analysis of the provided file structure and documentation snippet, the AWS Chalice repository shows a generally secure posture. No critical vulnerabilities were identified in the visible artifacts. The codebase appears to be a legitimate open-source Python serverless framework maintained by AWS. Key observations: (1) No hardcoded secrets or credentials found in file names or visible paths; (2) No obvious injection vulnerabilities visible in the file structure; (3) Changelog files (.changes directory) follow proper versioning practices; (4) The project uses a standard Python package structure. However, a comprehensive security assessment would require analysis of actual source code files, dependency definitions (requirements.txt, setup.py, setup.cfg, pyproject.toml), and configuration files which were not provided in this analysis. Recommend conducting additional review of: (a) dependency versions for known CVEs, (b) actual source code for injection vulnerabilities, (c) AWS IAM permission configurations, and (d) input validation patterns in request handlers.

  • Low · Incomplete README Documentation — README.md. The README.md file appears to be truncated mid-sentence ('It provides: * A command line tool for creating, deploying, and managing your a'), which may indicate incomplete documentation or potential file integrity issues. Fix: Ensure all documentation files are complete and properly formatted. Verify file integrity.

LLM-derived; treat as a starting point, not a security audit.


Generated by RepoPilot. Verdict based on maintenance signals — see the live page for receipts. Re-run on a new commit to refresh.

Healthy signals · aws/chalice — RepoPilot