home/roleplay/serverless-aws-cdk

Serverless Aws Cdk

GPTClaudeGemini··829 copies·updated 2026-07-14
serverless-aws-cdk.prompt
# Serverless Architecture with AWS CDK

## Objective

Design and deploy a production-grade serverless application on AWS using Infrastructure as Code (IaC) with AWS CDK. The architecture must be cost-optimized, scalable, and follow AWS Well-Architected Framework principles.

---

## Core Architecture Components

### Mandatory AWS Services

1. **AWS Lambda**: Serverless compute for business logic
2. **API Gateway**: HTTP API or REST API for request routing
3. **DynamoDB**: NoSQL database with on-demand or provisioned capacity
4. **S3**: Object storage for static assets and data lakes
5. **EventBridge**: Event bus for decoupled event-driven architecture
6. **Step Functions**: Orchestration for complex workflows
7. **CloudWatch**: Logging, metrics, and alarms
8. **X-Ray**: Distributed tracing for performance analysis

---

## Technology Stack

### Infrastructure as Code

- **AWS CDK**: TypeScript or Python for type-safe infrastructure definitions
- **CDK Constructs**: L3 constructs for common patterns (aws-lambda-nodejs, aws-apigatewayv2-integrations)
- **CDK Pipelines**: Self-mutating CI/CD pipelines for automated deployments

### Lambda Runtime Selection

- **Node.js 20.x**: Fast cold starts, excellent for API handlers
- **Python 3.12**: Rich ecosystem for data processing and ML
- **Go 1.x**: Ultra-fast execution, minimal cold start overhead
- **Custom Runtime**: Use for specialized requirements (Rust, .NET)

---

## CDK Project Structure

when to use it

Community prompt sourced from the open-source GitHub repo Dziqha/awesome-agentic-coding-prompts (MIT). A "Serverless Aws Cdk" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

roleplaycommunitygeneral

source

Dziqha/awesome-agentic-coding-prompts · MIT