-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
Summary
Implement the data layer: Aurora PostgreSQL Serverless v2 for persistent storage and ElastiCache Redis for caching and event bus.
Epic: #174
Architecture: docs/architecture/planned/aws-ecs-cdk.md
Tasks
Aurora PostgreSQL Serverless v2
- Create Aurora cluster with Serverless v2 capacity
- Configure min/max ACU (default: 0.5-4)
- Enable encryption at rest (KMS)
- Configure automatic backups (7 days retention)
- Store credentials in Secrets Manager (auto-generated)
- Create database security group (ECS access only)
ElastiCache Redis
- Create Redis cluster (single node, t4g.micro default)
- Enable encryption in transit (TLS)
- Enable encryption at rest
- Configure auth token in Secrets Manager
- Create Redis security group (ECS access only)
Application Prerequisites
- Verify LLM Proxy supports
rediss://URL scheme (TLS Redis) - Document connection string format for Aurora
Configuration Props
// Aurora
auroraMinCapacity?: number; // default: 0.5 ACU
auroraMaxCapacity?: number; // default: 4 ACU
auroraBackupRetention?: number; // default: 7 days
// Redis
redisNodeType?: string; // default: cache.t4g.micro
redisNumNodes?: number; // default: 1Acceptance Criteria
- Aurora cluster deploys with Serverless v2
- Redis cluster deploys with TLS enabled
- Credentials stored in Secrets Manager
- Security groups restrict access to ECS only
-
cdk deploycompletes successfully
Note: Migration testing moves to Story 3 (Compute) since we need ECS to connect to the private database.
Dependencies
- Story 1: CDK Foundation (VPC, security groups)
Estimated Effort
Medium - 2 days
Notes
- Aurora Serverless v2 scales to 0.5 ACU (~$43/month base)
- Redis t4g.micro is ~$12/month
- Database connectivity testing happens in [AWS] Story 3: Compute Layer (ECS Fargate) #178 (Compute Layer)