How to Configure Dynamodb Audit Log
You set up a dynamodb audit log by turning on cloud trail data events. This setup records table changes and read calls across your cloud account. Most teams build a single trail that sends these log files to storage. Still, broad cloud roles still let users read or change raw items during a session. Native logs tell you what happened after the fact, not while queries run. How a native dynamodb audit log works A complete DynamoDB log setup tracks two different kinds of activity in your account
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
You set up a dynamodb audit log by turning on cloud trail data events. This setup records table changes and read calls across your cloud account. Most teams build a single trail that sends these log files to storage. Still, broad cloud roles still let users read or change raw items during a session. Native logs tell you what happened after the fact, not while queries run.
How a native dynamodb audit log works
A complete DynamoDB log setup tracks two different kinds of activity in your account. First, control plane events track when someone creates, changes, or deletes a table. The cloud provider records these admin actions by default in the main event history. You do not need extra rules to see who changed a table setting.
Second, data plane events track item reads, writes, updates, and deletes inside tables. The cloud platform does not record this high-volume traffic by default. Teams must update their trail settings and pick which tables to watch. Once enabled, the service writes every item request to a storage bucket.
Some teams also turn on change streams for their tables to capture item data. While trails show who made the request, streams capture the before and after values. Combining both tools gives security teams a full view of who changed specific items. Both streams and trails send data to external buckets for long-term storage and search.
What native logging solves and where gaps remain
Native trails and streams solve the problem of historical tracking for security audits. When an incident happens, you can check the logs to see which role ran a query. You can also see the time of the call and the source network address. This record helps teams pass audits and investigate past mistakes.
Still, native logging does not control what happens during an active user session. Cloud permissions decide which role can log in and which table actions are allowed. Once a developer assumes a role with read or write permissions, every valid request runs. The log records the mistake only after the data leaves the table.
Shared roles make this problem worse for engineering teams during daily work. If five engineers share one admin role, the trail shows the role name, not the person. Also, logs do not mask sensitive fields like emails, phone numbers, or card numbers in results. If an engineer queries a customer table, the raw values return in full.
Audit Log Integrity + DynamoDB Fine-Grained Access: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Managing table permissions and data streams
To reduce risk, teams must pair logging with tight role permissions for DynamoDB tables. Instead of giving full table permissions, teams should limit roles to specific actions. Separate read roles from write roles so daily checks cannot delete live records. Require users to ask for temporary permission before they run an update script.
You should also lock down the storage buckets that hold your audit records. If an admin role can both change tables and delete log files, your audit trail fails. Put log buckets in a separate cloud account with strict read-only rules for security staff. Set up alerts on your log files to spot huge read scans right away.
Finally, watch the cost and volume of your data plane logs over time. Busy apps can create millions of read and write events every single hour. Many teams choose to log only sensitive tables that hold national IDs or card numbers. Filtering out noisy test tables keeps storage costs down and makes real threats easier to spot.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev sits inline in the wire protocol beside those services as an open-source proxy, a sidecar for your Postgres or API. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Does DynamoDB log item reads and writes by default?
No, the cloud platform only logs table creation and setting changes by default. You must turn on data events in your trail to record item reads and writes.
What is the difference between audit trails and table streams?
Audit trails record who made an API call and when the request happened. Table streams record the actual data values before and after an item changes.
Can native audit logs hide sensitive fields in query results?
No, native logs only write a record of the request after it finishes. They do not rewrite emails, phone numbers, or card numbers inside active query results.
Related guides
In this post