From the course: AWS Infrastructure as Code for Software Developers

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

CDK networking

CDK networking - Amazon Web Services (AWS) Tutorial

From the course: AWS Infrastructure as Code for Software Developers

Start my 1-month free trial

CDK networking

- [Instructor] As you saw, our demo VPC got created with routing, subnets, and gateways already created and attached. That one line of code that we wrote represents many, many lines of cloud formation code. The CDK applies some logic to our infrastructure so that we don't have to worry too much about the most time consuming task of writing infrastructure as code. For example, we know that we want to divide our VPC into public subnets and private subnets, and if we're using two availability zones, we want two public subnets and two private subnets. If you were to do this in cloud formation, you would have to manually create each one of the subnets along with the necessary configuration and routing. Also keep in mind, that you have to split your VPC's available IP range into smaller portions and allocate some of those available IP's to each subnet. The logic behind the AWS CDK, will do this IP address math for you behind the…

Contents