How to Configure Redshift Audit Log

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a redshift audit log by turning on logging in your cluster settings. You can send these logs to a storage bucket or a log stream. Most data teams enable this feature to track who enters the warehouse and what they run. When database roles are too broad, logs help you spot risky queries after they happen. Still, native logs only record events after the query finishes. How a redshift audit log works in your setup A redshift audit log tracks three main types of database activity. Firs

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 redshift audit log by turning on logging in your cluster settings. You can send these logs to a storage bucket or a log stream. Most data teams enable this feature to track who enters the warehouse and what they run. When database roles are too broad, logs help you spot risky queries after they happen. Still, native logs only record events after the query finishes.

How a redshift audit log works in your setup

A redshift audit log tracks three main types of database activity. First, the connection log records every attempt to log in or log out. It captures the user name, the source IP address, and the login time. Second, the user log tracks any changes made to database users and roles. If an admin creates a role or changes a password, this log writes it down. Third, the user activity log records every SQL query before it runs on the database.

To turn this on, you pick a target for your log files. Many teams send log files to object storage for cheap, long-term storage. Other teams stream logs to a cloud monitoring service for faster search and alerts. Once you turn it on, the warehouse writes batch log files on a regular schedule. You must also set strict bucket rules so the database service can write the files. Your security team then reads these files to check user actions and meet audit rules.

Choosing between storage buckets and log streams

When you set up logging, you must pick where the warehouse sends the data. Sending files to object storage costs very little even when query volume grows huge. Security teams often query these archived files with external table tools during an audit. Still, object storage delivery happens in batches, which adds a delay before you see events. Streaming logs to a cloud log group costs more money per gigabyte. Yet it lets your team set up fast alerts when someone changes a database role.

You also need to turn on user activity logging at the cluster parameter level. By default, a new cluster might only record login events and user changes. Without the query log enabled, you will know a user logged in, but not what they read. Turning on full query logging increases storage use, so teams plan retention rules early.

Audit Log Integrity + Redshift Security: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What native audit logs solve and what they miss

Native database logs give you a solid record of past events for compliance checks. If a bad query drops a table, you can check the log to see what happened. You can also see when unknown IP addresses try to log in and fail.

Still, native logging leaves a large operational gap during daily work. First, engineers often log in through shared database roles or service accounts. When five people share one role, the log cannot show which person ran a query. Second, native logs write in batches after the database already processes the request. They do not block a destructive command in flight or require a human check first. Third, native logs do not mask sensitive data inside query results. If a table holds emails, phone numbers, or card numbers, the user sees the raw values. Sensitive values can even leak into the query log text itself if someone filters by a national ID.

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

What are the three types of logs in this data warehouse?

The warehouse offers connection logs, user logs, and user activity logs. Together, they track login attempts, user account changes, and every SQL statement run.

Do audit logs slow down database queries?

Writing audit logs happens in the background and does not block normal query runs. You only pay for the extra storage space or log stream volume you use.

Why can I not tell which engineer ran a specific SQL query?

If your team shares one database user, the native log only records that shared name. You must map individual human identities to each session to see who ran each query.

The query runs. The emails stay hidden.