You ask an AI coding tool to build a waitlist endpoint. It adds a test that writes a signup to a local DynamoDB table. The test passes. Does the deployed app have permission to write to the right table?
This article was prepared with AI assistance. The waitlist example is hypothetical.
That test can't tell you. It's still a useful test, as long as you don't ask it to answer the wrong question.
On November 11, AWS announced AWS Emulator, a way to run supported AWS operations locally or in CI using the AWS SDK or CLI. The emulator holds resource state in memory while it runs. An unsupported operation can return 501 Not Implemented. The AWS launch guide also says the emulator doesn't evaluate IAM policies the same way AWS does. That's a boundary worth putting into your test plan before an assistant starts writing tests.
Give the local test one job
Use fictional signups and an isolated table. Test that a valid request writes one record, that an invalid request writes none, and that a duplicate request gets the response you intended. If retry behavior matters, send the same request twice and inspect the stored state. An HTTP success response alone won't tell you whether the handler stored two records.
Point the test configuration at the emulator with test-only credentials. Make the test fail clearly if the endpoint isn't the expected local target. A test suite should never discover your real AWS account because someone forgot to set an environment variable. If the emulator returns 501, record the operation it couldn't exercise; don't stub away the result and report that the integration passed.
Give the staging test a different job
Use an existing authorized staging environment when one is available. Run a small check with the exact role the deployed function will use. Verify it can write a test signup to the staging table and cannot write to a resource outside its intended scope. Check the expected destination and use clearly labeled synthetic data. Don't prove staging by sending real customer messages or using production records.
If an emulator test passes and staging reports an access error, check the actual role, target resource, and applicable policy first. Don't grant broad permissions just to make the test green. The access error may be the test discovering a real difference between the local setup and what you intend to deploy.
Ask the assistant to report both outcomes separately
I'd put this in the issue: "Report local request handling and staging permissions as separate results. Show the destination and the test case for each. If staging is unavailable, mark permissions unverified. Don't create resources or change permissions to get a green result."
That gives you a more useful handoff than a single "tested" checkbox. The emulator can help answer whether your code behaves the way you expect. The staging check tells you whether it behaves that way in the environment, under the identity, where it will actually run.
The $3 AI App Builder Starter Prompts help spell out boundaries like these before handing work to a coding tool. The $9 AI App Builder From Zero e-book walks through planning, testing, and release. The $10 learning bundle includes both.
Bootcamp Bundle (Review Radar) is coming soon; the preview and waitlist are open, and checkout is closed.
You can also find me here:
Medium: https://medium.com/@marcusykim
DEV.to: https://dev.to/marcusykim
Website: https://marcusykim.com/
X: https://x.com/marcusykim
LinkedIn: https://www.linkedin.com/in/marcusykim/
Upwork: https://www.upwork.com/freelancers/marcusykim
