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 Athena, S3 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
Backend
Data Lake and Analytical Querying
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:
- 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')
- Run
cdk deploy
- 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
- Use languages that are more expressive than YAML or JSON, for instance
- Less - much less! - verbose than CloudFormation templates
- Easier to apply reusability and inheritance principles to infrastructure code
- Better integration with IDEs for code completion, IntelliSense, etc
- Possible to test your infra code, just as any other software
- Portable: since it’s just a wrapper around CF, we can easily port it to JSON or YAML
#data lake #serverless