Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying AWS CDK in Practice
  • Table Of Contents Toc
  • Feedback & Rating feedback
AWS CDK in Practice

AWS CDK in Practice

By : Mark Avdi, Leo Lam
4.8 (12)
close
close
AWS CDK in Practice

AWS CDK in Practice

4.8 (12)
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)
close
close
1
Part 1: An Introduction to AWS CDK
4
Part 2: Practical Cloud Development with AWS CDK
9
Part 3: Serverless Development with AWS CDK
12
Part 4: Advanced Architectural Concepts

Examining the CDK code

As you’ve already guessed, the CDK code resides within the /infrastructure directory, with the CDK entry point being the /infrastructure/bin/chapter-3.ts file:

#!/usr/bin/env node
import 'source-map-support/register';
import * as cdk from 'aws-cdk-lib';
import { Chapter3Stack } from '../lib/chapter-3-stack';
const app = new cdk.App();
new Chapter3Stack(app, 'Chapter3Stack', {});

Nothing fancy is going on here. We are just telling it to load up the root stack of the CDK app, which is Chapter3Stack. Open /infrastructure/lib/chapter-3-stack.ts in your code editor:

export class Chapter3Stack extends Stack {
  public readonly dynamodb: Dynamodb;
  public readonly s3: S3;
  public readonly ecs: ECS;
  constructor(scope: Construct, id: string, props?: StackProps) {
    super(scope, id, props);
    this.dynamodb = new Dynamodb(this,...

Unlock full access

Continue reading for free

A Packt free trial gives you instant online access to our library of over 7000 practical eBooks and videos, constantly updated with the latest in tech
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY