How to Configure Amazon Q Redshift Read Only Access

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up amazon q redshift read only access by making a read-only database role. Then you map that role to the identity your AI assistant uses. Most engineering teams start by sharing a broad developer account with the AI tool. That shortcut lets the assistant change tables, drop schemas, or pull sensitive customer records. A strict read-only setup stops the AI from changing or deleting your production data. It gives your team a safer way to draft and run SQL queries. How amazon q redshift r

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 amazon q redshift read only access by making a read-only database role. Then you map that role to the identity your AI assistant uses. Most engineering teams start by sharing a broad developer account with the AI tool. That shortcut lets the assistant change tables, drop schemas, or pull sensitive customer records. A strict read-only setup stops the AI from changing or deleting your production data. It gives your team a safer way to draft and run SQL queries.

How amazon q redshift read only access works in practice

Setting up amazon q redshift read only access starts inside your data warehouse. An admin creates a dedicated database group or role for the AI assistant. You grant this role permission to view specific schemas and select from safe tables. You do not grant permissions to insert, update, delete, or alter any table structures. Next, you link this database role to your cloud identity and permission system. When an engineer asks the assistant a question, the tool uses those restricted rights. The warehouse checks the role before it runs any query from the assistant.

Many teams also use local command-line tools with their AI coding assistants. In these setups, the agent runs queries through the engineer's own terminal session. The terminal uses the local cloud profile and database keys stored on that laptop. If the engineer has write access, the AI agent inherits that same write access. To keep the session read-only, you must give the agent a separate profile. That profile should point only to the restricted database role you built.

What native roles solve and what they leave open

Native database roles are great at stopping accidental writes and schema changes. If the AI assistant writes a bad delete query, the warehouse blocks it right away. This protects your tables from getting wiped out by a bad prompt. It also separates the AI tool from your main admin accounts in the logs. You can see which queries came from the read-only role during an audit.

Still, native database roles only check who logs in at the start. They do not inspect what individual queries do while they run in flight. A read-only role can still select every row from a sensitive customer table by default. If a table holds emails, phone numbers, card numbers, or national IDs, the query returns them. The raw results flow straight back into the AI prompt context and model history. Also, a read-only role cannot stop an AI from running a massive join. One bad query can still lock up warehouse compute and slow down other teams. When ten engineers share one read-only role, the database log shows one shared name. You lose track of which person actually ran the query through their assistant. Teams need a way to check queries in flight and mask fields in results.

Auditor Read-Only Access + Customer Support Access to Production: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.

Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Can a read-only database role stop an AI assistant from pulling sensitive fields?

No, standard table permissions apply to the whole table or specific columns you block. If a role can read a column, it pulls all raw values inside it. Data masking is needed to rewrite emails, phone numbers, or card numbers in results.

Why do local AI coding agents bypass read-only cloud roles?

Local coding agents often run database commands right inside the user's own terminal. They use the engineer's local keys instead of a separate cloud role. If the engineer has admin rights, the agent gets those same admin rights too.

How can teams track which engineer ran a query through an AI tool?

Shared database roles group all activity under one single account name in your logs. To see the real user, you must tie each database session to single sign-on. Then every query log shows the exact person who prompted the AI assistant.

The query runs. The emails stay hidden.