The Simplest Way to Make AWS Backup and Cloud SQL Work Like They Should
Running aws backup and cloud sql together lets teams store database exports across two clouds. A scheduled runner exports Google database snapshots and moves them into Amazon storage. Native backup tools only work inside their own cloud provider by default. You need a dedicated worker host to bridge the two storage systems safely. This setup protects your company if one cloud account faces an outage. How aws backup and cloud sql move data and check roles The two tools do not talk to each oth
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.
Running aws backup and cloud sql together lets teams store database exports across two clouds. A scheduled runner exports Google database snapshots and moves them into Amazon storage.
Native backup tools only work inside their own cloud provider by default. You need a dedicated worker host to bridge the two storage systems safely. This setup protects your company if one cloud account faces an outage.
How aws backup and cloud sql move data and check roles
The two tools do not talk to each other out of the box. Instead, a middle worker pulls a dump from the Google database first. Then that worker writes the dump file to an Amazon storage target. After the file lands there, Amazon backup schedules take over the vault policies.
Database roles control what the export worker can read during this step. Cloud SQL for PostgreSQL is a managed service with strict role limits. Customers cannot create or use database accounts with true superuser attributes. Google reserves full superuser privileges for its own system account named cloudsqladmin.
Customers cannot delete or change these built-in system roles or users. Instead, you can assign the cloudsqlsuperuser role to your admin accounts. This role grants select admin powers like creating extensions and event triggers. It also lets a user create replication users, publications, and subscriptions.
The default postgres user belongs to this cloudsqlsuperuser group by default. Google creates this default postgres user without a password at first. You must set a password before you can log in with it. It holds rights to create roles, create databases, and log in. Still, it does not hold true superuser or replication attributes.
Common failure modes and how to scope roles and network paths
Many teams make the mistake of using the default postgres user for backups. Using a high-level account in an automated script creates a major security risk. If an attacker steals that script key, they can drop production tables. Shared service accounts also make it hard to see who ran a query.
AWS CloudTrail + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Broad cloud tokens create another big risk on the Amazon side. If the worker holds full storage rights, a bug could wipe old backups. Unlogged queries during a backup job also hide data leaks from security teams. You should fix this by creating a read-only database user for exports.
Grant this export user select rights only on the tables you need. If your job needs replication slots, create a dedicated replication user via cloudsqlsuperuser. Keep the default postgres account locked away for rare manual setup tasks. On the Amazon side, restrict the worker role to write-only storage actions.
Let Amazon backup vault rules handle file deletion and retention timelines instead. You must also lock down the network path between the two clouds. Never expose the database port to the open internet for backup jobs. Route the export traffic through a private tunnel or peered network link.
Check that all data transfers use TLS encryption while in transit. Mask sensitive fields like emails, phone numbers, card numbers, or national IDs when testing restores. Data masking rewrites matched fields in results so test teams stay safe. Rotate your worker keys often and log every export run to a central log.
Govern statements and responses across databases and APIs
Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev runs beside each supported service as an open-source proxy, a sidecar for your database or API.
First, hoop.dev guardrails block banned queries before they run. Then hoop.dev data masking rewrites matched sensitive values in responses in memory. The audit trail records every statement and verdict per resource. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.
Frequently asked questions
Can Amazon backup take direct snapshots of a Google database?
No, Amazon backup only controls resources and storage inside the Amazon cloud. You must export the Google database to an Amazon storage target first.
Should I use the default postgres user for backup scripts?
No, the default postgres user has rights to create roles and databases. Create a separate user with read-only permissions for your automated backup scripts.
Who holds true superuser rights in Cloud SQL for PostgreSQL?
A Google system user named cloudsqladmin holds the only true superuser privileges. Customers use the cloudsqlsuperuser role for admin tasks like creating replication users.
Related guides
In this post