Welcome to the
.NET AWS CDK module of the workshop!
The goal of this lab is to guide participants through:
This workshop skips the part showing basics of creating a new CDK project and adding a few basic CDK Constructs, and instead focuses on somewhat more in-depth capabilities of the CDK, by providing higher-fidelity code samples implementing closer-to-real-life scenarios. This means that the lab will start with a couple of existing, but still pretty small CDK projects, and the lab flow focuses on modifying these existing projects rather creating new ones.
The aim of the lab is to help you learn how to take your cloud-unaware ASP.NET Core application and use
C# to write code defining:
ECSFargate) and Amazon Relational Database Service (
RDS), respectively. RDS hosts a selection of popular relational databases like Aurora MySQL (HA), Aurora Postgres (HA), and SQL Server.
If you find yourself struggling with the lab or running into unexpected errors, you may skip ahead by checking out
cdk-module-completedGit branch, where all changes required for adding MySQL support are already implemented.
AWS Cloud Development Kit is a set of higher-level abstraction components built on top of the Amazon CloudFormation - an indispensible previous-generation infrastructure-as-code service, with the major difference that CDK lets programmers use most of their favorite programming languages, like C#, to generate CloudFormation templates while writing order of magnitude less code than with CloudFormation.
CDK consists of a CLI and a set of libraries available for most popular programming languages. In the case of .NET CDK, the libraries are added via NuGet.
A .NET CDK project is a Console app, generating AWS CloudFormation template. CDK CLI is a convenience tool making it possible to bypass direct contact with lower-level CloudFormation templates and related commands of AWS CLI.