Multi-environment DevOps for CaseGuard
A C# AWS CDK app that deploys a containerized ASP.NET Core API, with staging and production in separate regions and a manual approval before production.
- GitHub
- AWS CDK
- C#
- ECS
- CodePipeline
The problem
The assignment asked for an ASP.NET API on AWS, defined with the AWS CDK in C#, and shaped so more than one environment could ship the same way.
How I thought
I kept the product API and the infrastructure in separate projects. Local development stays on the machine, against DynamoDB local. Staging and production are separate stacks, in separate regions, and production does not move until a person approves it. The homepage diagram is the simple picture: one CDK app, then the API and DynamoDB in each environment.
What I built
ProductManagementSystem is an ASP.NET Core Web API with CRUD on a Products table in DynamoDB, packaged in a Dockerfile. InfrastructureAsCode is the C# CDK app. AppStack runs the container on ECS Fargate behind an application load balancer, in its own VPC, with a public subnet for the load balancer, a private subnet for the tasks, and CloudWatch logs. PipelineStack is CodePipeline and CodeBuild.
How I solved it
A push to main starts the pipeline. CodeBuild installs dependencies, builds the CDK app, and synthesizes the templates. Staging deploys in us-east-1. The pipeline then waits. After manual approval, production deploys in us-west-2. Each environment has its own VPC, so a staging deploy does not touch production. This was a pre-employment assessment. The repository is a demonstration of that work, and the original assignment content belongs to CaseGuard.