itsmostafa/aws-agent-skills/lambda
- community
Checking that the SKILL.md file is still in the repository.
AWS Lambda serverless functions for event-driven compute. Use when creating functions, configuring triggers, debugging invocations, optimizing cold starts, setting up event source mappings, or managing layers.
Install
npx vskill@latest install itsmostafa/aws-agent-skills/lambdaSKILL.md
AWS Lambda
AWS Lambda runs code without provisioning servers. You pay only for compute time consumed. Lambda automatically scales from a few requests per day to thousands per second.
Table of Contents
Core Concepts
Function
Your code packaged with configuration. Includes runtime, handler, memory, timeout, and IAM role.
Invocation Types
| Type | Description | Use Case | |
|---|---|---|---|
| Synchronous | Caller waits for response | API Gateway, direct invoke | |
| Asynchronous | Fire and forget | S3, SNS, EventBridge | |
| Poll-based | Lambda polls source | SQS, Kinesis, DynamoDB Streams |
Execution Environment
Lambda creates execution environments to run your function. Components:
- Cold start: New environment initialization
- Warm start: Reusing existing environment
- Handler: Entry point function
- Context: Runtime information
Layers
Reusable packages of libraries, dependencies, or custom runtimes (up to 5 per function).
Common Patterns
Create a Python Function
AWS CLI:
boto3:
Add S3 Trigger
Add SQS Event Source
Environment Variables
Create and Attach Layer
Invoke Function
CLI Reference
Function Management
| Command | Description | |
|---|---|---|
aws lambda create-function | Create new function | |
aws lambda update-function-code | Update function code | |
aws lambda update-function-configuration | Update settings | |
aws lambda delete-function | Delete function | |
aws lambda list-functions | List all functions | |
aws lambda get-function | Get function details |
Invocation
| Command | Description | |
|---|---|---|
aws lambda invoke | Invoke function | |
aws lambda invoke-async | Async invoke (deprecated) |
Event Sources
| Command | Description | |
|---|---|---|
aws lambda create-event-source-mapping | Add event source | |
aws lambda list-event-source-mappings | List mappings | |
aws lambda update-event-source-mapping | Update mapping | |
aws lambda delete-event-source-mapping | Remove mapping |
Permissions
| Command | Description | |
|---|---|---|
aws lambda add-permission | Add resource-based policy | |
aws lambda remove-permission | Remove permission | |
aws lambda get-policy | View resource policy |
Best Practices
Performance
- Right-size memory: More memory = more CPU = faster execution
- Minimize cold starts: Keep functions warm, use Provisioned Concurrency
- Optimize package size: Smaller packages deploy faster
- Use layers for shared dependencies
- Initialize outside handler: Reuse connections across invocations
Security
- Least privilege IAM roles — only grant needed permissions
- Use Secrets Manager for sensitive data
- Enable VPC only if needed (adds latency)
- Encrypt environment variables with KMS
Cost Optimization
- Set appropriate timeout — don't use max 15 minutes unnecessarily
- Use ARM architecture (Graviton2) for 34% better price/performance
- Batch process where possible
- Use Reserved Concurrency to limit costs
Reliability
- Configure DLQ for async invocations
- Handle retries — async events retry twice
- Make handlers idempotent
- Use structured logging
Troubleshooting
Timeout Errors
Symptom: Task timed out after X seconds
Causes:
- Function takes longer than timeout
- Network call to unreachable resource
- VPC configuration issues
Debug:
Out of Memory
Symptom: Function crashes with memory error
Fix:
Cold Start Latency
Causes:
- Large deployment package
- VPC configuration
- Many dependencies to load
Solutions:
- Use Provisioned Concurrency
- Reduce package size
- Use layers for dependencies
- Consider Graviton2 (ARM)
Permission Denied
Symptom: AccessDeniedException
Debug:
VPC Connectivity Issues
Symptom: Cannot reach internet or AWS services
Causes:
- No NAT Gateway for internet access
- Missing VPC endpoint for AWS services
- Security group blocking outbound
Solutions:
- Add NAT Gateway for internet
- Add VPC endpoints for AWS services
- Check security group rules
References
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNeutral, 77 of 100Ineffective. 1 run. Evaluated 7 months ago.
Source
- SKILL.md in the repositoryCheckingskills/lambda/SKILL.md
Popularity
- Repository stars
- 1,158
- Repository forks
- 443
- 7-day trend score
- 35
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 22 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/itsmostafa/aws-agent-skills/lambda)