Book Image

AWS CDK in Practice

By : Mark Avdi, Leo Lam
Book Image

AWS CDK in Practice

By: Mark Avdi, Leo Lam

Overview of this book

As cloud applications are becoming more complex, multiple tools and services have emerged to cater to the challenges of running reliable solutions. Although infrastructure as code, containers, and orchestration tools, such as Kubernetes, have proved to be efficient in solving these challenges, AWS CDK represents a paradigm shift in building easily developed, extended, and maintained applications. With AWS CDK in Practice, you’ll start by setting up basic day-to-day infrastructure while understanding the new prospects that CDK offers. You’ll learn how to set up pipelines for building CDK applications on the cloud that are long-lasting, agile, and maintainable. You’ll also gain practical knowledge of container-based and serverless application development. Furthermore, you’ll discover how to leverage AWS CDK to build cloud solutions using code instead of configuration files. Finally, you’ll explore current community best practices for solving production issues when dealing with CDK applications. By the end of this book, you’ll have practical knowledge of CDK, and you’ll be able to leverage the power of AWS with code that is simple to write and maintain using AWS CDK.
Table of Contents (17 chapters)
Part 1: An Introduction to AWS CDK
Part 2: Practical Cloud Development with AWS CDK
Part 3: Serverless Development with AWS CDK
Part 4: Advanced Architectural Concepts

Advanced ways that CDK is leveraged

In the last chapter, we covered ISAA, our preferred ways of creating cloud applications that stand the test of time so well that we seldom need to conduct any infrastructure maintenance procedures. As CDK adoption is increasing, we are seeing interesting infrastructure patterns emerge. In this section, we will cover some of these new and interesting ways companies are using CDK to respond to infrastructure challenges that previously required heavy development work that made them out of reach for start-ups and other small tech businesses.

Creating multiple CDK stacks

For the sake of simplicity, we have so far been mainly working with a single CDK stack in each CDK app. As mentioned before, AWS CloudFormation has limit of 500 resources per stack. You might think this is a large number, but when you deal with serverless applications and deploy many Lambda functions and their dependencies such as roles and layers, you will hit this limit.