Skip to Content
Cloud Engineering Academy
16. Generative AI on AWS for Banking

Amazon Bedrock basics

Read the Bedrock model catalogue, understand model IDs and inference profiles, know how model access works today, compare pricing options and decide where a request's data may be processed.

beginner⏱ 1 h 15 min🟢 FreeAIF-C01AIP-C01

Assumes: Amazon Bedrock model cards and user guide checked 2026-11-18 · AWS CLI v2 · Region us-east-1 · model availability changes often (⚠ VERIFY before each lab). Verified against official sources on 2026-11-18.

Learning objectives

By the end of this lesson you can:

  • Name the Bedrock endpoints and APIs and say which one an application, an administrator and a knowledge base use.
  • Read a model card and pick the correct model ID or inference profile ID for your Region.
  • Explain how model access works in 2026, including the Anthropic first-time-use form and the AWS Marketplace permissions.
  • Choose between on-demand, service tiers, provisioned throughput and prompt caching for a workload, and estimate a monthly bill.
  • Say where a request may be processed and why that matters for UK GDPR and data-residency reviews.

Prerequisites

Why this matters in banking

Harbourline Bank's platform team approves a proof of concept in us-east-1. A developer picks the first model in the console, the pilot works, and then the risk team asks three questions nobody can answer: where did the prompts go, who is the model provider, and what will this cost when 4,000 colleagues use it? Each answer lives in this lesson. If you cannot say where a prompt is processed, which legal terms apply to the model, and how the bill scales, you cannot take the proof of concept to a model-risk committee.

The idea in plain language

Amazon Bedrock is a managed service that lets you call foundation models from many providers through AWS APIs. You do not run servers or GPUs. AWS publishes statements about how Bedrock handles your prompts and outputs and whether they are used to improve models; read the current data-protection page yourself for your sign-off ⚠ VERIFY, because this lesson makes no compliance claims.

Analogy: Bedrock is a switchboard in a bank's head office. You dial one number (the API), say which specialist you want (the model ID), and the switchboard connects you. You do not need to know where the specialist sits, but the bank's data-protection officer certainly does, which is why inference profiles tell you.

The APIs and endpoints

Bedrock is several services behind different endpoints. Mixing them up is the most common beginner error.

Endpoint / serviceUsed forTypical caller.NET package
bedrock (control plane)List models, manage guardrails, inference profiles, evaluation jobs, custom modelsAdmin tools, IaC, CIAWSSDK.Bedrock
bedrock-runtimeRun models: Converse, ConverseStream, InvokeModel, ApplyGuardrailYour applicationAWSSDK.BedrockRuntime
bedrock-agentCreate and manage knowledge bases and data sources, start ingestionAdmin tools, IaCAWSSDK.BedrockAgent
bedrock-agent-runtimeQuery knowledge bases (Retrieve, RetrieveAndGenerate)Your applicationAWSSDK.BedrockAgentRuntime
bedrock-mantleAn alternative runtime endpoint that serves the Anthropic Messages API for Claude modelsCode that already uses the Anthropic SDKAnthropic's Bedrock client

On the Claude 5.5 model cards, AWS recommends bedrock-runtime for new applications, and bedrock-mantle does not support Guardrails or Knowledge Bases for those models. This module uses bedrock-runtime.

Four operations you will meet constantly:

  • Converse / ConverseStream: one request shape that works across providers. Use it by default.
  • InvokeModel / InvokeModelWithResponseStream: the raw, model-specific request body. You need it for things Converse does not cover, such as the Titan embedding model.
  • ApplyGuardrail: run a guardrail on any text without calling a model. Covered in Bedrock Guardrails.
  • Retrieve / RetrieveAndGenerate: search a knowledge base, optionally with generation. Covered in Knowledge Bases and RAG.

What problem the AWS service solves

Before Bedrock, a bank that wanted a hosted model signed a contract with one provider, built that provider's SDK into its code and repeated the exercise for the next model. Bedrock gives you:

  • Choice behind one API. The model catalogue lists dozens of providers. Swapping a model is mostly a string change with Converse.
  • AWS identity, network and logging. IAM controls who can call which model, PrivateLink keeps traffic off the internet, CloudTrail records API calls and model invocation logging can capture prompts and responses.
  • Pay-per-token with no infrastructure (or reserved capacity if you need it).

Honest limits and sharp edges:

  • Model availability changes quickly. Models launch, enter a legacy period and reach end of life. Plan for a model change at least once a year.
  • Quotas are per account, per Region and per model. New accounts often start with low limits ⚠ VERIFY the current defaults in the Service Quotas console before you plan a launch.
  • Features differ by model. For the Claude 5.5 models, Count tokens is not supported on bedrock-runtime, and only the Standard service tier is listed, so do not assume that a feature in one model's documentation works for another.
  • Third-party models are billed through AWS Marketplace. Charges appear under the model provider in Cost Explorer, not under "Amazon Bedrock".

Microsoft / Azure comparison

You know (Microsoft/Azure)AWS equivalentWhat's different
Azure OpenAI resource with named deploymentsBedrock model ID or inference profile IDNo deployment object to create for on-demand use: you call the model ID directly
Deployment "model version" pinningModel ID with a version suffix, plus lifecycle dates on the model cardRead the model's legacy and end-of-life dates
Azure OpenAI "Global" vs "Data Zone" deploymentsGlobal vs geographic (for example us., eu.) cross-Region inference profilesThe profile prefix tells you the routing scope
Provisioned Throughput Units (PTU)Bedrock Provisioned Throughput (model units, hourly, with commitment)Sized with the account team for third-party models
Azure private endpointVPC interface endpoint for bedrock-runtimeSame idea: keep traffic on the private network
Azure Monitor diagnostic settings for requestsModel invocation logging to CloudWatch Logs and/or S3Off by default; contains prompts, so protect it

Architecture

Security-boundary view: your application and the VPC endpoint are inside your boundary. Everything after the endpoint is the AWS service plus the model provider's terms. Invocation logs are a second copy of your prompts, so they need the same classification, encryption and retention as the prompts themselves.

Reading a model card

Open Console → Amazon Bedrock → Model catalog, or the public page at Models at a glance and choose a model. Facts below come from the Claude Sonnet 5.5 and Claude Haiku 5.5 cards checked on 2026-11-18. Treat them as a worked example of what to read, not as permanent values.

Field on the cardClaude Sonnet 5.5Claude Haiku 5.5Why it matters
Launch date2026-09-282026-10-07New models are newer than your training data about them
EOL no sooner than2027-09-282027-10-07Your replacement plan
Context window / max output1M tokens / 128K1M tokens / 128KSizing prompts
Knowledge cutoffJune 2026June 2026What it cannot know
bedrock-runtime APIsMessages, Converse, InvokeMessages, Converse, InvokeConverse is supported
Guardrails, Knowledge BasesSupported on bedrock-runtimeSupported on bedrock-runtimeNot on bedrock-mantle
Service tiersStandard only listedStandard only listedNo Priority, Flex, Reserved or Batch listed
Model IDanthropic.claude-sonnet-5-5anthropic.claude-haiku-5-5See next section
In-Region in us-east-1NoNoYou must use an inference profile

The 5.5 cards also say thinking blocks are bound to the model and to the AWS account that produced them. In practice: do not store and replay a model's reasoning blocks in a different account or against a different model, and show end users only the text blocks.

Model IDs and inference profiles

A model ID names a model (anthropic.claude-haiku-5-5). An inference profile is a routing wrapper that sends your request to one or more Regions. For the Claude 5.5 models, the cards list no In-Region support in us-east-1: you call a profile.

ID you passScopeExample for Haiku 5.5
Geo profile, us. prefixRoutes within the US Regions the profile listsus.anthropic.claude-haiku-5-5
Geo profile, eu. prefixRoutes within European Regionseu.anthropic.claude-haiku-5-5
Global profileRoutes to any commercial Regionglobal.anthropic.claude-haiku-5-5
Bare model IDA single Region, only where the card says In-Region is supportedanthropic.claude-haiku-5-5

For a us. profile called from us-east-1, the Sonnet 5.5 card lists the destination Regions as us-east-1, us-east-2 and us-west-2. For an eu. profile called from eu-west-2 (London), it lists Frankfurt, Stockholm, Milan, Spain, Ireland, London and Paris. The routing depends on the Region you call from.

Check routing yourself, do not trust the prefix

AWS says that if you have data-residency requirements you should call GetInferenceProfile from every source Region you plan to use and read every destination Region in the response, rather than relying on the prefix in the ID. Cross-Region inference can also route to opt-in Regions you have not enabled, and AWS notes that prompts and outputs may be stored in an opt-in Region for abuse detection. Service Control Policies that block any destination Region make the whole request fail.

Embeddings are different

The embedding model Titan Text Embeddings V2 (amazon.titan-embed-text-v2:0) works with InvokeModel and not with Converse. It accepts up to an 8K-token input and offers 1,024, 512 or 256 dimensions. Its card lists in-Region availability in us-east-1 and in London (eu-west-2). The request body is model specific, which is the reason InvokeModel still matters.

Model access in 2026

Older tutorials tell you to open a Model access page and tick boxes. That is no longer how it works in the commercial Regions.

  • In commercial Regions the Model access page is not used: access to most models is enabled on first use. You open a model in the catalog or simply call it. The page remains for AWS GovCloud (US).
  • First invocation of a third-party model starts an AWS Marketplace subscription in the background. The calling identity needs aws-marketplace:Subscribe, aws-marketplace:Unsubscribe and aws-marketplace:ViewSubscriptions for that first call. Afterwards, users do not need those permissions to invoke the model. The account also needs a valid payment method.
  • Anthropic first-time-use form. For Anthropic models earlier than Claude Opus 4.7 you must submit use-case details once per account (or once at the Organization management account) before invoking. Claude Opus 4.7 and later do not need the form. The form asks for a company name, a website and a description of intended use.
  • The first call can briefly appear to work and then fail with AccessDeniedException if a prerequisite is missing. After you fix permissions, allow a couple of minutes.
  • Models from Amazon, Meta, Mistral AI and several other providers do not go through AWS Marketplace, so you cannot scope those with aws-marketplace:ProductId.

For a bank, this changes the control design. Because access is automatic on first use, the control is no longer "nobody ticked the box". You enforce which models may be used with IAM and Service Control Policies. AWS's own guidance for organisations that must review model terms first: initially block bedrock:InvokeModel with an SCP or IAM policy, review the End User License Agreement, then allow the model. Denying aws-marketplace:Subscribe alone does not block the first call, because Bedrock starts the subscription itself.

Pricing models

OptionYou payGood forWatch out
On-demand, Standard tierPer input and output token, no commitmentPilots, spiky trafficQuotas apply; throttling under load
Priority / Flex / Reserved / Batch tiersPremium for speed, discount for flexibility, commitment for reserved capacity, batch for bulkLatency-critical or offline workloadsPer model: the Claude 5.5 cards list Standard only
Prompt cachingCheaper reads for repeated prompt prefixesA long system prompt or fixed document set reused across callsThe 5.5 cards list explicit caching with a 512-token minimum, up to four checkpoints and 5-minute or 1-hour lifetimes
Provisioned ThroughputPer hour per model unit, with no-commitment, 1-month or 6-month options (varies by model)Steady, high, predictable volumePay while idle; sized with your account team for some third-party models
Long-context pricingHigher rates above a prompt-size threshold (Claude Haiku 5.5's card: above 100,000 tokens)Very large promptsA "put everything in the prompt" design can multiply cost

The current per-token prices are on the Amazon Bedrock pricing page. Prices differ by model and change, so this lesson does not quote Claude prices on Bedrock (⚠ VERIFY on the pricing page before you budget). What you can plan today is the shape of the bill.

A worked cost estimate (illustrative rates)

Harbourline's pilot: 2,000 questions a day. Each prompt averages 3,000 input tokens (system prompt plus retrieved passages plus question) and each answer 300 output tokens. Use rates you read from the pricing page. For this example only, assume 0.10 USD per million input tokens and 0.50 USD per million output tokens (illustrative, not a quote).

Input  : 2,000 x 3,000 = 6,000,000 tokens/day  -> 6.0 x 0.10 = 0.60 USD
Output : 2,000 x   300 =   600,000 tokens/day  -> 0.6 x 0.50 = 0.30 USD
Per day: 0.90 USD     Per 30-day month: 27.00 USD

Now notice what the model price does not include: the guardrail, the knowledge base, logging storage and the people. In the guardrails lesson you will see the same traffic cost more for the guardrail than for the model if you evaluate the whole prompt. Estimate the whole pipeline, not just the model.

Logging and observability

Two different records exist:

  • CloudTrail records Bedrock API calls (who called what, when). It does not contain prompts. See CloudTrail for banks.
  • Model invocation logging is off by default. When on, it can send the request and response bodies to CloudWatch Logs and/or S3.

A guardrail masks sensitive information in what the model sees and returns, but AWS documents that invocation logs contain the original, unmodified request whatever the guardrail did, and blocked content appears as plain text there. If you turn logging on, protect it: customer-managed KMS key, short retention, tight IAM, and CloudWatch Logs data protection for masking. Logging prompts of real customers is a data-protection decision for your privacy team.

Step-by-step implementation

List the models your Region offers

Use the CLI (below) to see the Anthropic models and the inference profiles available from us-east-1. Note which model has a profile and which has In-Region support.

Check whether you have access

For one model, call get-foundation-model-availability and read agreementAvailability. AVAILABLE means you can invoke; PENDING means the subscription is still being created.

Send one tiny Converse request

Use the CLI to send a one-line prompt with a low maxTokens. It should cost a fraction of a cent. Read the usage block in the reply.

Check the routing

Call get-inference-profile and write down every destination Region. Decide whether that is acceptable for your data classification.

AWS Console instructions

  1. Console → Amazon Bedrock → Model catalog. Filter by provider. Open Claude Haiku 5.5 and read the model details, the APIs supported and the programmatic-access table.
  2. Console → Amazon Bedrock → Playgrounds → Chat. Choose a model and try one short question. The first call to a third-party model starts the Marketplace subscription.
  3. Console → Amazon Bedrock → Cross-Region inference (or the model's detail page) to see the profiles. Navigation labels change; if one is missing, search the Bedrock console for "inference profiles" ⚠ VERIFY.
  4. Console → Service Quotas → Amazon Bedrock to see your account's per-model request and token limits.

AWS CLI

# 1. Which Anthropic models exist in this Region? Needs bedrock:ListFoundationModels.
aws bedrock list-foundation-models --by-provider anthropic \
  --query "modelSummaries[].[modelId,modelName]" --output table \
  --profile learn-sandbox --region us-east-1

# 2. Which cross-Region inference profiles can I call from this Region?
aws bedrock list-inference-profiles --type-equals SYSTEM_DEFINED \
  --query "inferenceProfileSummaries[?contains(inferenceProfileId, 'haiku-5-5')].[inferenceProfileId,inferenceProfileName]" \
  --output table --profile learn-sandbox --region us-east-1

# 3. Where can that profile route my request? Read every modelArn: each is a destination Region.
aws bedrock get-inference-profile --inference-profile-identifier us.anthropic.claude-haiku-5-5 \
  --query "models[].modelArn" --profile learn-sandbox --region us-east-1

# 4. Is my account entitled to the model? (needs AWS CLI 2.27.42 or later)
aws bedrock get-foundation-model-availability --model-id anthropic.claude-haiku-5-5 \
  --profile learn-sandbox --region us-east-1

# 5. One tiny Converse call. maxTokens caps the answer and therefore the cost.
aws bedrock-runtime converse --model-id us.anthropic.claude-haiku-5-5 \
  --messages '[{"role":"user","content":[{"text":"Reply with the single word: ready"}]}]' \
  --inference-config '{"maxTokens":20,"temperature":0}' \
  --profile learn-sandbox --region us-east-1

Model IDs above come from the model cards of 2026-11-18 (⚠ VERIFY: IDs and profile availability change). If a command fails with a validation error about on-demand throughput, you used a bare model ID where only a profile works.

Infrastructure as Code

Invocation logging should be turned on deliberately, with encryption and retention, never left to chance. The examples create an encrypted log group with a retention period; wiring the logging configuration itself is shown with the Terraform resource.

BedrockLoggingStack.cs
using Amazon.CDK;
using Amazon.CDK.AWS.KMS;
using Amazon.CDK.AWS.Logs;
using Constructs;

namespace Harbourline.GenAi.Infra;

public sealed class BedrockLoggingStack : Stack
{
    public BedrockLoggingStack(Construct scope, string id, IStackProps? props = null) : base(scope, id, props)
    {
        // A customer-managed key so the bank controls who can read prompt logs.
        var key = new Key(this, "LogKey", new KeyProps
        {
            EnableKeyRotation = true,
            Description = "Encrypts Bedrock invocation logs (Lab m16)",
        });

        // Short retention: prompts are sensitive, so keep them only as long as the investigation need.
        _ = new LogGroup(this, "InvocationLogs", new LogGroupProps
        {
            LogGroupName = "/harbourline/m16/bedrock-invocations",
            Retention = RetentionDays.ONE_MONTH,
            EncryptionKey = key,
            RemovalPolicy = RemovalPolicy.DESTROY, // lab only
        });

        // Amazon.CDK.Tags avoids the clash with Stack.Tags.
        Amazon.CDK.Tags.Of(this).Add("Project", "cea-lab");
        Amazon.CDK.Tags.Of(this).Add("Lab", "m16-l1");
        Amazon.CDK.Tags.Of(this).Add("Environment", "learn");
        Amazon.CDK.Tags.Of(this).Add("Owner", "your-name");
    }
}

The log group's resource policy and the Bedrock logging role must also allow Bedrock to write; the L1 construct for the logging configuration is CfnModelInvocationLoggingConfiguration ⚠ VERIFY property names in your CDK version.

Complete code

This lesson is mostly reading and CLI work. The first full C# example that calls a model is in Calling Bedrock from C#, and the complete tested code is in Lab 16.1.

Code explained line by line

For the CDK example:

  1. new Key(...) with EnableKeyRotation = true makes a customer-managed KMS key that rotates, so key policy, not AWS-managed defaults, decides who can decrypt logs.
  2. new LogGroup(...) with ONE_MONTH sets retention. Without it, CloudWatch keeps logs forever, which the conventions for these labs forbid.
  3. RemovalPolicy.DESTROY lets the lab delete the group on teardown. A production stack would retain it.
  4. The four Amazon.CDK.Tags.Of(this).Add(...) calls apply the mandatory lab tags. Inside a Stack, writing Amazon.CDK.Tags.Of(this) fails to compile because Tags also names a property of the stack, so the full namespace is required.

Security considerations

⚠ Learning shortcut — not for production

The lab uses us-east-1 and a US inference profile with fictional data, so nobody has to answer a data-residency question. A real UK bank decides the processing Regions with legal and compliance first (for example an eu. profile called from London), checks every destination Region with GetInferenceProfile, restricts Regions with Service Control Policies, and records the decision in its AI register.

  • Least privilege per model. Allow bedrock:InvokeModel on named model or inference-profile ARNs, not bedrock:* on *.
  • Block what you have not reviewed. Because access is automatic on first use, use SCPs to deny invocation of unreviewed models.
  • Private network path. Use a VPC interface endpoint for bedrock-runtime so traffic stays on the AWS network ⚠ VERIFY the endpoint service name in your Region.
  • Logs are data. Invocation logs hold prompts. Encrypt, shorten retention and restrict reads.
  • Third-party terms. For third-party models, first use means accepting the provider's End User License Agreement. A bank's procurement and legal teams may need to review it first.

Banking use case

Harbourline's architecture board sets three rules for the GenAI platform. (1) Only a short list of model IDs may be invoked, enforced by an SCP. (2) Production uses eu. profiles called from London and the destination Regions are recorded in the AI register after a GetInferenceProfile check. (3) Invocation logging is on only in the non-production account, with fictional data, and off in production until the privacy team has approved the retention and masking design. A developer who tries a new model gets a clear access-denied message, files a request, and the model enters the register after review.

Common mistakes

  • Using a bare model ID where only a profile works. The error mentions on-demand throughput. Use the profile ID from the model card.
  • Following an old tutorial that says "enable model access". In commercial Regions, access is enabled on first use; the missing piece is usually IAM or the Marketplace permission.
  • Assuming the profile prefix equals the data boundary. Verify destinations with GetInferenceProfile.
  • Forgetting that logs duplicate prompts. Turn logging on without a retention and encryption plan and you have a second copy of personal data.
  • Budgeting only the model. The guardrail, knowledge base and logs often cost as much as the tokens.

Troubleshooting

SymptomLikely causeFix
AccessDeniedException on the first callMissing aws-marketplace:Subscribe permissions, no payment method, or the Anthropic use-case form not done (older Anthropic models)Fix the prerequisite, wait a few minutes, call get-foundation-model-availability
AccessDeniedException persists although prerequisites are doneAccount-level access not grantedAWS documents contacting AWS Sales for additional access options
ValidationException mentioning on-demand throughputBare model ID for a model that needs an inference profileUse a geo or global profile ID
Works in one Region, fails in anotherModel or profile not available there, or an SCP blocks a destination RegionCheck the model card's regional table and your SCPs
ThrottlingExceptionAccount quota for that model reachedRequest a quota increase or lower concurrency
Cost Explorer shows no "Bedrock" lineThird-party model charges appear under the providerFilter by the provider's service name

Cost and cleanup

Reading the catalogue and running the CLI commands in this lesson cost nothing except the final converse call, which is a handful of tokens (a fraction of a cent). The CDK and Terraform examples create a KMS key (about 1 USD per month while it exists ⚠ VERIFY) and a log group, so delete them after the exercise.

# Delete the lab stack (CDK) or run terraform destroy
cdk destroy BedrockLoggingStack --profile learn-sandbox
# or
terraform destroy

# Confirm nothing tagged Project=cea-lab remains in the Region
aws resourcegroupstaggingapi get-resources --tag-filters Key=Project,Values=cea-lab \
  --profile learn-sandbox --region us-east-1

A KMS key enters a waiting period of 7 to 30 days before deletion; it stops billing once deleted, not once scheduled for deletion ⚠ VERIFY.

Exercises

  • 🟢 Guided: run the five CLI commands. Record the model ID, the inference profile ID and every destination Region of the profile from us-east-1.
  • 🟡 Challenge: repeat the profile check from eu-west-2 using an eu. profile. List the destination Regions and write one sentence on whether each is acceptable for UK customer data, and who must decide.
  • 🔴 Live problem: a developer reports "Bedrock says AccessDenied but the model access page does not exist". Write the checklist you would send back, in the order you would test it.

Assignment

Produce a one-page Model Intake Record template for Harbourline's AI register with these fields: model ID, provider, inference profile and verified destination Regions, launch date and end-of-life date from the model card, features used (Guardrails, Knowledge Bases), price basis, data classification allowed, approver, review date. Fill it in for one model.

Solutions

Knowledge check

Interview questions

  • How would you decide between on-demand and provisioned throughput? On-demand for pilots and variable traffic; provisioned only when volume is steady and high enough that reserved capacity beats per-token pricing, remembering you pay while idle.
  • A model call fails with an access error only the first time. Why? The first invocation of a third-party model starts a background Marketplace subscription that needs permissions and a payment method; after it completes, calls succeed.
  • What is cross-Region inference and what is its compliance risk? It routes requests across Regions to improve availability and throughput. The risk is processing in Regions you did not intend, so verify destinations and restrict with SCPs.
  • What belongs in a GenAI platform's logging design? CloudTrail for API calls always; invocation logging only with a reviewed retention, encryption and masking design, because it stores prompts.

Certification practice

Completion checklist

  • I can say which Bedrock endpoint a runtime call, an admin call and a knowledge-base query use
  • I read the Haiku 5.5 or Sonnet 5.5 card and found its model ID, profile IDs and service tiers
  • I explained how model access works now and what replaced the tick-box control
  • I produced a cost estimate that includes more than model tokens
  • I ran the cleanup steps and confirmed nothing tagged Project=cea-lab is still billing

Key takeaways

  • Use bedrock-runtime and Converse by default; use InvokeModel for embeddings and model-specific bodies.
  • The Claude 5.5 models are called through inference profiles in us-east-1; verify where each profile routes before you decide a data boundary.
  • Model access is automatic on first use, so enforce your model allow-list with IAM and SCPs and plan for the Marketplace permissions.
  • Third-party model charges appear under the provider, and the bill is more than tokens.
  • Invocation logs hold the original prompts: design them like personal data.

Further reading

Independent learning resource — not affiliated with, endorsed or sponsored by Amazon Web Services. AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates. All banking data in examples is fictional. Sample architectures are for learning and are not automatically compliant with GDPR, PCI DSS or any banking regulation.

On this page