Cold Start Optimization
// Prompt: "Optimize Lambda cold starts:// - Minimize bundle size// - Lazy loading// - Connection pooling// - Provisioned concurrency"
Accelerate serverless development with Cursor IDE and Claude Code. These patterns cover AWS Lambda, Vercel, Cloudflare Workers, event-driven architectures, and cloud-native best practices optimized for AI-assisted development.
claude "Initialize serverless framework project"
// Lambda function prompt:"Create Lambda function for image processing:- S3 trigger for uploads- Image resizing with Sharp- Multiple output formats- Error handling and retries- CloudWatch logging- X-Ray tracing"
// Generated structure:functions/ imageProcessor/ handler.ts config.yml tests/ shared/ utils/ types/
Cold Start Optimization
// Prompt: "Optimize Lambda cold starts:// - Minimize bundle size// - Lazy loading// - Connection pooling// - Provisioned concurrency"
Error Handling
// Prompt: "Add Lambda error handling:// - Dead letter queues// - Retry policies// - Circuit breakers// - Graceful degradation"
// Vercel Edge function prompt:"Create Vercel Edge function for:- Geographic routing- A/B testing- Request transformation- Authentication at edge- Response caching- Streaming responses"
// Next.js API route:"Create API route with:- Request validation- Database connection- Rate limiting- CORS handling- Error responses"
// Edge middleware:"Implement middleware for:- Auth verification- Request logging- Geolocation- Feature flags"
// Cloudflare Worker prompt:"Create Worker for API gateway:- Request routing- Authentication- Rate limiting with Durable Objects- Cache API usage- KV storage integration- R2 bucket access"
// Event-driven prompt:"Design event processing system with:- SNS/SQS integration- Event routing rules- Schema validation- Dead letter handling- Event replay capability- Monitoring and alerting"
Event Sourcing
Implement with AI:
// DynamoDB design prompt:"Design DynamoDB schema for:- Single table design- GSI optimization- Composite keys- Transactions- Streams processing- Auto-scaling"
-- Aurora Serverless:"Configure Aurora Serverless v2:- Connection pooling- Data API usage- Scaling policies- Backup strategies"
// FaunaDB setup:"Implement FaunaDB with:- ACID transactions- Global distribution- Temporal queries- Access control"