New to Claude Skills? Learn how to install them →

aws on GitHub

AWS Blocks Development

OfficialFree

Streamline full-stack app development on AWS.

by aws2.3k stars on aws/agent-toolkit-for-aws
3 views
Updated Aug 10, 2026
Get this skill

Free · Opens the source repo

What AWS Blocks Development does

AWS Blocks is an Infrastructure-from-Code framework designed to simplify the development of full-stack applications using AWS services. It offers a structured approach by bundling various AWS components into Building Blocks, which include services for storage, authentication, real-time communication, and more. By utilizing the @aws-blocks packages, developers can create robust applications that work seamlessly both locally and in the cloud. The framework is particularly beneficial for those looking to streamline their development workflow and avoid common pitfalls associated with AWS integration.

The framework's key feature is its ability to run all Building Blocks locally without requiring AWS credentials, allowing for effective local development. Developers can scaffold new projects or integrate AWS Blocks into existing ones with simple command-line instructions. This flexibility is enhanced by the availability of various templates that cater to different application needs, from basic setups to more complex architectures involving authentication and real-time data handling.

In addition to its ease of use, AWS Blocks emphasizes security and best practices. It provides guidance on implementing least-privilege IAM roles, handling sensitive information, and structuring applications to prevent vulnerabilities. This makes it a suitable choice for developers who prioritize security while building scalable applications. The comprehensive documentation and detailed API references ensure that developers have the resources they need to effectively utilize the framework.

Overall, AWS Blocks is ideal for developers and designers looking to create full-stack applications with AWS while minimizing complexity and enhancing security. Its local development capabilities and structured approach make it a valuable addition to any AWS-focused development toolkit.

When to use it

Use AWS Blocks when building full-stack applications that require AWS services, especially if you want to develop locally without AWS credentials.

When not to use it

This skill may not be suitable for projects that do not utilize AWS or for developers who prefer to work with other frameworks or architectures.

What you can build with it

Building a Todo App

Use the demo template to quickly scaffold a Todo application with authentication and real-time data features.

Integrating with Amplify

Easily integrate AWS Blocks into an existing Amplify Gen 2 project for enhanced backend capabilities.

Local Development Setup

Set up a local development environment using AWS Blocks to test and validate your application without AWS credentials.

How to install AWS Blocks Development

View source

1. Install with the skills CLI

npx skills add aws/agent-toolkit-for-aws/aws-blocks --agent claude-code

2. Or install it manually

Download the skill folder and drop it into ~/.claude/skills/ for all projects, or .claude/skills/ to scope it to one repo. Restart Claude Code so it picks up the new skill.

Anthropic's agentic coding CLI, and the reference implementation of Agent Skills. Drop a skill folder into ~/.claude/skills and Claude Code loads it automatically whenever a task matches the skill's description. Claude Code docs

Inside SKILL.md

Written by aws

AWS Blocks Application Development

Package naming: All packages are published under the @aws-blocks scope (e.g., @aws-blocks/core, @aws-blocks/blocks, @aws-blocks/bb-kv-store).

Overview

AWS Blocks is an Infrastructure-from-Code framework where Building Blocks bundle CDK, SDK, and local mocks into a single API. It provides 18+ Building Blocks covering storage, authentication, real-time communication, background jobs, file management, AI/search, email, and observability — all working locally without AWS credentials.

Key characteristics:

  • One aws-blocks/ directory defines the entire backend
  • Frontend imports are fully typed — no client generation needed
  • All Building Blocks work locally without AWS (mocks persist to .bb-data/)
  • Deploy ephemeral, individual testing environments with npm run sandbox and long-lived environments with npm run deploy using least-privilege credentials

Scaffolding a New Project

npx @aws-blocks/create-blocks-app my-app
cd my-app

To add AWS Blocks to an existing project:

npx @aws-blocks/create-blocks-app .

This detects the existing project and adds an aws-blocks/ workspace alongside your code.

To add AWS Blocks to an Amplify Gen 2 project:

npx @aws-blocks/create-blocks-app .

When the CLI detects amplify/backend.ts, it automatically integrates AWS Blocks with your Amplify backend.

With a specific template:

npx @aws-blocks/create-blocks-app my-app --template demo
cd my-app

Available Templates

TemplateDescription
defaultVite + lit-html starter app with basic authentication, data persistence, and realtime to help demonstrate basic app architecture and patterns (used when --template is omitted)
bareVite + lit-html starter with a single "hello world" API method and a bare frontend
reactReact + Vite starter with a single API endpoint and typed React frontend
backendBackend-only — no frontend, just the AWS Blocks API with a single endpoint
demoTodo app with AuthBasic, KVStore, DistributedTable, Zod schemas, indexes, and auth-protected CRUD
auth-cognitoFull AuthCognito passwordless email-OTP with roles, device management, and Authenticator UI
nextjsNext.js + React starter with AWS Blocks backend integration (SSR + Server Components)

Development Workflow

After scaffolding, refer to node_modules/@aws-blocks/blocks/README.md for the complete development workflow including:

  • Core concepts (Architecture, Building Block selection)
  • Project structure and Scope organization
  • Error handling patterns
  • Schema validation
  • Local development
  • Best practices and common mistakes
  • Deployment IAM role setup and security guidance

When implementing a specific Building Block, read its package README for the detailed API reference (e.g., node_modules/@aws-blocks/bb-kv-store/README.md). These are the authoritative docs for your installed version.

Security Considerations

  • Use await auth.requireAuth(context) in every method that shouldn't be public — ApiNamespace methods are unauthenticated by default
  • Use new AppSetting(scope, id, { secret: true }) for API keys and credentials — never hardcode or use .env files
  • Always attach a schema to KVStore/AppSetting that accepts user data — the RPC layer validates structure but not business logic
  • Do not add broad * IAM policies — each Building Block already grants least-privilege scoped to its own resources
  • Never change blockPublicAccess on FileBucket — serve public files through CloudFront instead
  • Configure CORS_ALLOWED_ORIGINS explicitly for production — avoid wildcards
  • For cross-domain deployments, pass crossDomain: true to auth constructors (enables SameSite=None; Secure; Partitioned)
  • Enable monitoring: { enabled: true, snsTopicArn: '...' } on Hosting for production alerts
  • Add WAF and API Gateway throttling via CDK for public-facing apps — not included by default
  • Logger provides serialization safety (circular refs, type coercion) but does NOT redact sensitive content — never pass raw credentials, tokens, or secrets to Logger methods; sanitize context objects before logging

Frequently asked questions about AWS Blocks Development

Similar skills