AWS Blocks Explained: A New Infrastructure-from-Code Framework

Developer working at a code-lit monitor, building software on AWS

AWS Blocks is a new open-source framework that lets you write a full-stack backend in TypeScript and have AWS figure out the infrastructure for you. Announced in public preview on June 16, 2026, it runs entirely on your laptop first, then deploys the exact same code to production AWS without a single change. If you’ve ever wanted to build with Lambda, DynamoDB, and Bedrock but stalled out on the plumbing, this is aimed squarely at you.

Developer writing TypeScript code on a laptop in a modern workspace
AWS Blocks lets you build a working full-stack backend locally before touching an AWS account.

Key takeaways

  • AWS Blocks is an open-source TypeScript “Infrastructure-from-Code” framework in public preview since June 16, 2026 — not the same thing as EBS block storage.
  • You write application code; the framework derives the AWS infrastructure from it. The same line of code becomes a local mock in dev and a real AWS service on deploy.
  • It’s free under Apache 2.0. You only pay for the AWS services your app actually uses, and local development needs no AWS account at all.
  • Around 18–20 Building Blocks cover data, auth, AI, realtime, jobs, email, config, and observability.
  • It’s supported in every commercial AWS region, including Asia Pacific (Tokyo), but it’s still preview software — treat it as such.

What is AWS Blocks (and why the name confuses people)?

Let’s clear up the obvious confusion first. AWS Blocks has nothing to do with Amazon EBS, the “Elastic Block Store” that attaches disk volumes to EC2 instances. Despite the shared word “block,” they’re unrelated products. AWS Blocks is a developer framework for building application backends, and the “blocks” here are reusable software modules, not storage volumes. Keep that distinction in your head and the rest of this gets a lot clearer.

So what is it, really? According to the official AWS announcement, AWS Blocks is an open-source TypeScript framework for composing application backends on AWS. AWS calls the underlying idea “Infrastructure from Code,” or IFC. You write ordinary TypeScript that expresses what your app does, and the framework derives the cloud infrastructure it needs — the database tables, the auth, the file storage, the AI endpoints — directly from that code. There’s no separate stack of YAML or Terraform to keep in sync with your application logic.

A “Block,” as the AWS Blocks concepts guide describes it, is an npm package under the @aws-blocks scope that bundles three things into one feature: the cloud resources, the runtime code, and a local implementation for development. Instantiate a KVStore Block, for example, and you get a DynamoDB table, the AWS SDK integration to talk to it at runtime, and an in-memory store you can use while coding offline — all from a single line.

The problem AWS Blocks is trying to solve

Building a full-stack app on AWS has always carried a tax. You sketch out your app, then you spend hours wiring IAM policies, provisioning a database, configuring an API gateway, setting up auth, and gluing it all together before you’ve shipped a single feature. For solo developers and small teams, that friction is often enough to send them to a managed platform instead.

Infrastructure from Code flips the order of operations. Instead of designing infrastructure and then writing code against it, you write the code and let the framework infer the infrastructure. The payoff is that your app and its infrastructure can never drift apart, because one is generated from the other. The AWS Blocks developer guide leans hard on this: define your backend once, and your frontend types update on their own with no code generation step and no type mismatches. TypeScript carries the types from your database all the way to your UI.

The other half of the pitch is local-first development. You can run your whole application — Postgres, authentication, realtime messaging, file storage — on localhost:3000 with no AWS account and no cloud bill. Data persists locally to a .bb-data/ folder so your dev environment survives restarts. Only when you’re ready do you point it at AWS.

How AWS Blocks works: one line, three contexts

The clever engineering at the heart of AWS Blocks is how the same code behaves differently depending on where it runs. The framework uses Node.js conditional exports to route a single import to a different implementation per context. Take this line:

new KVStore(scope, 'todos')

  • Local development — it resolves to an in-memory or filesystem store, so your app runs entirely on your machine.
  • CDK synthesis — at build time it becomes a CDK construct that produces a CloudFormation template (yes, an AWS Blocks app is a CDK app under the hood).
  • AWS Lambda runtime — in production it makes AWS SDK calls against a real DynamoDB table.

You don’t change a single character to move between those three worlds. That’s the part that genuinely feels new. Because it’s a CDK app underneath, there’s also an escape hatch: when you need fine-grained control the abstraction doesn’t expose, you drop into raw CDK in aws-blocks/index.cdk.ts and configure resources directly. You’re never boxed in.

Local, sandbox, then deploy

The workflow has three gears. npm run dev gives you the fully local app. When you want to test against real AWS, npm run sandbox spins up a fast, ephemeral per-developer environment in the cloud. And npm run deploy creates the long-lived environment with least-privilege credentials for staging or production. You climb from your laptop to a throwaway cloud copy to a real deployment, all with the same codebase.

The Building Blocks: what’s actually in the box

At preview there are around 18–20 Building Blocks spanning the categories most backends need. Each one maps to a managed AWS service, but you interact with a clean typed API rather than the service directly. Here’s how the main Blocks line up, drawn from the Blocks reference.

BlockWhat it gives youAWS service behind it
KVStore / DistributedTableKey-value and structured data with indexesAmazon DynamoDB
DatabaseManaged Postgres with the Kysely query builderAurora Serverless v2
DistributedDatabaseServerless SQL, scale-to-zero, multi-regionAurora DSQL
FileBucketFile uploads/downloads with presigned URLsAmazon S3
AuthBasic / AuthCognito / AuthOIDCJWT sessions, managed MFA + passkeys, or social OAuthJWT / Amazon Cognito / OIDC
Agent / KnowledgeBaseAI agent with tools, plus RAG document retrievalAmazon Bedrock / Bedrock Knowledge Bases
RealtimeTyped WebSocket pub/sub channelsAPI Gateway WebSocket
AsyncJob / CronJobBackground work and scheduled tasksSQS + Lambda / EventBridge + Lambda
EmailClientTransactional emailAmazon SES
AppSettingConfig values and secretsSSM Parameter Store
Logger / Metrics / Tracer / DashboardLogging, metrics, tracing, auto dashboardsCloudWatch / X-Ray

Mix any of these and you get a working backend. There’s a Hosting component too, for deploying frontends with server-side rendering, though that one lives in the CDK layer rather than the runtime API.

AWS Blocks for AI agents and “vibe-coding”

Here’s the angle that sets AWS Blocks apart from every backend framework that came before it: it’s built on the assumption that AI agents will write a lot of the code. Each Block’s npm package ships “steering files” — an AGENTS.md — that tell AI coding assistants exactly how to use that Block correctly. No plugin, no MCP server, no special setup. The guidance travels with the dependency, so an agent reading your project gets the right patterns by default. InfoQ framed the launch as a framework “designed for AI agents to build backends,” and that’s a fair summary of the design intent.

In practice that means you can tell your agent something like “add authentication and a database,” and because the steering files constrain how it composes Blocks, the generated architecture tends to come out production-shaped on the first try rather than as a pile of subtly wrong glue. If you’re already pairing with an AI coding tool, this matters. Our breakdown of Cursor vs Copilot vs Claude Code in 2026 covers how these agents differ, and AWS Blocks is clearly built to ride that wave rather than fight it.

For the AI Blocks specifically — the Bedrock-backed Agent and KnowledgeBase Blocks — local development uses a canned, keyword-based provider so you don’t need a real model to test the plumbing. On deploy, those same Blocks connect to Amazon Bedrock. If you want to actually understand the Bedrock pieces this leans on, our guide on passing the AWS AI Practitioner exam is a solid primer on the underlying services.

Rows of cloud servers in a data center representing AWS infrastructure
Each Block maps a clean TypeScript API onto a managed AWS service like DynamoDB, Aurora, or Bedrock.

What does AWS Blocks cost?

The framework itself is free. It’s open source under the Apache 2.0 license, hosted on GitHub, and there’s no additional charge for using it. You pay only for the underlying AWS services your application actually consumes once it’s deployed — the DynamoDB reads, the Lambda invocations, the S3 storage, the Bedrock tokens, and so on. Local development is completely free because nothing touches AWS; you don’t even need an account until you deploy.

The one hard requirement worth flagging: you need Node.js 22 or later. That’s it for prerequisites.

Is AWS Blocks available in Japan (Tokyo)?

Yes. The AWS announcement states that AWS Blocks is supported in all commercial AWS regions, which includes Asia Pacific (Tokyo), ap-northeast-1. Because the framework deploys standard AWS services through CDK, anything you can provision in Tokyo, you can provision with Blocks. For teams that need data residency in Japan, this is the important detail — your DynamoDB tables, Aurora databases, and S3 buckets all live in the region you deploy to.

There’s one caveat to set expectations on. The AI Blocks depend on Amazon Bedrock, and while Bedrock the service is available in the Tokyo region, the specific foundation models offered there are a subset of what’s available in, say, US regions. So before you build an Agent or KnowledgeBase feature for a Japan deployment, confirm the exact model you want is live in ap-northeast-1 rather than assuming parity. If you’re handling Japanese user data, it’s also worth reading up on local rules first — our overview of Japan’s 2026 AI and data-privacy law walks through what data residency actually requires.

AWS Blocks vs Amplify, CDK, and App Studio

AWS now has several ways to build apps, and they overlap enough to be confusing. The short version: AWS Blocks targets developers who write backend code and want infrastructure derived from it, with a local-first loop. Here’s how it compares to the neighbors.

DimensionAWS BlocksAmplify Gen 2Plain CDKAWS App Studio
Target userDevs who write backendsFrontend devsInfra specialistsNon-developers
Infra modelDerived from codeAbstracted by categoryManual IaCHidden
Local devFully local, no accountPer-dev cloud sandboxNeeds cloudCloud-first
Type safetyType-safe RPC, no codegenSchema-driven codegenInfra types onlyN/A
AI-agent supportBuilt-in steering filesLimitedNot designed for itOut of scope
PricingFree framework, pay for AWS usedFree framework, pay for AWS usedFree framework, pay for AWS usedUsage-based

One important nuance: AWS Blocks is complementary to Amplify, not a replacement. The two are designed to coexist — Amplify provides hosting and CI/CD, and the Amplify CLI even auto-integrates Blocks when it detects an amplify/backend.ts file. If you’re already on Amplify Gen 2, you can adopt Infrastructure from Code one Block at a time rather than rewriting anything.

Who AWS Blocks is for: real use cases

  • Solo devs and small teams shipping full-stack SaaS — auth, database, file storage, and an AI agent — who want to test the whole thing locally before they ever see an AWS bill.
  • Teams leaning on AI coding agents, since the steering files push agents toward correct architecture out of the box.
  • Existing Amplify Gen 2 users who want to adopt Infrastructure from Code incrementally without a migration project.
  • Anyone prototyping AI or RAG features locally — the Agent Block runs on a canned provider on your machine and connects to Bedrock only when you deploy.

Limitations: remember it’s a preview

This is genuinely early software, and a few rough edges deserve attention before you build anything important on it.

  • APIs may shift. It’s a public preview, so Block constructor signatures can change between releases. Pin your versions.
  • Block IDs are effectively permanent. Renaming a Block ID deletes and recreates the resource. For stateful Blocks like a database, that means permanent data loss. Treat IDs as immutable once data is in them.
  • APIs are unauthenticated by default. Your methods are open until you explicitly call auth.requireAuth(). Don’t assume protection you didn’t add.
  • Security hardening isn’t included. Things like WAF and API Gateway throttling aren’t on by default — add them via the CDK escape hatch.
  • Local implementations are mocks. They’re close, but behavior can differ from the real AWS service, so test against a sandbox before you ship.

How to get started in about 5 minutes

If you’ve got Node.js 22+ installed, the on-ramp is short. Scaffold a new project with the official command from the AWS Blocks product page:

npx @aws-blocks/create-blocks-app

Then run npm run dev and open localhost:3000. You’ll have a working app with a database, auth, realtime, and file storage running locally, no AWS account required. Add the Blocks you need, build out your features, test everything on your machine, and when you’re happy, run npm run sandbox to try it on real AWS or npm run deploy to go live. The same code makes the whole trip.

FAQ

Is AWS Blocks the same as Amazon EBS (block storage)?

No. Amazon EBS (Elastic Block Store) provides disk volumes for EC2 instances. AWS Blocks is an open-source TypeScript framework for building application backends. They share the word “block” and nothing else.

Is AWS Blocks free, and what does it cost to run?

The framework is free and open source under Apache 2.0. You pay only for the AWS services your deployed app uses — DynamoDB, Lambda, S3, Bedrock, and so on. Local development costs nothing because it never touches AWS.

Can I use AWS Blocks without an AWS account?

Yes, for development. The entire app — Postgres, auth, realtime, file storage — runs locally on localhost:3000 with no account. You only need an AWS account when you’re ready to deploy to a sandbox or production.

Is AWS Blocks available in the Tokyo region?

Yes. It’s supported in all commercial AWS regions, including Asia Pacific (Tokyo). Just note that for AI features, the specific Bedrock models available in Tokyo are a subset of other regions, so verify your chosen model is offered there first.

Should I use AWS Blocks or Amplify Gen 2?

They’re complementary rather than either-or. Amplify Gen 2 handles hosting and CI/CD with a managed backend; AWS Blocks focuses on local-first, type-safe Infrastructure from Code. Amplify can even auto-integrate Blocks, so many teams will use both.

The bottom line: try it now or wait for GA?

AWS Blocks is one of the more interesting things AWS has shipped for builders in a while, precisely because it reduces the AWS tax to “write TypeScript, run one command.” If you’re a solo developer, a small team, or someone already coding alongside AI agents, it’s well worth a few hours of experimentation today — spin up a project, build something locally, and feel out the workflow. Just keep it off anything mission-critical until general availability, given the preview caveats around shifting APIs and the unforgiving Block-ID rule. For real production data, the smart move is to prototype with Blocks now and graduate to GA when the surface stabilizes.

You Missed