[Report] I Learned the Flow of Assembling a Backend Locally with AWS CDK Blocks and Then Deploying It to AWS #AWSreInvent #DVT328

[Report] I Learned the Flow of Assembling a Backend Locally with AWS CDK Blocks and Then Deploying It to AWS #AWSreInvent #DVT328

Report on AWS re:Invent 2026 session DVT328. Using a demo app, it shows how AWS CDK Blocks combine auth, KV store, file storage and AI agents as feature Blocks, run locally without an AWS account, then deploy.
2026.12.02

This page has been translated by machine translation. View original

Introduction

Hello everyone, this is Akaike.

I'm attending AWS re:Invent 2026, and I listened to the session "Build a backend before your coffee gets cold with AWS CDK Blocks".

Even if you can build a frontend quickly, once it comes to the backend you have to think about designing authentication, databases, and storage, and suddenly it gets hard to get started...

In this session, the speaker explained the flow of building the backend for an app that records conference notes using AWS CDK Blocks, which was released right before re:Invent, so I've summarized the content.

Session Overview

Title

Build a backend before your coffee gets cold with AWS CDK Blocks (DVT328)

Abstract

What if you could stand up a full application backend—database, auth, real-time messaging, file storage, even an AI agent—in TypeScript, running locally, with no AWS account required? AWS CDK Blocks is an open-source framework where each "Block" bundles your app code, a local dev implementation, and production AWS infrastructure. Compose the Blocks you need, run one command to develop locally, then deploy the same code to AWS unchanged. Built for a world where AI agents write the code, Blocks ships steering files that guide agents to correct architecture from the start. In this lightning talk, see how fast full-stack can be.

What if you could build a full-featured application backend, including a database, authentication, real-time messaging, file storage, and even an AI agent, in TypeScript and run it locally without needing an AWS account? AWS CDK Blocks is an open-source framework in which each "Block" bundles application code, a local development implementation, and production AWS infrastructure. You combine the Blocks you need, run a single command to develop locally, and deploy the same code to AWS as is. Built with a world in which AI agents write code in mind, Blocks comes with steering files that guide agents to the correct architecture from the start. In this lightning talk, we'll show you just how fast full-stack development can be.

Speaker

  • Salih Güler (Senior Developer Advocate, AWS)

Session Information

  • Level: 300 - Advanced
  • Session type: Lightning talk
  • Topics
    • Artificial Intelligence
    • Developer Tools

DVT328_01

Session Content

The Problem of Conference Notes Disappearing Somewhere

DVT328_02

At the beginning of the session, the speaker introduced how difficult it is to record what you heard and make use of it later at a conference like re:Invent, which has over 2,000 sessions.

  • Scattered across apps: Notes are in one app, and photos of slides are in another
  • Recordings no one listens to again: No matter how many hours of audio you record, you never open it again
  • No link to the session: You can't tell which note belongs to which session
  • Forgotten in a month: You may remember the speaker, but not the key points of the talk

What Talk Journal Can Do

DVT328_03

To solve this problem, the speaker built an app called "Talk Journal".
In this session, the subject was the flow of building this app's backend with AWS CDK Blocks.

Feature Description
Record Record audio from the microphone during a session
Transcribe Transcribe the audio using AI
Summarize When you stop recording, it summarizes the key points and unresolved questions
Revisit Keep the sessions you attended as a personal history
Pick sessions When you rate sessions, an agent picks recommendations

The reason for transcribing is that they want to turn the audio into text so that AI can work with the content.

What Is AWS CDK Blocks?

DVT328_04

AWS CDK Blocks is a layer of abstraction placed on top of AWS CDK.
It also became GA on November 20, 2026, so it has just been released.

  • 20+ Blocks: Each reflects AWS best practices, and you import and use them as code
  • Develop locally: You can build and test on your own PC without an AWS account
  • Deploy to AWS: It is deployed to your own AWS account as CDK that you can read and modify

The aim is to let even developers with no infrastructure experience assemble a backend without knowing the details of how CDK works.
Local execution also supports the agent part, and the agent can also be run with Ollama, they said.

https://docs.aws.amazon.com/cdk/blocks/

Use One Block per Feature

DVT328_05

This is a table mapping Talk Journal's features to the Blocks that implement them.

Feature Block
Sign-in Auth
Storing sessions, notes, and transcripts KVStore
Audio recording data FileBucket
Background summarization processing AsyncJob
The model that writes summaries Agent
"Summary complete" notification to open tabs Realtime
Recommendations based on ratings Agent + KVStore

Since the Block names directly match the features, it's easy to know which one to use.
For example, for authentication, the explanation was that you can just use Auth without thinking about whether to use Amazon Cognito.

How the Blocks Connect

DVT328_06

This is a diagram showing how the Blocks connect to each other.

  • Requests from the browser (microphone, transcription, notes) are received by the API defined in cdk-blocks/index.ts
  • The API routes requests depending on their content to Auth (sign-in), KVStore (sessions and ratings), FileBucket (recordings), and AsyncJob (summarization)
  • AsyncJob calls the Agent in charge of summarization, and when it finishes, notifies the browser via Realtime
  • The Agent in charge of recommendations reads data from KVStore to pick sessions

Step 1: Start Simple

DVT328_07

From here, the speaker explained how to actually build it.
The initial setup is simple, as follows.

  • React + Vite: The frontend goes in src/, and the entire backend goes in cdk-blocks/
  • Local mocks: All Blocks run on your own PC, and data is saved in .cdk-blocks/local/
  • No AWS account needed: An AWS account is only required when you deploy

Demo: Project Structure

DVT328_08

From here, there was a demo with the project opened in Kiro.
The speaker said, "The slides end here; from now on I'll show a lot of code," and the demo continued after this.

Demo: The Talk Journal Screen

DVT328_09

In the demo, the speaker signed in to Talk Journal, which was already deployed to Amplify, and showed the following operations.

  • Enter the title of the session you're listening to and start recording
  • Open a past recording to check the summary and the recording data
  • When you rate a session on a 3-level scale of "Not my style", "My style", and "Definitely my style", the agent takes the new rating into account and picks recommendations again

A session called SVS348 was displayed in "Your talks" on the screen, so you can tell it was being used right there at the venue.

Demo: The Three Files in the cdk-blocks Folder

DVT328_10

You create the project with the npm create command.
In the generated cdk-blocks folder, the following three files are especially important.

  • index.ts: The file that defines the infrastructure. You usually edit this one
  • index.handler.ts: The file where you write handlers such as Lambda functions
  • index.cdk.ts: The file where you directly add, in CDK code, whatever the Blocks don't cover

The reason index.cdk.ts exists is that tools that abstract infrastructure inevitably have a limit to what they can do.
The speaker gave Amplify Gen 2 as an example, explaining that they made it possible to add CDK logic on the spot when you hit that limit.
In fact, Talk Journal uses Amplify, which is not included in CDK Blocks, to host the frontend, so index.cdk.ts is used to configure it to use the correct web origin at deploy time.

If you want to use only the library without creating a project, you can also install it with npm.

Demo: Defining the Auth Block

DVT328_11

This is the part where Auth is defined in index.ts.

When creating Auth, you first decide whether to have users sign in through an OIDC provider such as Google or Apple, or to use a simple email address and password.
This is because the choice changes how you build the authorization rules for the database.

The main items that can be configured are as follows.

  • Password policy (minimum length, uppercase, lowercase, etc.)
  • Blocking specific email addresses (e.g., restricting to only your company's domain)
  • Session and cross-domain settings
    • Since the frontend is on Amplify and the API is on API Gateway, the domains are separate, so crossDomain: true is set
  • The attribute used for sign-in (username or email address)

However, only scope and the resource name (here 'auth') are required.
scope is the name of the whole app, and all resources that are created are created under this scope.

The speaker then explained the other Blocks.

  • KVStore: You define types in TypeScript and store data in key-value form by specifying those types. You can also use PostgreSQL as a relational database
  • FileBucket: It is an S3 bucket under the hood. You can define which users can read, write, and delete for each authorization layer
  • Realtime: You define channels, and the client side subscribes to those channels
  • Agent: You specify scope, a name, and a system prompt. A default model is provided, and you can also specify your own
  • AsyncJob: Runs heavy processing in the background and returns a message when it finishes. You can use Realtime and others for notifications

These Blocks ultimately run on AWS services; for example, Auth uses Amazon Cognito and KVStore uses Amazon DynamoDB.

Step 12: Have a Coding Agent Write It

DVT328_12

The explanation was that CDK Blocks is designed to be easy to develop with coding agents.

  • AGENTS.md: Newly created projects include an AGENTS.md that makes the agent read the correct files and Block documentation
  • Blocks MCP server: The agent can get the list of the project's Blocks and read local data
  • Tests on its own: The agent calls the API against the local mocks and verifies its own work

The slide said, "You can review a working app instead of guesswork."
Note that the Blocks MCP server is an unofficial one that the speaker made personally, and it is published on GitHub.

Step 13: Deploy the Same Code to AWS

DVT328_13

What you built locally can be deployed to AWS as is.

  • Real infrastructure: Each Block switches from the local mock to AWS resources
  • Real models: The Agent uses the deployed model, so summarization incurs token charges
  • Easy cleanup: You can delete the test environment with npm run sandbox:destroy

npm run sandbox is your own personal test environment, and npm run deploy is the environment for ongoing use.

Step 11: Develop Locally Without Model Charges

DVT328_14

When you run npm run dev, the entire app, including the AI parts, runs on your own PC.

  • A model that returns fixed responses: By default, the Agent responds with a keyword-based mock
  • A real model, offline: If you specify an Ollama model in model.local, you can generate actual summaries
  • Data persists: Sessions and recordings are saved in .cdk-blocks/local/ and remain after restarting
  • Start over from scratch: Deleting .cdk-blocks/local/ returns things to a clean state

Even if you can't run Ollama on your PC, the mock returns plausible responses, so you can keep developing without worrying about the behavior of the AI part.
It's nice that there are no model charges locally.

Step 14: Deploy to AWS with a Coding Agent

DVT328_15

Last is how to deploy.

  • Deploy the backend to your own AWS account with npm run deploy
  • You can choose freely where to host the frontend
    • The default is CloudFront + S3
  • Give the coding agent the CDK Blocks skill from Agent Toolkit for AWS

In Talk Journal, the frontend was placed on Amplify, a service separate from CDK Blocks.
The small changes needed when changing the hosting destination can be left to the coding agent, they said.

References

DVT328_16

Finally, the following three resources were introduced.

CDK Blocks is an open-source project published on GitHub.
The samples site publishes the source code of CDK Blocks apps built by the speaker, including this Talk Journal.

Conclusion

That was the report on the session "Build a backend before your coffee gets cold with AWS CDK Blocks".
I was able to learn the overall flow of CDK Blocks, which has only recently reached GA, using a real app as the subject.

Personally, the following points were especially impressive.

  • You can run even the AI part without an AWS account
    • The Agent also responds with a mock by default, so you can experiment without worrying about model charges
  • An escape hatch called index.cdk.ts is provided from the start
    • Abstracted tools tend to cause trouble when you hit their limits, but being able to add CDK code on the spot is reassuring
  • It assumes development with coding agents
    • AGENTS.md is included from the start, and the agent can even verify behavior with the local mocks, which is very much of the moment

When I build the backend for a small internal tool or a personal project, I plan to try CDK Blocks first.


AWS re:Invent 2026まとめ情報

クラスメソッドは2026/11/30〜12/4にラスベガスで開催されるAWSカンファレンスイベント「re:Invent」を今年も特集しました。ぜひ一度ご覧ください。 re:Invent 2026ポータルサイトを見るAWS re:Invent公式サイトはこちら

Share this article

AWSのお困り事はクラスメソッドへ