The Simplest Way to Make AWS Secrets Manager and Google Pub/Sub Work Like They Should
Teams use aws secrets manager and google pub/sub to send messages across clouds safely. The secret store holds the keys that let apps write or read queue events. Multi-cloud setups are common today. You might run core apps on Amazon Web Services. At the same time, your data team might process event streams on Google Cloud. To link these two worlds, your apps need a safe way to log in. Hardcoding keys into source code creates a huge risk. Storing keys in a secret store solves part of this proble
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.
Teams use aws secrets manager and google pub/sub to send messages across clouds safely. The secret store holds the keys that let apps write or read queue events.
Multi-cloud setups are common today. You might run core apps on Amazon Web Services. At the same time, your data team might process event streams on Google Cloud. To link these two worlds, your apps need a safe way to log in. Hardcoding keys into source code creates a huge risk. Storing keys in a secret store solves part of this problem. It keeps credentials out of code repos and build logs.
How aws secrets manager and google pub/sub share keys and data
The workflow between aws secrets manager and google pub/sub follows a clear path. First, an admin creates a service account in Google Cloud. That account gets a specific role to publish or read messages. Next, the admin exports a key or sets up workload identity rules. If the team uses a key, they save it inside the Amazon secret store.
When a worker app starts up on Amazon, it asks for the secret. Amazon checks the worker role to see if it can read that secret. If the check passes, the app gets the Google key in memory. The app then uses that key to log in to the Google message bus. Now the app can send event payloads or pull work items from the subscription. Data flows over encrypted web links between the two cloud providers. The secret store also tracks when the app reads the key. This gives the security team a basic log of key usage.
Common failure modes and how to scope roles across clouds
Many teams make mistakes when they set up cross-cloud access. The biggest risk is using a shared service account for every app. If ten apps use one Google key, you lose track of who did what. If that single key leaks, an attacker can reach every topic at once. Another common problem is giving the service account broad admin rights. An app that only sends events should never have the right to delete topics.
Long-lived static keys also cause trouble over time. Teams often forget to rotate keys stored in another cloud. If a developer copies a key to test locally, it sits on their laptop forever. Unlogged message queries and payload reads make audits very hard. You can see that an app fetched a secret at boot time. Still, you cannot see which human or task ran a specific command later.
AWS Secrets Manager + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix these issues, scope every role down to the bare minimum. Create one Google service account for each Amazon app role. Grant publish rights only to the exact topic that app needs. Grant read rights only to the exact subscription a worker processes. Set up automatic rotation schedules so keys expire on a regular basis. Whenever possible, use identity federation instead of static service account keys. Federation lets Amazon roles trade short tokens with Google Cloud directly. Also, keep your network paths tight and monitor all cross-cloud traffic logs. Check your message payloads to ensure sensitive fields like emails or card numbers stay protected.
Managing engineer access to cloud resources
Apps are not the only ones that touch your message queues and secrets. Engineers often need to check dead-letter queues or inspect a broken secret value. Giving humans direct console roles or local keys brings back the same security risks. Teams need a clear way to govern how staff interact with cloud services during incidents. Every manual check or secret read should tie back to a single person. Masking rules can also rewrite sensitive fields like phone numbers or national IDs in results.
Check database and API queries on the wire
Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.
Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.
Frequently asked questions
Do I have to store static Google keys in Amazon?
No, you can use workload identity federation to avoid static keys. Still, many legacy apps use the secret store for third-party API tokens and keys.
How often should we rotate cross-cloud service keys?
You should rotate static service keys at least every thirty to ninety days. Automated lambdas or rotation jobs can update both clouds without human help.
How can we limit what a compromised worker can read?
Bind each worker role to a single secret and a single message subscription. Never let one worker role read all secrets in your account.
Related guides
In this post