How rupeshmutha/aws_cdk_mini_project works
Project type and purpose
• This is an Infrastructure-as-Code project using AWS CDK (Python) to deploy AWS resources.
• The README states: “Deploying lambda and s3 using aws cdk via github repo.”
• It’s neither a full-stack web app nor a library, but a deployment tool that provisions cloud infrastructure (Lambda function, S3 bucket, IAM roles) via CDK.
File structure
• Top-level CI directory
• .github/workflows/main.yml: GitHub Actions pipeline for build/deploy
• CDK-AWS directory (the CDK app)
• app.py: entry point that synthesizes/stages CDK stacks
• cdk.json: CLI configuration
• setup.py & pipe-requirements.txt: Python packaging and dependencies
• config/demo_config.ini: environment/config parameters
• source.bat: Windows helper to set environment
• cdk_aws subdirectory (construct definitions)
• cdk_aws_stack.py: defines the Stack (S3 bucket, Lambda, permissions)
• iam_construct.py: reusable IAM role/permission setup
• lambda_construct.py: reusable Lambda function setup
• lambda_codes directory
• demo_lambda_module.py: the handler code for the Lambda function
README for additional insights
• No extra tooling or integrations mentioned beyond Python, AWS CDK, GitHub Actions.
a. Main components:
• Developer Workstation (Python/CDK)
• GitHub Repo (source code, CI definitions)
• GitHub Actions Runner (CI/CD pipeline)
• AWS CDK App (app.py & constructs)
• AWS CloudFormation (deploys stacks)
• AWS Services:
• IAM (roles/policies)
• S3 Bucket
• Lambda Function
b. Relationships & interactions:
• Developer pushes code → GitHub Repo → triggers GitHub Actions.
• GitHub Actions uses pipe-requirements.txt to install CDK, runs cdk synth & cdk deploy.
• CDK App (app.py) calls constructs which generate CloudFormation template.
• CloudFormation provisions S3, Lambda, and IAM roles in AWS.
• Lambda code is uploaded from lambda_codes/demo_lambda_module.py.
c. Architectural patterns/design principles:
• Infrastructure-as-Code pattern via AWS CDK (constructs, stacks).
• Reusable constructs for IAM and Lambda (separation of concerns).
• CI/CD pipeline for automated, reproducible deployments.
d. Key technologies:
• AWS CDK (Python)
• GitHub Actions
• Python packaging (setup.py, requirements file)
• AWS CloudFormation
• AWS Lambda & S3 services
Elements
• Clear labels for each component (Dev, Repo, Actions, CDK App, CloudFormation, AWS Services).
• Developer → Git push → Repo
• Repo → trigger → GitHub Actions
• Actions → executes → CDK App
• CDK App → produces → CloudFormation template
• CloudFormation → provisions → Lambda, S3, IAM
• Use rectangles for compute components (Actions Runner, CDK App).
Detailed capture of essential architectural elements
• CDK constructs module hierarchy:
• app.py instantiates cdk_aws_stack
• cdk_aws_stack imports iam_construct and lambda_construct
• Configuration loaded from demo_config.ini.
• Windows helper (source.bat) for local developers.