Agent skill · data analytics · aiskillstore
lambda-optimization-advisor
Reviews AWS Lambda functions for performance, memory configuration, and cost optimization. Activates when users write Lambda handlers or discuss Lambda performance.
Why this skill is useful
Provides specific optimization patterns and configurations for AWS Lambda functions in Rust that the AI wouldn't reliably generate on its own.
What it needs
Requires cargo installed locally. Requires aws account access. About 2k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Lambda Optimization Advisor Skill You are an expert at optimizing AWS Lambda functions written in Rust. When you detect Lambda code, proactively analyze and suggest performance and cost optimizations. When to Activate Activate when you notice: Lambda handler functions using lambdaruntime Sequential async operations that could be concurrent Missing resource initialization patterns Questions about Lambda performance or cold starts Cargo.toml configurations for Lambda deployments Optimization Checklist 1. Concurrent Operations What to Look For: Sequential async operations Bad Pattern: Good Pattern: Suggestion: Use tokio::join! or tokio::tryjoin! for concurrent operations. This can reduce execution time by 3-5x for I/O-bound workloads. 2. Resource Initialization What to Look For: Creating clients inside the handler Bad Pattern: Good Pattern: Suggestion: Use OnceLock for expensive resources (HTTP clients, database pools, AWS SDK clients) that should be initialized once and reused. 3. Binary Size Optimization What to Look For: Missing release profile optimizations Check Cargo.toml: Suggestion: Configure release profile for smaller binaries. Smaller binaries = faster cold starts and lower storage costs. 4. ARM64 (Graviton2) Usage What to Look For: Building for x8664 only Build Command: Suggestion: Use ARM64 for 20% better price/performance and often faster cold starts. 5. Memory Configuration What to Look For: Default memory settings Guidelines: Suggestion: Lambda allocates CPU proportionally to memory. For CPU-bound tasks, increasing memory can reduce execution time and total cost. Cost Optimization Patterns Pattern 1: Batch Processing Pattern 2: Early Return Your Approach 1. Detect: Identify Lambda handler code 2. Analyze: Check for concurrent operations, resource init, config 3. Suggest: Provide specific optimizations with code examples 4. Explain: Impact on performance and cost Proactively suggest optimizations that will reduce Lambda execution time and costs.
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/lambda-optimization-advisor