From the course: Complete Guide to Serverless Web App Development on AWS

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Challenge: Create a new Lambda function

Challenge: Create a new Lambda function

(upbeat music) - [Instructor] It is time to put your CDK skills to test. In this challenge, you'll set up the infrastructure for the demo we are going to be working throughout this chapter. Your task is to create a new CDK project and set up a basic Lambda function. To set up the infrastructure, create a new CDK project. Pick a project name like "migrating-to-lambda." Create a Lambda function. Build a simple Lambda function that returns "Hello World." Use the function construct from the AWS CDK list, AWS Lambda. Not the Node.js function. Do not add any triggers yet. We'll handle that later. Then deploy and validate everything. Deploy your infrastructure using CDK. In the AWS console, verify that the Lambda function was created. You can invoke the function to ensure that it works. Once you complete the challenge, show me in the next video, where I walk you through the solution.

Contents