Your app is live. The container spins up on Google Cloud Run, and within seconds someone asks for database access. You sigh, open AWS RDS, fumble with credentials, and pray the connection string stays secret. There’s a cleaner way to do this that doesn’t involve Slack messages full of passwords.
AWS RDS handles relational data like a pro. Google Cloud Run runs containers with practically zero maintenance. Each is strong alone, but the real power comes when you connect them safely and automatically. AWS gives you managed databases. Cloud Run gives you ephemeral compute. Together they can form a frictionless, cross-cloud pipeline—if you set identity and networking right.
To make AWS RDS Cloud Run communication work, you start by aligning identities instead of just opening ports. Cloud Run services authenticate via IAM or OIDC tokens, which AWS can verify through an identity provider trust. That lets you avoid static credentials entirely. Instead of baking secrets into environment variables, you map Cloud Run’s service identity to an AWS role with narrowly scoped RDS permissions. The service connects only as needed, then disappears when the container ends.
Networking matters. Either establish a secure VPC peering between Google and AWS or use a private proxy that lives in one cloud and brokers encrypted connections. At scale, federated identity through OIDC beats managing API keys every day of the week.
Common pitfalls include forgetting to rotate trust tokens, over-permissioning roles, or skipping TLS validation. Keep policies minimal, automate credential rotation, and log every connection attempt through CloudWatch or Stackdriver. When an audit hits, you’ll be grateful for clean event trails.
Featured snippet version:
To connect AWS RDS to Cloud Run securely, use OIDC for identity federation, map Cloud Run’s service account to an AWS IAM role with RDS access, and route traffic through a private network or proxy. This removes static credentials and locks the database behind verified cloud identities.