How to Configure Aurora Postgres Encryption at REST

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up aurora postgres encryption at rest when you create your database cluster. This setting locks your stored data on disk using a cloud key service. Most teams turn this on early to pass audits and protect backup files. Yet disk encryption only protects files if someone steals a physical drive. Once an engineer or app logs in, the database reads and sends clear data. If your database roles are too broad, anyone with a login can read everything. How aurora postgres encryption at rest wor

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 aurora postgres encryption at rest when you create your database cluster. This setting locks your stored data on disk using a cloud key service. Most teams turn this on early to pass audits and protect backup files. Yet disk encryption only protects files if someone steals a physical drive. Once an engineer or app logs in, the database reads and sends clear data. If your database roles are too broad, anyone with a login can read everything.

How aurora postgres encryption at rest works

Storage encryption works below the database engine layer. When the database writes a page to disk, the storage system encrypts the bytes. It also encrypts automated backups, read replicas, and snapshots using the same key setup. You can pick a default cloud key or manage your own customer key. If you have an unencrypted cluster, you cannot just flip a switch on it. You must take a snapshot, encrypt that copy, and restore it as a new cluster.

When a query runs, the storage layer decrypts the blocks into memory. The database engine processes the plain text and sends results back to the user. Because of this, storage keys do not restrict what a logged-in user can read. You must pair storage keys with strict database roles inside Postgres itself.

Inside the database, admins use group roles to manage permissions for many users. Users get membership in a group role instead of direct grants on every table. You can grant the read privilege on a whole table or only on specific columns. You also need to check the special role named PUBLIC. By default, PUBLIC gives every role permission to log in and make temporary tables. It also lets users run functions and procedures unless the owner revokes those defaults. In Postgres 15 and newer, users cannot create new objects in the public schema. On older databases, an admin must revoke that create right from PUBLIC by hand.

What storage encryption solves and what it misses

Disk encryption solves a specific problem for security teams. It protects data at the storage layer and satisfies basic audit rules for stored files. If an old disk is lost or a backup leaks without keys, the data stays safe.

Encryption at Rest + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Still, storage encryption and native roles leave a big gap during daily work. Disk keys decrypt data for any valid session, and roles only check who logs in. Neither tool inspects the actual statements an engineer runs during a live fixing session. Granting column rights across hundreds of tables takes a lot of time to maintain. And once a user has read rights on a table, they can pull every row by default. They can also export entire tables using built-in copy commands. Native storage keys cannot mask emails, phone numbers, or card numbers in query results. They also cannot ask a manager to approve a risky update statement before it runs.

Run guardrails and masking on the Postgres connection

Role grants and firewall rules are needed setup. Setup alone cannot check single SQL statements or mask sensitive rows in a response. By design, hoop.dev sits inline in the Postgres protocol beside Postgres, RDS, or Aurora as a sidecar for your Postgres. On every production query from an engineer or AI agent, hoop.dev decides whether to pass, mask, block, or hold it for approval.

First, hoop.dev guardrails refuse disallowed drops or deletes before they run, and risky statements can pause for human review. Next, hoop.dev data masking rewrites sensitive fields in returned rows in memory. Furthermore, hoop.dev holds SOC 2 Type II and logs every statement and verdict per resource. Check out the project on GitHub.

Frequently asked questions

Does encryption at rest hide sensitive columns from database users?

No, the storage layer decrypts data by default when an authorized user runs a query. To limit what users read, you must use column grants or rewrite fields in flight.

Can I turn on encryption at rest on an existing unencrypted cluster?

You cannot enable it directly on a running unencrypted cluster. Instead, you take a snapshot of the cluster and restore it with encryption enabled.

How do I stop new users from getting unwanted database rights?

Check the privileges granted to the PUBLIC role in your database. Revoke default login or function execution rights from PUBLIC and use strict group roles instead.

The query runs. The emails stay hidden.