hands-on lab

Allocating Resource Attributes with AWS CDK Tokens

Intermediate
Up to 1h
123
5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.

Description

AWS CDK Tokens represent resource attributes or values that are meant to be resolved during later stages of a CDK application's lifecycle. Tokens can be resolved in either the synthesis or deployment stage of your application. CDK tokens can serve as placeholders within your stack definitions in order to build your infrastructure without requiring the actual values of certain attributes. Dynamically resolved tokens improve the reusability of your stack definitions.

In this lab, you will deploy a CDK application that uses tokens to define certain resource attributes. The values for each token will be sourced from AWS CloudFormation deployment parameters or the AWS Systems Manager Parameter Store.

Learning Objectives

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

  • Explore the differences between resolving tokens at deployment vs. synthesis time
  • Deploy an AWS CDK application using AWS CloudFormation Parameters
  • Access AWS Systems Manager Parameter Store in your CDK stack

Intended Audience

  • Cloud Architects
  • DevOps Engineers
  • Software Engineers

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • AWS CDK
  • Amazon S3
  • AWS Lambda
  • AWS CloudFormation
  • AWS Systems Manager Parameter Store

The following content can be used to fulfill the prerequisite:

Updates

April 17th, 2024 - Resolved IAM permission issue

August 16th, 2023 - Remove Node deprecation warning and updated CDK CLI version

March 13th, 2023 - Enabled autosave in the lab's browser IDE

Environment before

Environment after

About the author

Avatar
Jun Fritz, opens in a new tab
Cloud Labs Developer
Students
40,511
Labs
109
Courses
1
Learning paths
6

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. 

Covered topics

Lab steps

Logging In to the Amazon Web Services Console
Setting up the AWS CDK Project
Deploying a CDK Stack Using AWS CloudFormation Parameters
Accessing AWS Systems Manager Parameter Values with the AWS CDK