hands-on lab

Invoking Amazon Bedrock Models Using the Bedrock Runtime and AWS Lambda

Difficulty: Intermediate
Duration: Up to 1 hour and 15 minutes
Students: 251
Rating: 5/5
On average, students complete this lab in25m
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

The Amazon Bedrock service includes a runtime that allows you to interact with the Amazon Nova models using APIs. The runtime is designed to be used with AWS Lambda functions, and it abstracts the complexity of invoking models, allowing you to focus on the model's input and output.

In this lab, you will deploy two AWS Lambda functions using AWS Serverless Application Model (AWS SAM) templates. Both functions will use the Amazon Bedrock runtime to interact with the Amazon Nova models. The first function will generate a text response using the Amazon Nova Micro Model, and the second function will generate an image response using the Amazon Nova Canvas model.

Learning objectives

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

  • Learn the prerequisites and limitations of the Amazon Bedrock runtime
  • Deploy a Lambda function that generates a text response using the Amazon Nova Micro model
  • Deploy a Lambda function that generates an image using the Amazon Nova Canvas model

Intended audience

  • Cloud Architects
  • Software Engineers

Prerequisites

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

  • Amazon Bedrock
  • AWS Lambda
  • Amazon API Gateway
  • AWS Serverless Application Model (AWS SAM)

The following content can be used to fulfill the prerequisites:

Updates

July 19th, 2025 - Updated lab instructions to use Amazon Nova Micro and Amazon Nova Canvas models. December 16th, 2024 - Resolved an issue preventing the lab from deploying

Environment before

Environment after

Covered topics

Hands-on Lab UUID

Lab steps

Setting up the AWS SAM CLI
Invoking the AWS Nova Micro Model Using AWS Lambda
Generating Images With the Amazon Nova Canvas Model Using AWS Lambda