Practice in your account · 25 min
Your first call to a model in Amazon Bedrock
In this lab you will send the same prompt to Amazon Nova Lite from the Amazon Bedrock playground and from CloudShell, and you will see what changes in the response when you adjust the temperature and the token limit.
This lab is for someone who is going to call an Amazon Bedrock model for the first time. A model is an artificial intelligence program that reads a text and writes a response, and calling it means sending it that text and getting back what it answers. The text you send is called a prompt. For example, an online store that needs names for its products sends the model a prompt with what it's looking for and gets back a list of names.
You can write to a Bedrock model from the playground, which is a chat screen inside the console, or send it the request with the AWS CLI, which is the way an application does it. In both cases, the response depends on parameters, which are settings you choose before sending the prompt, such as the temperature and the limit on tokens, which module 5 of the course explains. For example, with one temperature value the model gives you almost the same name every time, and with another it gives you a different one in each response.
The whole lab is about 15 short calls to Nova Lite and costs less than a cent. Bedrock charges each call for the tokens it uses, and neither the playground nor the AWS CLI leaves resources running that keep charging. A resource is something you create in your account that AWS charges for while it exists, like a server or a storage space. For example, a short question and a one-paragraph answer use few tokens, so each call in this lab costs a fraction of a cent and, when you finish, nothing is left adding up.

An application only talks to Amazon Bedrock, and Bedrock is the one that talks to each provider's models. That is why the call is the same for every model, and switching models means changing its identifier, which is the short name Bedrock knows each model by. For example, if the store uses Amazon Nova Lite today and wants to try Mistral Large 3 tomorrow, it changes the identifier in its call and everything else stays the same.
Before you start
The labs in this step use pay-as-you-go services, so your account should have an AWS Budgets alert that warns you about the first charge. That alert is an email AWS sends you when your account starts spending, so you find out before the bill arrives. If you don't have one yet, first do the lab AWS Budgets alert on the first charge and MFA on your account. For example, if you leave something running by mistake that costs money, the email warns you in time to delete it.
Region and model
This lab uses the us-east-2 (Ohio) Region. A Region is a place in the world where AWS has its data centers, and your call is handled in the data centers of the Region you use. In a new experience account your project is already in that Region and there is no Region selector. In a full account, on the other hand, you choose it at the top right, and us-east-1 also works there with the same model.
The model is Amazon Nova Lite (amazon.nova-lite-v1:0), which according to the AWS availability table can be invoked within us-east-2, without leaving the Region. Invoking a model is the same as calling it, and the work the model does to read your prompt and write the response is called inference. Other models can only be called in us-east-2 with a cross-Region inference profile, which is a way of calling the model where AWS can handle your request in another Region. That profile's ID starts with us. (a geographic profile, which stays in US Regions) or with global.. That is the case for Amazon Nova 2 Lite, Nova Micro, Nova Pro and the Claude models, although Claude Haiku 4.5 can also be called through another endpoint. Nova Pro, for example, is invoked In-Region in us-east-1, but in us-east-2 it only has a geographic profile.
The new experience doesn't support cross-Region inference, so in that account don't use any model in this lab that only has a cross-Region profile in us-east-2. For example, if you choose Nova Pro in that account, the call fails even though the model exists, because to serve you in us-east-2 it would have to send your request to another Region.
Which model do you choose?
Your account is a new experience account and your project is in us-east-2. Which of these models can you use in the playground without cross-Region inference?
Model access
Amazon models aren't sold through AWS Marketplace, which is the AWS store where other companies sell their products, so to use Nova Lite there is no subscription and no form to fill out. Also, access to Bedrock models is enabled by default, so you can start calling the model as soon as you open the console. For example, Anthropic models ask you to fill out a first-use form before you call them, while Nova Lite answers from the first call.
cloud path tip: if you don't want to spend anything, PartyRock (https://partyrock.aws/) lets you try prompts without an AWS account or a card. It doesn't show tokens or parameters in as much detail as Bedrock, but the temperature experiment works the same way.
Call from the Bedrock playground
The playground lets you adjust two model parameters before you send a prompt: the temperature, which decides how varied the responses are, and the maximum response length, which is measured in tokens. In this part you'll send the same prompt several times with each temperature and compare what comes out.
- Open the Amazon Bedrock console (https://console.aws.amazon.com/bedrock).
- Open the chat playground ("Chat / Text playground"). If the console shows you the model catalog first, choose Amazon Nova Lite and open it in the playground.
- Choose Amazon Nova Lite as the model.
- Type
Inventa un nombre para una cafetería en Lima.and send it. Send it two more times without changing anything and copy the three responses. - In the model configuration, lower the temperature to 0 (or to the lowest value it allows) and send the prompt three times. Then raise it to the maximum and send it another three times.

A model writes its response one word at a time, and for each word it calculates how likely each option is. With a low temperature, the most likely word gets far ahead of the others and wins almost every time, while with a high temperature the probabilities even out and rare words come up more often. That is why, among your nine names, the low-temperature ones look alike and the high-temperature ones don't. For example, with a low temperature you might get a name similar to Café Limeño three times, and with a high temperature, three names that have nothing to do with each other.
- With the low temperature, set the maximum response length to a very low value (for example 10 tokens) and ask
Explica qué es Amazon S3.The response is cut off mid-sentence. - If the playground shows the input and output tokens of each response, write them down. If it doesn't show them, you will see them in the next part.
The cut in step 6 happens because the token limit stops the response at the point where the tokens run out, even if it is mid-sentence. That limit doesn't ask the model for a shorter response, so the model starts answering as it always does and is left unfinished. For example, if the store sets a very low limit to save money, its customers get descriptions cut off halfway instead of short descriptions.
In a new experience account, using a model in the playground is one of the five activities in the Explore AWS widget on Console Home that give you extra credit. Console Home is the console's main page, the widget is a box inside it, and the credit is a dollar balance that AWS puts in that account to pay for what you use. However, the calls you make to complete that activity also use credit. For example, when you finish this part of the lab the activity is complete and you get the extra credit, and at the same time your calls use a fraction of a cent of your balance.
True or false?
0 of 3With temperature 0, the same prompt tends to give almost identical responses.
Lowering the token limit makes the model summarize its response better.
If you switch from Nova Lite to another model, your application has to use a different API.
Same call from CloudShell
The AWS quickstart guide makes this call with Python and an API key. CloudShell, the terminal that opens inside the console, makes it without you installing anything, because it already comes with the AWS CLI and signs in with your console credentials, which are the details that prove to AWS who you are. For example, if you already signed in to the console with your user, CloudShell makes the calls on your behalf without asking for another password.
The command in step 8 asks Bedrock for the same thing as the playground, but written as text. --model-id says which model to use, --messages carries the prompt written in JSON, --inference-config sets the token limit and the temperature, and --query chooses which parts of the response to show. For example, if you wanted more variety in the response, you would only change the temperature number inside --inference-config.
- Open CloudShell from the console's top bar and run:
bash
aws bedrock-runtime converse \
--region us-east-2 \
--model-id amazon.nova-lite-v1:0 \
--messages '[{"role":"user","content":[{"text":"Explica qué es Amazon S3 en una oración."}]}]' \
--inference-config '{"maxTokens":200,"temperature":0.2}' \
--query '{texto: output.message.content[0].text, tokens: usage, ms: metrics.latencyMs}'
The response includes the text, the usage object with inputTokens and outputTokens, and latencyMs, which is the number of milliseconds the model took to answer.
- Change
--model-idtomistral.mistral-large-3-675b-instructand run the command again. Mistral Large 3 is a model from another provider that is also invoked within us-east-2, and the rest of the call stays the same. - Add
"stopSequences":["."]inside--inference-configand run the command again with Nova Lite. This time the model stops at the first period, at the end of the first sentence.
Input tokens are the ones in your prompt and output tokens are the ones the model wrote, and those two numbers are used to calculate what each call costs. The stop sequence in step 10 is a piece of text that, when the model writes it, makes it stop writing. For example, with the period as the stop sequence, the response ends at the first sentence even if there are still tokens left in the limit.
How to know you're done
You have finished the lab when you have these three results:
- Nine coffee shop names, where the low-temperature ones look alike and the high-temperature ones don't.
- Two cut-off responses, which stopped one because of the token limit and the other because of the stop sequence.
- An object with
texto,tokensandmsfor each of the two models, which the CloudShell command returned.
If in the new experience the command fails with AccessDeniedException or ValidationException, check that the model ID doesn't start with us. or global., because those prefixes belong to cross-Region profiles. The first error says your account doesn't have permission for what you asked, and the second, that the request contains something the service doesn't accept. For example, if you typed us.amazon.nova-lite-v1:0 instead of amazon.nova-lite-v1:0, remove the us. and run the command again.
Delete what you created
This lab leaves nothing to delete, because neither the playground nor converse creates resources. The only thing that is charged is each call, per token, at the moment you make it. For example, if you don't call the model again tomorrow, you pay nothing for this lab tomorrow.
Next
- Getting started: https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started.html, the AWS guide that makes the first call with Python.
- cloud path practice exams: /examenes?lang=en