hands-on labDefining Cloud Infrastructure with the AWS CDK v2 in Python
The AWS Cloud Development Kit (AWS CDK) is an open-source software development framework used to define your cloud application resources using familiar programming languages.
Before the AWS CDK, you had to rely heavily on AWS CloudFormation or AWS Serverless Application Model (AWS SAM) to define your cloud application resources, which required a decent understanding of YAML or JSON. The AWS CDK provides a programming model above these native template languages that increase productivity when developers are building out their infrastructure as code.
The AWS CDK includes the AWS Construct Library which supports many AWS services and configurations as well as the AWS CDK Toolkit which serves as the primary tool for instantiating and deploying your resources to AWS CloudFormation.
In this lab, you will use the AWS CDK Toolkit to create an AWS CloudFormation stack using the Python programming language.
The majority of the steps in this lab will be performed in a code IDE, but you will be logging into the AWS console in the later stages of the lab to verify and test the resources spun up by the AWS CDK.
Important: This hands-on lab uses the latest AWS CDK v2. For hands-on labs and challenges that use the AWS CDK v1, refer to the Get Hands-on with the AWS Cloud Development Kit (CDK v1) learning path.
Upon completion of this intermediate-level lab, you will be able to:
- Initialize a new AWS CDK project
- Employ constructs from the AWS Construct Library in Python
- Use the AWS CDK Toolkit to synthesize and deploy an AWS CloudFormation template
- Invoke an AWS Lambda function with an Amazon S3 bucket event notification
- Cloud Architects
- DevOps Engineers
- Software Engineers
Familiarity with the following will be beneficial but is not required:
- AWS CloudFormation
- AWS Lambda
- Amazon Simple Storage Service (S3)
The following content can be used to fulfill the prerequisite:
- Python for Beginners
- Programming with Python Introduction
- AWS CloudFormation: Introduction to Infrastructure as Code
- Understanding AWS Lambda to Run & Scale Your Code
- Introduction to Amazon S3
August 16th, 2023 - Remove Node deprecation warning and updated CDK CLI version
May 8th, 2023 - Resolved S3 bucket deployment error
March 13th, 2023 - Enabled autosave in the lab's browser IDE
October 3rd, 2022 - Resolved CDK command issue
Jun is a Cloud Labs Developer with previous experience as a Software Engineer and Cloud Developer. He holds the AWS Certified Solutions Architect and DevOps Engineer Professional certifications. He also holds the AWS Certified Solutions Architect, Developer, and SysOps Administrator Associate certifications.
Jun is focused on giving back to the growing cloud community by sharing his knowledge and experience with students and creating engaging content.