explaingit

jamesward/hello-zio-bedrock

0ShellAudience · developerComplexity · 2/5ActiveSetup · moderate

TLDR

Tiny Scala starter that calls a Claude Sonnet model on Amazon Bedrock using the ZIO effect library. Four-line README, sbt run, no extras.

Mindmap

mindmap
  root((hello-zio-bedrock))
    Inputs
      AWS Bedrock bearer token
      Bedrock model id
    Outputs
      Scala program that calls a Claude model
    Use Cases
      Demo a ZIO Bedrock call
      Bootstrap a Scala AI project
    Tech Stack
      Scala
      ZIO
      sbt
      AWS Bedrock

Things people build with this

USE CASE 1

Demo how to call Amazon Bedrock from a ZIO Scala program

USE CASE 2

Use as a skeleton for a Scala AI side project

USE CASE 3

Test a Claude Sonnet model id on Bedrock from the JVM

Tech stack

ScalaZIOsbtAWS Bedrock

Getting it running

Difficulty · moderate Time to first run · 30min

You need an AWS account with Bedrock model access in us-east-1 and a long-term bearer token before sbt run will work.

In plain English

This is a very small example repository called hello-zio-bedrock. The README is only four lines long, and the project itself looks like a starter template the author put together to show how to call Amazon Bedrock, which is AWS's hosted large language model service, from a Scala program built with the ZIO library. ZIO is a popular toolkit in the Scala world for writing programs in a functional style with strong handling of effects and concurrency. The steps in the README are short and assume the reader already knows the wider context. First, you go to the AWS console and create a Bedrock bearer token using the long-term API key page in the us-east-1 region. Second, you export that token into an environment variable called AWS_BEARER_TOKEN_BEDROCK so the program can pick it up when it runs. Third, you set the model you want to call into an environment variable called BEDROCK_MODEL_ID, with the example value pointing at a specific Anthropic Claude Sonnet model hosted on Bedrock. Fourth, you run the project with the sbt build tool by calling ./sbt run. Because the README is so sparse, it does not explain what the program actually does once it starts. There is no description of a prompt, a response, command-line arguments, or expected output. A reader interested in the details would need to open the Scala source files in the repository to see how the ZIO program is wired up and how it calls the Bedrock client. The README also does not list any dependencies, AWS permissions, or cost notes beyond the link to create the token. The project has no stars and no description on GitHub, no topics, and the language is reported as Shell, most likely because the sbt launcher script is the largest tracked file at the time the metadata was collected. The author, James Ward, is well known in the Scala and JVM communities, which suggests this is the kind of minimal scaffold he uses for demos or talks rather than a finished product. In short, this is a hello-world style example. Its value is showing the smallest set of moving parts needed to send a request from ZIO Scala code through to a Claude model on Amazon Bedrock, not in providing a polished tool or library.

Copy-paste prompts

Prompt 1
Show me what the main ZIO program in hello-zio-bedrock does once sbt run starts
Prompt 2
Explain how AWS_BEARER_TOKEN_BEDROCK and BEDROCK_MODEL_ID are read by this Scala app
Prompt 3
Extend hello-zio-bedrock to take a prompt from stdin and stream the Bedrock response
Prompt 4
Show the AWS IAM permissions needed to call the Anthropic Claude Sonnet model on Bedrock
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.