hands-on lab

Managing Assets with the AWS CDK v2

Difficulty: Intermediate
Duration: Up to 45 minutes
Students: 155
Rating: 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 assets consist of local files, directories, or Docker images that represent artifacts required by your application. Assets can either be stored in an Amazon S3 bucket or Amazon ECR repository, both of which are created on your behalf during the CDK bootstrapping process. The AWS CDK is capable of bundling and managing these assets during your stack deployments.

In this lab, you will learn about the two CDK asset types and incorporate one of them in a sample CDK application.

Learning objectives

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

  • Bundle function source code and file assets with an AWS CDK application
  • Deploy an AWS Lambda Function with the AWS CDK

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

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

Covered topics

Lab steps

Exploring AWS CDK Asset Types
Setting up the AWS CDK Project
Defining an AWS Lambda Function Using Amazon S3 Assets