- Newest
- Most votes
- Most comments
You're right, snapshots typically don't include roles and users by default. Here's how to handle roles and users in your Aurora PostgreSQL cluster migration:
Understanding Snapshot Behavior:
Snapshots capture the state of your database schema and data at a specific point in time. They don't include user-defined objects like roles, users, groups, or permissions.
Approaches to Transfer Roles and Users:
1/ Manual Scripting:
a) Source Account: Use the pg_dump utility (with appropriate permissions) to dump the roles and users along with their privileges into a script file. This script will contain CREATE ROLE, GRANT, etc. statements.
b) Target Account: Connect to the new cluster and execute the script generated from the source to recreate roles, users, and permissions.
2/ AWS Database Migration Service (DMS):
While not ideal for just roles and users, DMS can be used for a more comprehensive migration (if needed). It allows selective migration of specific schema objects, potentially including roles and users. However, it can be more complex to configure than manual scripting.
3/ AWS Resource Access Manager (RAM):
If migrating identities (users and roles) is a frequent need, consider using AWS RAM. It allows you to create IAM users or roles in one account and share them securely with other accounts for access to resources like Aurora clusters.
As of now For your current situation, manual scripting seems like the most straightforward approach. It's relatively simple and doesn't require setting up additional services like DMS.
Relevant content
- asked 2 years ago

This does not address the role passwords if aim is to maintain the same.