← AWS CoreCONTENT HISTORY

Update to AWS Core

Snapshot Sep 30, 2026 · 22:47 UTC · version 1.0.0

Collection source: not recorded for this historical snapshot.

WHAT CHANGED · RULE-BASED ANALYSIS

First saved snapshot

No earlier snapshot is available to establish a change.

Compare saved observations

Download comparison JSON
Full technical diff · 0 changed fields
Full snapshot data
{
  "name": "aws-blocks",
  "description": "Guides building full-stack applications with AWS Blocks — an Infrastructure-from-Code framework. Applies when creating APIs, selecting Building Blocks (KVStore, DistributedTable, Database, AuthBasic, AuthCognito, Realtime, AsyncJob, FileBucket, etc.), running local development, or deploying AWS Blocks applications. Also covers AWS Blocks topics with validated, version-specific patterns that prevent common mistakes. Triggers when user mentions AWS Blocks; project has aws-blocks/ directory; code imports @aws-blocks packages.",
  "included_files": [],
  "skill_md_contents": "---\nname: aws-blocks\ndescription: Guides building full-stack applications with AWS Blocks — an Infrastructure-from-Code framework. Applies when creating APIs, selecting Building Blocks (KVStore, DistributedTable, Database, AuthBasic, AuthCognito, Realtime, AsyncJob, FileBucket, etc.), running local development, or deploying AWS Blocks applications. Also covers AWS Blocks topics with validated, version-specific patterns that prevent common mistakes. Triggers when user mentions AWS Blocks; project has aws-blocks/ directory; code imports @aws-blocks packages.\n---\n\n# AWS Blocks Application Development\n\n> **Package naming:** All packages are published under the `@aws-blocks` scope (e.g., `@aws-blocks/core`, `@aws-blocks/blocks`, `@aws-blocks/bb-kv-store`).\n\n## Overview\n\nAWS 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.\n\n**Key characteristics:**\n\n- One `aws-blocks/` directory defines the entire backend\n- Frontend imports are fully typed — no client generation needed\n- All Building Blocks work locally without AWS (mocks persist to `.bb-data/`)\n- Deploy ephemeral, individual testing environments with `npm run sandbox` and long-lived environments with `npm run deploy` using least-privilege credentials\n\n## Scaffolding a New Project\n\n```bash\nnpx @aws-blocks/create-blocks-app my-app\ncd my-app\n```\n\n### To add AWS Blocks to an existing project:\n\n```bash\nnpx @aws-blocks/create-blocks-app .\n```\n\nThis detects the existing project and adds an `aws-blocks/` workspace alongside your code.\n\n### To add AWS Blocks to an Amplify Gen 2 project:\n\n```bash\nnpx @aws-blocks/create-blocks-app .\n```\n\nWhen the CLI detects `amplify/backend.ts`, it automatically integrates AWS Blocks with your Amplify backend.\n\n### With a specific template:\n\n```bash\nnpx @aws-blocks/create-blocks-app my-app --template demo\ncd my-app\n```\n\n### Available Templates\n\n| Template | Description |\n|----------|-------------|\n| `default` | Vite + lit-html starter app with basic authentication, data persistence, and realtime to help demonstrate basic app architecture and patterns (used when --template is omitted) |\n| `bare` | Vite + lit-html starter with a single \"hello world\" API method and a bare frontend |\n| `react` | React + Vite starter with a single API endpoint and typed React frontend |\n| `backend` | Backend-only — no frontend, just the AWS Blocks API with a single endpoint |\n| `demo` | Todo app with AuthBasic, KVStore, DistributedTable, Zod schemas, indexes, and auth-protected CRUD |\n| `auth-cognito` | Full AuthCognito passwordless email-OTP with roles, device management, and Authenticator UI |\n| `nextjs` | Next.js + React starter with AWS Blocks backend integration (SSR + Server Components) |\n\n## Development Workflow\n\nAfter scaffolding, refer to **node_modules/@aws-blocks/blocks/README.md** for the complete development workflow including:\n\n- Core concepts (Architecture, Building Block selection)\n- Project structure and Scope organization\n- Error handling patterns\n- Schema validation\n- Local development\n- Best practices and common mistakes\n- Deployment IAM role setup and security guidance\n\nWhen 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.\n\n## Security Considerations\n\n- Use `await auth.requireAuth(context)` in every method that shouldn't be public — ApiNamespace methods are **unauthenticated by default**\n- Use `new AppSetting(scope, id, { secret: true })` for API keys and credentials — never hardcode or use `.env` files\n- Always attach a schema to KVStore/AppSetting that accepts user data — the RPC layer validates structure but not business logic\n- Do not add broad `*` IAM policies — each Building Block already grants least-privilege scoped to its own resources\n- Never change `blockPublicAccess` on FileBucket — serve public files through CloudFront instead\n- Configure `CORS_ALLOWED_ORIGINS` explicitly for production — avoid wildcards\n- For cross-domain deployments, pass `crossDomain: true` to auth constructors (enables `SameSite=None; Secure; Partitioned`)\n- Enable `monitoring: { enabled: true, snsTopicArn: '...' }` on Hosting for production alerts\n- Add WAF and API Gateway throttling via CDK for public-facing apps — not included by default\n- 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\n"
}

SHA-256: 236455243c088b825ad166179d69492ecc38a3782f03624bae86153648109688