Discovers Lambda functions running on deprecated or end-of-life runtimes, analyzes their source code for compatibility issues with newer runtimes, and provides step-by-step migration guidance with concrete code changes.
Representative prompts:
- "Which of my Lambda functions are on deprecated runtimes?"
- "Analyze my-function for upgrading from Python 3.8 to 3.12"
- "Generate a runtime upgrade report"
- "How do I migrate my Node.js 16 Lambda to Node.js 20?"
The agent follows a region-selection-first workflow:
- Region Discovery — Scans all enabled AWS regions in parallel to find which have Lambda functions and how many are deprecated/EOL.
- Region Selection — Presents a summary table and asks the user which regions to include in the report.
- Multi-Region Scan — Scans selected regions in parallel for deprecated
functions using
get_deprecated_functions_multi_region. - Code Analysis — Downloads code for the top 5 CRITICAL/HIGH priority functions only (speed optimization).
- Report Generation — Produces a structured report with executive summary, region inventory, code analysis, and migration playbook.
Target report generation time: 5-10 minutes (achieved via parallel region scanning, selective code download, and knowledge-base-driven guidance for lower-priority functions).
| Family | Versions tracked | Key migration concerns |
|---|---|---|
| Python | 3.8 → 3.13 | Removed stdlib modules (3.12), boto3 bundling |
| Node.js | 14.x → 22.x | AWS SDK v2→v3, CommonJS→ESM, OpenSSL 3.0 |
| Java | 8 → 21 | JPMS modules, javax.* removal, SDK v1→v2 |
| .NET | 6 → 8 | AOT compilation, System.Text.Json changes |
| Ruby | 3.2 → 3.3 | Minimal breaking changes |
| Custom | provided.al2 → al2023 | glibc 2.34+, OpenSSL 3.0, recompile natives |
| Tool | Purpose | Performance |
|---|---|---|
discover_lambda_regions |
Find all regions with Lambda functions | ~15-30s (parallel scan) |
list_functions_by_runtime |
List functions filtered by runtime/region | ~5-10s per region |
get_function_configuration |
Detailed function config | ~1-2s per function |
get_function_code |
Download source for analysis | ~3-10s per function |
get_runtime_support_status |
All runtimes with dates | Instant (static data) |
get_deprecated_functions |
Deprecated functions in one region | ~5-10s per region |
get_deprecated_functions_multi_region |
Deprecated functions across regions (parallel) | ~15-30s total |
Single mode — uses the Lambda execution role (or cross-account role if configured) to read function metadata and code. Read-only; does NOT modify any functions.
No special setup beyond standard deployment. The agent needs:
lambda:ListFunctions— enumerate functionslambda:GetFunction— download deployment packagelambda:GetFunctionConfiguration— read runtime/layer/handler configec2:DescribeRegions— discover enabled regions
For cross-account scanning, configure CROSS_ACCOUNT_ROLE_ARN with the
above permissions in the target account.
The agent targets 5-10 minute report generation through:
- Parallel region discovery — All regions scanned concurrently (10 threads)
- Multi-region deprecated scan — Single tool call scans all selected regions in parallel
- Selective code analysis — Only top 5 CRITICAL/HIGH functions get code downloaded
- Knowledge-base guidance — MEDIUM/LOW functions get migration advice from the embedded runtime knowledge base without code download
- Reduced report sections — 3 sections (down from 5) with only one dependency chain
{
"regions_with_functions": [
{
"region": "us-east-1",
"total_functions": 45,
"deprecated_count": 8,
"eol_count": 3,
"needs_attention": 11,
"runtimes": {"python3.8": 3, "nodejs16.x": 5, "python3.12": 37}
}
],
"total_regions": 5,
"total_functions": 120,
"total_deprecated": 15,
"total_eol": 5,
"total_needing_attention": 20
}{
"results_by_region": [
{
"region": "us-east-1",
"functions": [
{
"function_name": "my-api-handler",
"runtime": "python3.8",
"runtime_status": "end_of_life",
"upgrade_target": "python3.12",
"handler": "handler.lambda_handler",
"last_modified": "2024-03-15T10:30:00Z",
"code_size_bytes": 45000
}
],
"count": 8
}
],
"total_functions": 15,
"regions_scanned": 3,
"by_runtime": {
"python3.8": {"count": 5, "status": "end_of_life", "upgrade_target": "python3.12"},
"nodejs16.x": {"count": 10, "status": "deprecated", "upgrade_target": "nodejs20.x"}
},
"by_priority": {"end_of_life": 5, "deprecated": 10, "approaching": 0}
}| Symptom | Likely cause | Fix |
|---|---|---|
discover_lambda_regions slow |
Many enabled regions with functions | Normal — scanning 15+ regions takes ~30s |
get_function_code returns empty files |
Function uses container image packaging (PackageType: Image) |
Container images can't be downloaded via GetFunction. Check package_type in config first. |
| Code extraction hits size limit | Large deployment package with bundled deps | Use include_patterns param to target specific files, or increase max_file_size_kb. |
| Cross-account functions not listed | Missing IAM permissions in target account | Ensure the cross-account role has lambda:ListFunctions + lambda:GetFunction + ec2:DescribeRegions. |
| Runtime shows "unknown" | New runtime not yet in the support data table | Update RUNTIME_SUPPORT_DATA in the handler. |
| Report takes >10 min | Too many CRITICAL/HIGH functions triggering code download | The agent limits to top 5; if you have more, run a second pass. |