cloud-aws-lambda
npx machina-cli add skill partme-ai/full-stack-skills/cloud-aws-lambda --openclawFiles (1)
SKILL.md
693 B
When to use this skill
Use this skill whenever the user wants to:
- [待完善:根据具体工具添加使用场景]
How to use this skill
[待完善:根据具体工具添加使用指南]
Best Practices
[待完善:根据具体工具添加最佳实践]
Keywords
[待完善:根据具体工具添加关键词]
Source
git clone https://github.com/partme-ai/full-stack-skills/blob/main/skills/cloud-aws-lambda/SKILL.mdView on GitHub Overview
Provides guidance on building and deploying AWS Lambda functions, configuring triggers, and mastering serverless development. It helps you create scalable, event-driven code without managing servers.
How This Skill Works
Code is packaged and uploaded to Lambda with a handler that processes events. You configure runtime, memory, and timeout, and attach triggers like API Gateway, S3, or CloudWatch; AWS executes and scales your function automatically.
When to Use It
- When you need to run code in response to AWS events (e.g., S3 uploads, API calls) without provisioning servers
- When building serverless APIs with API Gateway backed by Lambda
- When you want scheduled tasks using EventBridge/CloudWatch Events
- When handling real-time data processing from streams like Kinesis or DynamoDB
- When migrating monolithic workloads to modular serverless functions for cost and agility
Quick Start
- Step 1: Set up your AWS account/credentials (CLI or Console)
- Step 2: Create a Lambda function (choose runtime, write a handler)
- Step 3: Add a trigger (API Gateway, S3, or EventBridge), configure basic settings, and test with a sample event
Best Practices
- Define least-privilege IAM roles for each Lambda function
- Keep functions small and single-purpose; minimize dependencies
- Use environment variables and AWS Secrets Manager for configuration and secrets
- Instrument with CloudWatch (logs, metrics) and enable X-Ray tracing
- Use versioning and aliases with canary deployments and proper monitoring
Example Use Cases
- Resize and optimize images on S3 upload with a Lambda trigger
- Expose a REST API with API Gateway backed by Lambda
- Process streaming data from Kinesis in real time
- Run a daily data ETL job with EventBridge (CloudWatch Events) trigger
- Automate thumbnail generation and metadata extraction after media upload
Frequently Asked Questions
Add this skill to your agents