This is a hands-on course on how to deploy a fully Serverless web app using the AWS CDK. You will learn how to:

  • Structure **CDK Stacks **to deploy an application from end-to-end
  • Deploy a REST API integrated with AWS Lambda for dynamic requests processing
  • Store data in a fast and cost-effective way with DynamoDB
  • Use DynamoDB streams as a source for Lambda in an event-driven architecture
  • Ingest and manipulate loads of data streams with Kinesis Firehose
  • Deploy and query a Data Lake with AthenaS3 and Glue
  • Monitor your entire application health in a single place using Dashbird

You can use the resources declared in this demo application as a starting point to mix and adapt to your own architectures later, which should save you quite some time.

The App and Architecture

The demo app is a public blog where anyone can read, publish and like posts. It’s available on this link. Go ahead and publish something in the top-left corner (yellow button) and also “like” articles already published. Check out the codebase on this repo.

Frontend

Static website architecture diagram

Backend

Backend REST API and storage architecture diagram

Data Lake and Analytical Querying

Data lake and analytical querying architecture diagram

What is the AWS CDK

CDK stands for Cloud Development Kit. Think of it as CloudFormation (CF) in your preferred language (Python, Typescript, C#, etc). Roughly speaking, it works like this:

  1. You declare cloud resources using classes provided by the CDK libraries. Example:
from aws_cdk import aws_s3
my_bucket = aws_s3.Bucket(self, 'MyBucket')
  1. Run cdk deploy
  2. CDK translates this to a CloudFormation template and deploy it on AWS for you

In case you would like to dig deeper, AWS also has a workshop that will get your basics started. I also strongly recommend reading the official CDK documentation.

Advantages using the AWS CDK

  1. Use languages that are more expressive than YAML or JSON, for instance
  2. Less - much less! - verbose than CloudFormation templates
  3. Easier to apply reusability and inheritance principles to infrastructure code
  4. Better integration with IDEs for code completion, IntelliSense, etc
  5. Possible to test your infra code, just as any other software
  6. Portable: since it’s just a wrapper around CF, we can easily port it to JSON or YAML

#data lake #serverless

Crash Course on AWS CDK and Serverless with REST API and Data Lake Analytical Querying
3.60 GEEK