Skip to main content
A database asset is an Athena-managed Postgres database in your workspace. Use it to store application data, browse tables, and run SQL. Branches give you separate copies of the database, including recovery copies from an earlier point.
Main branch timeline with a recovery branch created from an earlier point and a new branch from the current state, plus notes on restore in place and the privileged connection string.

A recovery branch copies an earlier point and leaves the main branch unchanged.

Create and open a database

Database creation must be available for your account and deployment. The asset picker hides Database for self-serve accounts and when database creation is disabled.
  1. In the Create new asset picker, choose Database.
  2. Enter a name in Database Name.
  3. If Database source appears, select Athena managed.
  4. Select Create Database, or Create database in the dialog with a source selector.
  5. The creation flow opens the new asset. Wait for provisioning before using it.
When you reopen the asset, these tabs provide the main data and recovery controls:

Create a branch

You need edit access to create or change branches. Reading the branch list and recoverable window requires view access. Branch actions become available after provisioning.
  1. Open Branches and select New branch.
  2. Enter a Name and, optionally, a Description.
  3. Under Branch from, choose HEAD (current), Point in time, or Explicit LSN.
  4. For an earlier point, enter the timestamp or Ancestor LSN. An LSN is a Postgres log sequence number that identifies a position in database history.
  5. Review Schema only, Protected, and Auto-expire as needed.
  6. Select Create branch.
Branching and point-in-time recovery are marked Experimental in the database view. The retained history window determines how far back you can recover.

Recover into a new branch

A recovery branch preserves an earlier state separately from the current branch. You need edit access to create it.
  1. Open Branches and find the source branch.
  2. Select its Point-in-time restore action.
  3. Review Recoverable window, including Earliest LSN, Latest LSN, and Retention.
  4. Under Restore by, choose Timestamp or LSN. Use LSN when timestamp restore is unavailable.
  5. Enter Restore to or Restore to LSN within the recoverable window.
  6. Optionally enter Recovery branch name (optional).
  7. Select Create recovery branch and check that the new branch appears in the list.
The separate Restore button at the top of Branches restores the main branch in place. It replaces the active timeline, keeps the outgoing main as a protected backup branch, and interrupts connections. Creating a recovery branch does not perform that replacement.
Previewing a branch as of an earlier time, as-of SQL reads, and Time travel are limited to Athena staff today.

Use the connection role safely

In Overview, use Copy URI to retrieve the current connection string. Retrieving it requires edit access, and Athena fetches the current credentials when you copy it.
The returned connection string uses a privileged database role. It can write data, change schema, and bypass row-level security. Asset view access does not grant permission to retrieve this credential.
Create a separate Postgres role for each application and connect the application with that role. Grant it only the tables and operations the application needs. Keep the privileged connection string for administration.