AWS CDK Serverless Cookbook

A Step-by-step Guide to Building a Serverless App in the Cloud

Miguel A. Calles · Serverless CISO
Chapter by Chapter
Published in
4 min readMay 19, 2023

--

“AWS CDK Serverless Cookbook: A Step-by-Step Guide to Build a Serverless App in the Cloud” by Miguel A. Calles
AWS CDK Serverless Cookbook book cover

Foreword

I started developing serverless applications on Amazon Web Services in 2018. The team used the Serverless Framework heavily. The framework made it simple to begin developing serverless applications on AWS. Over the years, I wanted greater control of provisioning and updating cloud resources. In 2020, my team and I experimented with the AWS CDK framework to deploy our applications. It was a different experience and required more lines of code than the same setup in the Serverless Framework. An AWS CDK developer needed to understand cloud provisioning better to use it effectively. I found the CDK refreshing and wrote a blog post sharing five significant differences between the two frameworks.

Both frameworks were at version 1 at the time. We were not locked into any AWS deployment framework. As a team, we decided to continue using AWS CDK from then on. After using CDK in multiple projects, we found it allowed us to create patterns that we could reuse. We put standard deployment methods or cloud resources into reusable constructs. Spinning up new projects thus became faster and more efficient. Furthermore, we were able to make upgrades to configurations by simply updating the constructs. For example, when AWS announced deprecations to software runtimes, we would update the runtime in the construct, and all projects would benefit.

I wrote this book to share my experience using AWS CDK to build cloud-native serverless applications. I hope you find my experience over the past few years beneficial in helping you start building a serverless app with CDK.

You may be wondering why I am writing a book on Medium. These posts explain why.

Table of Contents

Introduction: An Overview of AWS, Serverless Computing, and CDK

A quick overview of Amazon Web Services, serverless computing, infrastructure-as-code, and AWS CDK.

Chapter 1: Setting Up our AWS Account and CDK Environment

We will set up our AWS account and development environment to create our application.

Chapter 2: Describing the AWS CDK Application

We will review and modify the CDK app structure.

Chapter 3: Describing the Serverless Architecture

We will describe the serverless website we will build using CDK and the cloud resources needed to make it functional and practical.

Coming soon…

Chapter 4: Launching a Website

We will create a website and make it accessible on the Internet.

Coming soon…

Chapter 5: Creating an API

We will build an application programming interface the website will call to get information.

Coming soon…

Chapter 6: Adding a Database

We will create a serverless database and have the API read its data.

Coming soon…

Chapter 7: Adding Authentication

We will update the website to allow users to sign up, log in, and access protected pages.

Coming soon…

Chapter 8: Saving Data

We will allow logged-in users to save data to the website.

Coming soon…

Chapter 9: Analyzing Data

We will create a repeatable process to analyze the data.

Coming soon…

Chapter 10: Conclusion

We will discuss next steps and other things to consider.

Coming soon…

Before you go

Subscribe to my mailing list to get new chapters delivered to your email.

Is your dream to write a book, but you are worried you do not have what it takes? You can start writing one chapter at a time. Submit your drafts to the Chapter by Chapter publication and start realizing your dream.

About the author

Miguel A. Calles is a domain expert on serverless security, author, writer, engineer & volunteer CISO at Secjuice. He has worked on multiple serverless projects as a developer and security engineer, contributed to open-source serverless projects, and worked on large military systems in various engineering roles. For fun, Miguel bowls with his family.

Copyright © 2023 by Miguel A. Calles

This work is subject to copyright. All rights are reserved by Miguel A. Calles, whether the whole or part of the material is concerned, specifically, the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed.

--

--

Miguel A. Calles · Serverless CISO
Chapter by Chapter

Author of "Serverless Security" · Specializing in CMMC, SOC 2, serverless & engineering.