AWS Launches Blocks, an Open-Source TypeScript Framework Designed for AI Agents to Build Backends

AWS recently released AWS Blocks in public preview, an open-source TypeScript framework in which each “Block” bundles application code, a local development implementation, and the AWS infrastructure required to run it in production.

Developers can use npm run dev and get a working application with Postgres, authentication, real-time messaging, and file storage on their machine. Moreover, they do not need an AWS account. When they deploy, the same code runs on Lambda, DynamoDB, Aurora, API Gateway, and Bedrock with zero changes. The announcement describes it as removing “the need to learn infrastructure tools.”

What sets Blocks apart from the crowded backend-framework landscape is a design premise firmly rooted in 2026: AI agents write code, and the framework provides the correct way to write it from the start. Blocks ships with built-in steering files that guide coding agents toward correct architecture without custom configuration. A developer can prompt an agent to “add authentication and a database,” and the agent produces code that works locally and deploys to production-grade AWS services because the framework constrains the agent to follow correct patterns.

The composability model is straightforward. Each Block is an npm package covering one backend capability: database tables, user authentication, AI agents, file uploads, background jobs, scheduled tasks, real-time notifications, and email. Developers import the Blocks they need, compose them, and the framework generates AWS infrastructure following best practices. Furthermore, type safety flows from the data schema to the frontend without a code-generation step, covering web frameworks (Next.js, Nuxt, Astro, React, Vue, Svelte, Angular) and native clients (Swift, Kotlin, Dart/Flutter) from a single backend definition.

The local-first development model uses Node.js conditional exports to load different implementations per context. The same new KVStore(scope, ‘todos’) line becomes an in-memory store during local development, a DynamoDB table at deployment time, and an SDK call in the Lambda runtime. Hot reload restarts the backend on every save with sub-second feedback.

The CDK escape hatch prevents this from becoming another opinionated walled garden. Blocks applications are CDK applications, and any CDK construct works alongside Blocks. When the built-in Blocks don’t cover a use case, developers can drop into CDK for direct resource configuration. Custom Blocks can package infrastructure, runtime logic, and local mocks into reusable modules shared across projects.

AWS positions Blocks as complementary to Amplify Gen 2: Amplify provides hosting, CI/CD, and a managed backend experience, while Blocks focuses on type-safe infrastructure-from-code with local-first development.

At preview, approximately 20 Blocks are available covering databases (Postgres via Aurora, DynamoDB), authentication (Cognito), AI agents and knowledge bases (Bedrock), file storage (S3), real-time messaging, background jobs, scheduled tasks, and email (SES). There is no additional charge for Blocks itself. Teams pay only for the underlying AWS services their application consumes.

Early preview caveats: Block constructor signatures may change between preview releases (pin your versions), local data persistence depends on mock implementations, and the framework currently requires Node.js 22 or later.

AWS Blocks is available now in public preview across all commercial AWS regions. The source code is on GitHub under the Apache 2.0 license.