How aws-samples/http-api-aws-fargate-cdk works
Key Components to Include:
Main Infrastructure Layers
• Consumer Layer (API Gateway & VPC)
• Producer Layer (Fargate Services & VPC)
• Networking Layer (PrivateLink & VPC Link)
Core Services to Highlight
• HTTP API Gateway
• Two VPCs (Consumer and Producer)
• AWS Fargate Services
• Application Load Balancer (ALB)
• VPC Link
• Amazon ECR Repositories
• CloudMap Service Discovery
• ECS Cluster
• Top Layer: Consumer-facing components (HTTP API Gateway)
• Middle Layer: Networking components (VPC Link, PrivateLink)
• Bottom Layer: Backend services (Fargate, ALB, etc.)
Component Grouping
a. Consumer VPC Zone:
• Public subnets
• Bastion host
• Security groups
b. Producer VPC Zone:
• Private subnets
• Public subnets
• ALB
• Fargate services
• Service discovery
Specific Details
• Two microservices (book-service and author-service)
• ALB listener rules
• Target groups
• Security group rules
• CloudMap namespace
• Task definitions
Stack Separation
• Use a clear visual boundary between FargateVpclinkStack and HttpApiStack
• Resource dependencies between stacks
Security Aspects
• Private vs public subnets
• Security group relationships
• IAM roles and permissions
Scaling Components
• Fargate service scaling
• ALB distribution
• Service discovery points
Data Flow
• Request path from API Gateway to services
• Health check paths
• Service discovery flow