‫Okay, so now let's talk about the CDK
‫or AWS Cloud Development Kit.
‫So this is a way for you to define your cloud infrastructure
‫using a familiar programming language.
‫For example, you do not want to use CloudFormation directly
‫because this is a YAML format.
‫You like JavaScript or TypeScript, you like Python,
‫you like Java, you like .NET,
‫and you would like to just write your cloud infrastructure
‫using these languages.
‫So thanks to the CDK, you can do that,
‫and then once you do so by using your programming languages,
‫the code will be compiled by the CDK
‫into a usable CloudFormation template
‫in JSON or YAML formats.
‫Therefore, you can deploy your infrastructure
‫and your application runtime code together
‫because they can possibly share the same languages.
‫Which is great for Lambda function,
‫great for Docker containers in ECS and EKS.
‫So let's take an example.
‫So let's choose Python, for example,
‫as a programming language.
‫So we're going to write our own CDK application in Python,
‫and we're going to do define our Lambda function
‫of that MDB table and maybe for other services in AWS.
‫Then this CDK application, using the CDK CLI,
‫is going to be transformed into CloudFormation templates.
‫And that CloudFormation template,
‫which is a generated CloudFormation template,
‫can then be applied into CloudFormation
‫to deploy our infrastructure.
‫But the idea is that we want to use
‫a cloud infrastructure using a programming language,
‫because it allows us to get, for example, type safety.
‫Or to have more familiar constructs and so on,
‫or to go quicker, or to reuse some code,
‫or to have for loops, these kind of things.
‫So here's an example of what a CDK code would look like.
‫So in this example, this is using,
‫I believe, JavaScript or TypeScript.
‫We have a VPC that is defined, we have an ECS cluster,
‫and we have an Application Load Balancer
‫with a Fargate service.
‫And so these three things will be compiled by the CDK, CLI
‫into CloudFormation template that will be usable,
‫and that you can upload and deploy.
‫So that's it for the CDK.
‫I hope you liked it.
‫And I will see you in the next lecture.