All skills
Skillintermediate
/setup-lambda - Setup AWS Lambda Function
Configure and deploy an AWS Lambda function with proper settings.
Claude Code Knowledge Pack7/10/2026
Overview
/setup-lambda - Setup AWS Lambda Function
Configure and deploy an AWS Lambda function with proper settings.
Steps
- Ask the user for the function name, runtime (Node.js, Python, Go), and trigger type
- Create the Lambda function handler file with the appropriate template
- Generate the IAM role and policy with least-privilege permissions
- Configure environment variables for the function
- Set memory allocation (default 256MB) and timeout (default 30s) based on workload
- Configure the trigger: API Gateway, S3 event, SQS queue, EventBridge schedule, or DynamoDB stream
- Set up VPC configuration if the function needs database or internal service access
- Add CloudWatch log group with appropriate retention period (default 30 days)
- Configure dead letter queue for failed invocations
- Create the deployment package or container image configuration
- Generate the IaC definition (CloudFormation, SAM, or CDK) for the Lambda
- Document the function: purpose, trigger, environment variables, and IAM permissions
Rules
- Always use least-privilege IAM policies; never use AdministratorAccess
- Set appropriate memory and timeout; do not use maximum values by default
- Include error handling and structured logging in the handler template
- Configure reserved concurrency if the function should be rate-limited
- Use environment variables for configuration, not hardcoded values
- Enable X-Ray tracing for production functions
- Add tags for cost allocation: team, project, environment