I asked Claude Code to add a handler for processOrders, a Lambda wired up to consume from orders-queue and read the matching row out of the Orders DynamoDB table. It wrote one immediately — confidently, in one shot, the way it writes most things.
It also parsed the event body wrong.
The problem: Claude Code didn't know the Lambda had an SQS trigger
processOrders is invoked by orders-queue through an event source mapping — that's not in processOrders's source file, it's in the AWS account. Claude Code, reading only the handler's code, had no way to see that mapping. So it guessed at the event shape instead of knowing it, and reached for event.body — the shape you'd expect from an API Gateway proxy integration, not from SQS. The actual shape for an SQS-triggered Lambda is event.Records[0].body. First message in, first field access, and the handler throws.
That wasn't the only thing invisible from source alone:






