
Backend toolkit for composing self-contained backend capabilities that bundle app code, local dev environment, and cloud infrastructure; run locally without a cloud account and deploy unchanged.
AWS Blocks is a backend toolkit for building full-stack applications on AWS. Each Block is a self-contained backend capability that bundles your application code, a local development setup, and the infrastructure to run it. Pick the Blocks you need, compose them, and AWS Blocks defines the AWS infrastructure for you following AWS best practices. Your entire application runs locally without an AWS account — when you're ready, deploy the same code to AWS without changing it.
📚 Documentation: AWS Blocks Developer Guide
Requires Node.js 22 or later and npm 10 or later.
npm create @aws-blocks/blocks-app@latest my-app
cd my-app
npm install
npm run devnpm run dev starts a local development server at http://localhost:3000 with every Block running a local implementation — no AWS account or credentials required. Define your backend in aws-blocks/index.ts and your frontend in src/; types flow end to end with no code generation step.
--template <name>. Available templates: default, nextjs, react, auth-cognito, demo, bare, backend, amplify..) to add an aws-blocks/ backend to it. The CLI auto-detects an AWS Amplify Gen 2 project and integrates with it.For a full walkthrough, see Getting started with AWS Blocks.
AWS Blocks uses Node.js conditional exports to load different code for each context:
The same new KVStore(scope, 'todos') line becomes a local store in development, an Amazon DynamoDB table at deploy time, and SDK calls in production — with no code changes.
A Block is a module that gives you a complete feature: cloud resources, a runtime API, and a local implementation. Each Block is published as an npm package, and the umbrella package @aws-blocks/blocks re-exports every Block plus the core runtime.
| Category | Blocks |
|---|---|
| Data & storage |
KVStore, DistributedTable, Database, DistributedDatabase, FileBucket
|
| Authentication |
AuthBasic, AuthCognito, AuthOIDC
|
| Compute & background |
AsyncJob, CronJob
|
| AI |
Agent, KnowledgeBase
|
| Communication |
Realtime, EmailClient
|
| Configuration | AppSetting |
| Observability |
Logger, Metrics, Tracer, Dashboard
|
| Hosting | Hosting |
For the full catalog and per-Block API reference, see the AWS Blocks Developer Guide.
Type safety extends from your backend all the way to your client across web frameworks (Next.js, Nuxt, Astro, React, Vue, Svelte, Angular), native mobile (Swift, Kotlin, Dart/Flutter), and desktop applications.
Native clients are build-time code generators that produce type-safe client code from a Blocks spec (blocks.spec.json), paired with a runtime library that calls your backend over JSON-RPC:
blocks/
├── packages/ # Blocks, the core runtime, and the create-blocks-app CLI (published to npm)
├── native/ # Native client SDKs (Kotlin, Swift, Dart)
├── test-apps/ # Example applications and end-to-end tests
└── scripts/ # Repository tooling and automation
Requires Node.js 22 or later.
npm install
npm run build
npm testContributions, feedback, and questions are welcome.
Apache-2.0
AWS Blocks is a backend toolkit for building full-stack applications on AWS. Each Block is a self-contained backend capability that bundles your application code, a local development setup, and the infrastructure to run it. Pick the Blocks you need, compose them, and AWS Blocks defines the AWS infrastructure for you following AWS best practices. Your entire application runs locally without an AWS account — when you're ready, deploy the same code to AWS without changing it.
📚 Documentation: AWS Blocks Developer Guide
Requires Node.js 22 or later and npm 10 or later.
npm create @aws-blocks/blocks-app@latest my-app
cd my-app
npm install
npm run devnpm run dev starts a local development server at http://localhost:3000 with every Block running a local implementation — no AWS account or credentials required. Define your backend in aws-blocks/index.ts and your frontend in src/; types flow end to end with no code generation step.
--template <name>. Available templates: default, nextjs, react, auth-cognito, demo, bare, backend, amplify..) to add an aws-blocks/ backend to it. The CLI auto-detects an AWS Amplify Gen 2 project and integrates with it.For a full walkthrough, see Getting started with AWS Blocks.
AWS Blocks uses Node.js conditional exports to load different code for each context:
The same new KVStore(scope, 'todos') line becomes a local store in development, an Amazon DynamoDB table at deploy time, and SDK calls in production — with no code changes.
A Block is a module that gives you a complete feature: cloud resources, a runtime API, and a local implementation. Each Block is published as an npm package, and the umbrella package @aws-blocks/blocks re-exports every Block plus the core runtime.
| Category | Blocks |
|---|---|
| Data & storage |
KVStore, DistributedTable, Database, DistributedDatabase, FileBucket
|
| Authentication |
AuthBasic, AuthCognito, AuthOIDC
|
| Compute & background |
AsyncJob, CronJob
|
| AI |
Agent, KnowledgeBase
|
| Communication |
Realtime, EmailClient
|
| Configuration | AppSetting |
| Observability |
Logger, Metrics, Tracer, Dashboard
|
| Hosting | Hosting |
For the full catalog and per-Block API reference, see the AWS Blocks Developer Guide.
Type safety extends from your backend all the way to your client across web frameworks (Next.js, Nuxt, Astro, React, Vue, Svelte, Angular), native mobile (Swift, Kotlin, Dart/Flutter), and desktop applications.
Native clients are build-time code generators that produce type-safe client code from a Blocks spec (blocks.spec.json), paired with a runtime library that calls your backend over JSON-RPC:
blocks/
├── packages/ # Blocks, the core runtime, and the create-blocks-app CLI (published to npm)
├── native/ # Native client SDKs (Kotlin, Swift, Dart)
├── test-apps/ # Example applications and end-to-end tests
└── scripts/ # Repository tooling and automation
Requires Node.js 22 or later.
npm install
npm run build
npm testContributions, feedback, and questions are welcome.
Apache-2.0