
【レポート】「AI-assisted data modeling for Amazon DynamoDB」に参加してきました #AWSreInvent
概要
こんにちは、クラスメソッド製造ビジネステクノロジー部の田中聖也です。
AWS re:Invent 2026で、Builders' session「DAT431-R2 AI-assisted data modeling for Amazon DynamoDB」に参加してきました!
DynamoDBの設計手法そのものより、「エージェントにどんな知識と道具を持たせ、どうプロンプトで導くか」に焦点を当てたセッションでした。
※本レポートは会場で録音した音声の文字起こし、ワークショップの手順画面、配布されたプロンプトをもとにまとめています。聞き取りにくい箇所もあったため、細かな数字や固有名詞に誤りがある可能性がある点はご了承ください。なお、今回は写真を撮っていないため、画像は掲載していません。
セッション概要
- タイトル:DAT431-R2 AI-assisted data modeling for Amazon DynamoDB
- 日時:2026年12月2日(水) 16:00〜17:00(現地時間)
- 会場:MGM Grand(Level 3, Room 301)
- 種別:Builders' session(少人数のハンズオン)
- レベル:400 – Expert
In this session, learn practical Amazon DynamoDB data modeling through an AI-assisted approach. Architect complex data models using sophisticated techniques right inside an AI-powered IDE, then go from modeling to production, building a full-stack, serverless application powered by DynamoDB and other AWS services via a coding agent of choice. Optimize access patterns, leverage secondary indexes, and express application requirements in natural language to generate and refine a complete solution built on DynamoDB. Discover how AI-assisted database design accelerates complex NoSQL decisions at every stage of development. Bring your laptop to participate.
日本語訳
このセッションでは、AIを活用したアプローチで、Amazon DynamoDBの実践的なデータモデリングを学びます。AIを搭載したIDEの中で高度な手法を使って複雑なデータモデルを設計し、好みのコーディングエージェントを通じて、DynamoDBとほかのAWSサービスを使ったフルスタックのサーバーレスアプリケーションを本番まで構築します。アクセスパターンを最適化し、セカンダリインデックスを活用し、アプリケーションの要件を自然言語で表現して、DynamoDB上の完全なソリューションを生成・改善します。AIを使ったデータベース設計が、開発のあらゆる段階で複雑なNoSQLの判断をどう加速させるかを体験してください。参加にはノートPCが必要です。
登壇者
| 登壇者 | 所属・役職 |
|---|---|
| Robert McCauley氏、Greg Krumm氏、Kevin Willis氏、Lee Hannigan氏、Keren Tseytlin氏 | 公式に記載の登壇者(5名) |
前で説明していたのは、DynamoDBのプロダクトマネージャーのKevin氏です。データの読み書きのAPIやデータモデリングを担当していて、今回のスキルのオーナーとのことでした。
セッションレポート
1. なぜデータ設計にスキルが要るのか
Kevin氏は、AIエージェントで開発するときは、エージェントが自分の答えを検証できるループに入れることが大事だと話していました。今回はそのループをデータ設計に持ち込む、という趣旨です。
スキルなしのエージェントには、こんな問題があるとのことでした。
- DynamoDBに存在しない操作を「発明」して、それを前提に設計してしまう(存在しないAPIをあるように誤認してしまう)
- 学習データに、説明用に単純化したブログの設計例や、昔は正しかったが今は違う情報が混ざっている
- エージェントには、それが正しいかどうかを区別する手段がない
そこで使うのがスキルです。Kevin氏は、スキルを「エージェントのためのアプリ」と例えていました。
マークダウンの知識だけでなく、実際のアプリの設計例や、料金・性能を計算するコード、実環境で検証するコードまで含められるのが重要ですね。
今回使ったスキル「amazon-dynamodb」は公開されていて、次のコマンドで入れられます。
npx skills add https://github.com/aws/agent-toolkit-for-aws --skill amazon-dynamodb
2. 7つのプロンプトで進める設計の流れ
ワークショップでは、Kiroのチャットにプロンプトを1つずつ貼りながら進めます。
配布されたプロンプトを、使う順番に載せます。
| 順番 | プロンプト | やること |
|---|---|---|
| 1 | @ddb-interview | アプリについてインタビューを受ける |
| 2 | @ddb-confirm | 聞き取った要件を表で確認する |
| 3 | @ddb-design | テーブルとインデックスを設計し、モデルファイルに保存する |
| 4 | @ddb-price | スキルの計算機で月額料金と性能を試算する |
| 5 | @ddb-validate | テスト用アカウントに実際のテーブルを作り、短く検証する |
| 6 | @ddb-record | 決定記録を残す |
| 7 | @ddb-my-card | 自分用のプロンプトカードを作る |
2-1. @ddb-interview(アプリについてインタビューを受ける)
アプリの内容は $ARGUMENTS の部分に1文で入れます。読み書きのパターン、ピーク時と平均のアクセス数、特定の顧客や機器にアクセスが集中するか、書き込みが遅れて届いたり二重に届いたりしないか、どこまで古いデータを読んでよいか、データをいつまで残すか、絶対に起きてはいけないことは何か。こうした論点を1つずつ聞いてきます。1ターンの質問は3つまでで、それぞれに既定値を付け、人が「要件は出そろった」と言うまで設計しない、という指示になっています。
Use the amazon-dynamodb skill to interview me about my app: $ARGUMENTS. Go one topic at a time: what the app reads and writes, and how each read finds its items; how often, at peak and on average, and whether one customer, device, or item gets most of the traffic; what each item holds and how big it is; whether writes can arrive late, out of order, or twice; how stale a read may be, in seconds; how long data lives; and what must never go wrong. Ask at most three questions a turn (every question mark counts), and offer a default I can accept for each. If I give a vague answer, such as "pretty busy", ask me for a number or a range. A default I accept is still your number, not mine. If a number I give would break a DynamoDB limit, say so right away. When I say time, list what's still open and wait. Don't design anything until I say the requirements are complete.
2-2. @ddb-confirm(聞き取った要件を表で確認する)
聞き取った内容を1つの表にして、数字ごとに「you said/you guessed/my default」のラベルを付けさせます。エージェントが提案した数字は、人が同意しても「my default」のままです。キーや料金を左右しそうな既定値・推測を最大5つ聞き直し、聞き忘れた論点も教えてくれます。
Show me the requirements you've captured as one table in the skill's access-pattern list, with the peak and average rate for each operation, and keep each cell to a phrase. Label each figure by who proposed it first: 'you said', 'you guessed', or 'my default'. If you proposed it, it's 'my default', even if I agreed. Then ask me about the guesses and defaults most likely to change a key or the cost, at most five, most important first. Name any topic on the skill's checklist you never asked me about. After corrections, show only the changed rows.
2-3. @ddb-design(テーブルとインデックスを設計し、モデルファイルに保存する)
料金の計算機はまだ動かさず、モデルファイルのパス、テーブルとインデックスの表、「一番自信のない選択」とその根拠の数字、何が分かったら別案に変えるか、の4点だけを返させます。
The requirements are complete. Design the model with the skill and save its model file as design/dynamodb_data_model.json, with every key chosen. Don't run the calculator yet. Reply with only this, and stop:
- The model file's path.
- One table, with a row for each table and index: its keys and the requirement it serves.
- My least certain choice is <choice>. You said "<your words>". The numbers behind it are <each labeled you said, you guessed, or my default>.
- I'd change that same choice to <alternative> if <the answer to a question you haven't settled>.
After any change, update the file and read back the changed field.
2-4. @ddb-price(スキルの計算機で月額料金と性能を試算する)
モデルファイルをそのまま計算機に渡してレポートを保存し、そのうえでコストを一番下げられる代替案を1つ選んで、コピーしたモデルで試算します。数字はすべて計算機の実行結果から出し、自分で計算したものはそう書かせます。
Run the skill's calculator on my model file exactly as it is, save its report as design/cost_report.md, and show me that report as the first row. Then pick the one alternative that most cuts the biggest cost or the busiest key, say why, and price it on a copy; put any change, even a correction I give you, on a copy too. Save each copy and its report in design/variants/, named for the change. Use expected monthly cost from the average rates, not peak all month, and say which averages are your defaults. If one of your defaults drives a large cost line, agree a range with me and price both ends. Show one table: option, expected monthly cost, difference from my first row, busiest key, and what a user would lose. Every number comes from a calculator run; label anything you work out yourself.
2-5. @ddb-validate(テスト用アカウントに実際のテーブルを作り、短く検証する)
最大3つのアクセスパターンを選び、実行前に、何を作るか、時間、費用、後片付けは誰がするかを見せて、人が承認してから動かします。実行後は、予測と実測を比べます。
Plan a quick live test of my model with the skill, using benchmark_config.json as it is. Pick up to three access patterns: the write that drives the bill, then the highest-throughput, transactional, or riskiest-key patterns, on a copy of the model in design/variants/ that keeps every table. Before I approve, list the patterns and why, show one sample item and one request for each, say which prediction each can check, and say what you'll create, how long it takes, what it costs, and who cleans up. After the run, compare measured and predicted units per call for each pattern, table and index, and list anything still to measure.
2-6. @ddb-record(決定記録を残す)
人が「受け入れる」と言ったものだけを受け入れ済みとして、40行未満の決定記録にまとめます。まだエージェントの提案のままのもの、料金を左右している誰の推測か、未計測・未決定のことも残します。
Save a short decision record, under 40 lines, as design/decision-record.md. What did I accept? Nothing counts as accepted unless I said so. What's still your proposal? Link calculator estimates and live measurements to their reports. Name whose guesses drive each cost, and label your arithmetic. What remains unmeasured or undecided? Read the saved model and list any difference from your recommendation.
2-7. @ddb-my-card(自分用のプロンプトカードを作る)
使ったプロンプトを順番どおりにそのまま写し、各プロンプトの下に、自分が軌道修正した内容を3行以内で添えます。最後に、自宅で使うための手順がそのまま入ります。
Write my own prompt card as my-prompt-card.md and give me its path. Copy each prompt file I used from .kiro/prompts in this workspace word for word, in order, with my app's sentence filled into the interview. Under each prompt, add at most three lines: the times I corrected or redirected you in that step (not my answers to your questions), in my own words, and what each changed. End with the open questions from my decision record. Keep everything outside the prompts under 400 words, and add nothing I didn't do. End the card with this section, word for word: "Use these at home: install the skill with npx skills add https://github.com/aws/agent-toolkit-for-aws --skill amazon-dynamodb, copy the prompt files into ~/.kiro/prompts/, and type @ddb-interview followed by one sentence about your app."
Kevin氏は「スキルがあることと、エージェントにそれをうまく使わせるプロンプトがあることは別」と話していました。プロンプトまで配布して持ち帰れるようにしているのは、そのためとのことでした。スキルだけでなく、使い方まで含めて配っているのが親切ですね!!
3. 数字の出どころを区別する
正直、個人的にいちばん良いと思ったのが、確認ステップの工夫です。
聞き取った要件を表にするとき、数字ごとに次のラベルを付けさせます。
- you said(あなたが言った)
- you guessed(あなたの推測)
- my default(エージェントの既定値)
しかも、エージェントが提案した数字は、人が同意しても「my default」のまま扱うよう指示しています。
そのうえで、キーの選び方や料金を一番左右しそうな既定値・推測を、最大5つまで聞き直してきます。
設計のステップでも、「一番自信のない選択」と、その根拠になっている数字、そして何が分かったら別案に変えるかを答えさせます。AIがどこまで自信を持っているかが見えるので、人が確認すべきところに集中できるのは大きいですね。
4. 計算と実測で設計を裏付ける
設計ができたら、2段階のチェックで裏付けます。
| チェック | 内容 |
|---|---|
| 1: 計算機 | モデルファイル(JSON)をPythonのスクリプトに渡し、本当にある操作かを確認し、アクセスパターンごとの月額料金と性能を試算する。変更のたびに発生するインデックスへの書き込みや、人気のキーに集中したときに1つのパーティションに収まるかも見る |
| 2: 実環境での検証 | 許可を得てテスト用アカウントに実際のテーブルとLambdaを作り、最大3つのアクセスパターンを実際に叩いて、予測と実測を比べる(約7分) |
Kevin氏は、スクリプトだけでも実サービスとの整合は約9割取れると話していました。
デモでは、あるアクセスパターンだけ保存料金が月1,000ドル規模になり、他はほぼゼロ、という結果が出ていました。
こうした「数字の根拠」があると、エージェントと「ここを半分にできないか」と具体的に話を進められるのが良いところですね。
※約9割という数字は登壇者の説明で、公式の情報までは確認できていません。
配送アプリの例も紹介されていました。配達中の位置情報が大量に溜まって保存料金が高くなったので、エージェントに相談したところ、「前日以前のデータはAmazon S3にアーカイブし、ルートの要約だけを残す」という案が出てきたそうです。
5. 決定記録とプロンプトカード
最後の2つのプロンプトで、セッションの成果を持ち帰れる形にします。
決定記録(decision-record.md)には、次のことを40行未満で残します。
- 人が受け入れたこと(人が明示的に「受け入れる」と言ったものだけ)
- まだエージェントの提案のままのもの
- 料金を左右しているのは誰の推測か
- まだ計測していないこと、決めていないこと
「人が言わない限り、受け入れたことにはしない」というルールは、AIと一緒に設計するときの線引きとして、とても分かりやすいですね。
プロンプトカードは、自分が使ったプロンプトと、途中で軌道修正した内容をまとめたものです。次のアプリの設計でそのまま使えます。
6. 登壇者の使い方
デモの合間に、Kevin氏自身の使い方も紹介されていました。
- ER図の写真、設計書、既存のデータベースのクエリログを渡すと、質問がほとんど要らなくなる
- 設計ができたら、複数のエージェントに別々にレビューさせ、違いが出たところを議論する
- 説明が分かりにくいときは「tell it to me like I'm five(5歳児に説明するように)」と頼む人も多い
AWSのエンジニアも、自分と同じようにAIに「5歳児に説明して」とお願いしていると聞いて、ちょっと親近感が湧きました(笑)
まとめ
AIに設計を任せるときは、知識と道具(スキル)を持たせ、計算と実測で裏付け、人が決めたこととAIの提案を分けて記録する。
この流れは、DynamoDBに限らず、AIと一緒に何かを作るときの型として使えそうだと思いました。











