How khai-pi/dynamodb-lambda-cdk-typescript works
Main Components Identification
• AWS Lambda Functions Layer
• DynamoDB Layer
• API Gateway Layer (implied by the Lambda setup)
• Infrastructure as Code Layer (CDK)
Component Breakdown
a. Lambda Functions (Group these together):
• Create Operation
• Read Operations (get-all, get-one)
• Update Operation
• Delete Operation
b. Infrastructure Components:
• CDK Stack Definition
• CloudFormation Template (generated)
• DynamoDB Table
Client Layer
API Gateway Layer
Lambda Functions Layer
Data Layer (DynamoDB)
Specific Elements
a. Client Interaction:
• HTTP endpoints for each operation
• HTTP methods (GET, POST, PUT, DELETE)
b. Lambda Functions:
• Five Lambda functions (create, get-all, get-one, update-one, delete-one)
• Their connection to the API Gateway
• TypeScript runtime
c. Infrastructure:
• CDK stack definition
• CloudFormation template generation
• Resource provisioning flow
Additional Details
Annotations for:
• Testing setup (Jest)
• CI/CD pipeline (GitHub Actions)
• Package management separation
• TypeScript compilation flow
Relationships to Highlight
• How CDK generates CloudFormation templates
• Demonstrate Lambda function interaction with DynamoDB
• API Gateway routing to specific Lambda functions
• Deployment flow through GitHub Actions
Technical Specifications
Notes regarding:
• TypeScript usage
• Separate package.json for Lambda functions
• Testing separation between infrastructure and Lambda functions
• CI pipeline configuration
Remember to:
• Keep the infrastructure provisioning flow separate from the runtime flow
• Separation of concerns between Lambda functions
• Relationship between the CDK code and the resulting AWS resources
• Testing and CI/CD components without overwhelming the main architecture