惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

J
Java Code Geeks
量子位
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
B
Blog
A
About on SuperTechFans
腾讯CDC
The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
雷峰网
雷峰网
Last Week in AI
Last Week in AI
H
Help Net Security
WordPress大学
WordPress大学
博客园 - 司徒正美
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
Tailwind CSS Blog
博客园 - 【当耐特】
S
SegmentFault 最新的问题
美团技术团队
M
MIT News - Artificial intelligence
L
LangChain Blog
博客园 - 聂微东

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
AI Generated a DynamoDB Query That Could Never Work
Siddharth Pa · 2026-05-13 · via DEV Community

I asked an AI coding assistant to generate a DynamoDB query.

A few seconds later it confidently gave me this:

const result = await dynamo.query({
  TableName: "Orders",
  IndexName: "customerId-createdAt-index",
  KeyConditionExpression: "customerId = :customerId",
});

Enter fullscreen mode Exit fullscreen mode

Looks clean.

Looks professional.

Looks like something a senior backend engineer would casually approve during code review while fighting for survival in their 14th Slack thread of the day.

Tiny issue though.

The index did not exist.

And honestly, this is becoming one of the biggest problems with AI coding tools:
they are extremely good at generating things that look correct.


The AI Wasn't Being Stupid

That’s the interesting part.

The assistant actually made a pretty reasonable guess.

It saw:

  • DynamoDB usage
  • query patterns
  • naming conventions
  • nearby code

…and predicted what probably existed.

Which is exactly what LLMs are designed to do.

The problem is:
production infrastructure is not based on probability.

Either the GSI exists or it does not.

AWS is unfortunately not very emotionally supportive about this distinction.


Infrastructure Is Not Just "More Context"

A lot of AI tooling conversations eventually turn into:

“We just need better RAG.”

Or:

“We just need larger context windows.”

That helps.

But I think there’s a deeper issue here.

Because infrastructure is not just information.

It’s relationships.

The assistant might read:

  • Terraform
  • schema files
  • docs
  • migrations
  • configs

…and still not reliably understand:

  • which indexes are actually deployed
  • which environments differ
  • which access patterns are safe
  • which infrastructure assumptions are outdated

That’s not just a retrieval problem.

That’s a system understanding problem.


DynamoDB Makes This Very Obvious

DynamoDB is actually a great example here because it is brutally honest about access patterns.

With SQL databases, developers sometimes get away with questionable decisions for a while.

DynamoDB basically says:

“No index? That sounds like a you problem.”

And honestly, fair enough.

The entire database is designed around:

  • partition strategy
  • access patterns
  • deliberate schema design
  • predictable query paths

Which means an AI assistant cannot just generate random “probably correct” queries and hope reality cooperates.

The query either aligns with infrastructure design or it does not.

There’s not much middle ground.


The Dangerous Part Is Confidence

What makes these failures tricky is that the generated code often looks completely believable.

No syntax errors.
No obvious red flags.
No broken TypeScript.

Just confident infrastructure hallucinations.

And that’s much harder for engineers to detect quickly.

Especially in large systems where:

  • nobody remembers every index
  • environments drift over time
  • schemas evolve constantly
  • infrastructure knowledge is fragmented across teams

Every company has at least one cloud resource held together entirely by:

  • historical accidents
  • undocumented assumptions
  • and collective organizational fear

AI assistants walk directly into these systems with the confidence of somebody who read half the README and decided they understand the architecture.


This Is The Gap I Keep Thinking About

Most AI coding assistants today are optimized for:

  • syntax
  • implementation patterns
  • framework familiarity
  • autocomplete quality

But production systems need something else:

  • operational awareness

The assistant needs deterministic understanding of:

  • infrastructure topology
  • indexes
  • schema relationships
  • runtime dependencies
  • deployment reality

Otherwise it is just making educated guesses about systems that may cost thousands of dollars per mistake.

That feels slightly important.


This Is One of the Reasons I Started Building Infrawise

This problem is one of the reasons I started working on opensource project Infrawise.

The idea is simple:

Instead of forcing AI assistants to infer infrastructure from scattered code and configs, provide deterministic infrastructure context directly.

Things like:

  • DynamoDB index awareness
  • schema relationships
  • infrastructure mapping
  • static analysis
  • AI-consumable infrastructure context

Not “AI magic.”

Just explicit system understanding.

Because hallucinated code is annoying.

Hallucinated infrastructure is how people accidentally discover entirely new AWS billing experiences.


AI Needs To Understand Systems, Not Just Code

Current AI coding assistants are already very good at understanding source code.

The next generation will need to understand:

  • architecture
  • topology
  • infrastructure relationships
  • operational constraints
  • deployed reality

Because software does not actually run inside VS Code.

It runs inside infrastructure.

And infrastructure is where “probably correct” stops being good enough.