How muhammadabyaz/go-cdk works
Main Components
A. AWS Infrastructure Layer:
• AWS CloudFormation (as the underlying deployment mechanism)
• AWS CDK (as the IaC framework)
• AWS Lambda (as the compute service)
• API Gateway (implied by the api.go file)
B. Application Components:
• API Layer (represented by /lambda/api)
• Application Logic (represented by /lambda/app)
• Database Layer (represented by /lambda/database)
• Middleware (represented by /lambda/middleware)
• Types/Models (represented by /lambda/types)
Top Tier: Infrastructure Layer
┌─────────────────────────────────────────┐
• AWS Cloud │
• ┌──────────┐ ┌──────────┐ │
• CDK │───────>│CloudForm.│ │
• ┘ └──────────┘ │
• ┘
Middle Tier: AWS Services
┌─────────────────────────────────────────┐
• ┌──────────┐ ┌──────────┐ │
• API │───────>│ Lambda │ │
• Gateway │ │Function │ │
• ┘ └──────────┘ │
• ┘
Bottom Tier: Application Components
┌─────────────────────────────────────────┐
• ┌────────┐ ┌────────┐ ┌───────────┐ │
• API │─>│ App │─>│ Database │ │
• ┘ └────────┘ └───────────┘ │
• ▲ │
• ┌────────┐ ┌────────┐ │
• Types │ │Middle- │ │
• ware │ │
• ┘ └────────┘ │
• ┘
Important Elements to Highlight
a. Infrastructure Flow:
• How the CDK code generates CloudFormation templates
• Deployment flow from CDK to AWS services
b. Runtime Flow:
• Request path from API Gateway through the Lambda function
• Internal application flow through the different components
c. Component Relationships:
• How middleware intercepts requests
• Demonstrate how types are shared across components
• Database interactions