Writing Your Own AWS CDK Constructs in TypeScript

Lab Steps

Logging in to the Amazon Web Services Console
Configuring the AWS Command Line Interface
Reviewing Your TypeScript AWS CDK Application
Standardizing S3 Bucket Configurations with CDK Constructs in TypeScript
This lab is currently under maintenance and unavailable. We're actively working to resolve this issue and we apologize for any inconvenience.

Version 1 of the AWS Cloud Development Kit (AWS CDK) is now in maintenance mode.

Refer to the AWS Cloud Development Kit (AWS CDK) v2 Learning Path for updated CDK v2 Labs and Challenges. 

Ready for the real environment experience?

Time Limit1h


The AWS CDK construct library contains classes that shape the AWS resources in your stack and come with proper defaults that allow you to focus on developing your application without worrying too much about resource details. This is useful for developing prototypes or smaller applications quickly and establishing a proof-of-concept, but what happens when the application or your development team grows?

Writing your own custom CDK constructs provides the following benefits:

  • Establish organization standards to follow best practices
  • Ensure AWS resource conventions continue to be adhered to as your application or team grows
  • Reduce the amount of code developers need to write by extracting repetitive sections

In this lab, you will refactor an existing CDK application by creating your own custom S3 construct. The process of writing your own custom constructs outlined in this lab can be applied to your own projects and development teams to fit your specific needs.

Learning Objectives

Upon completion of this intermediate-level lab, you will be able to:

  • Write a custom S3 Bucket construct with the AWS CDK
  • Refactor a CDK application to implement custom CDK constructs that you create

Intended Audience

  • Cloud Architects
  • DevOps Engineers
  • Software Engineers


Familiarity with the following will be beneficial:

  • AWS Cloud Development Kit
  • TypeScript Programming

The following courses and labs can be used to fulfill the prerequisite:

Environment before
Environment after
About the Author
Learning paths3

Jun is a Cloud Labs Developer with previous experience as a Software Engineer and Cloud Developer. He holds the AWS Certified Solutions Architect and DevOps Engineer Professional certifications. He also holds the AWS Certified Solutions Architect, Developer, and SysOps Administrator Associate certifications. 

Jun is focused on giving back to the growing cloud community by sharing his knowledge and experience with students and creating engaging content.