The Simplest Way to Make Cloud Run and ECS Work Like They Should

Published
Length
3 min read

Luis Felipe Dias

All posts

Running Cloud Run and ECS together lets teams split container apps across Google and Amazon clouds. These two tools share work by passing identity tokens and sending traffic over private links. Many teams use Google for fast web apps or data tasks. At the same time, they run core backend tasks on Amazon. Making both platforms talk to each other takes clear identity rules and clean network paths. Without a shared plan, teams waste hours fixing broken logins and slow network calls. How Cloud Ru

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 Cloud Run and ECS together lets teams split container apps across Google and Amazon clouds. These two tools share work by passing identity tokens and sending traffic over private links.

Many teams use Google for fast web apps or data tasks. At the same time, they run core backend tasks on Amazon. Making both platforms talk to each other takes clear identity rules and clean network paths. Without a shared plan, teams waste hours fixing broken logins and slow network calls.

How Cloud Run and ECS share logins and data

When a container on one cloud calls the other, it must prove who it is. The old way was to copy static cloud keys into app settings. Static keys are risky because they do not expire and can leak in logs.

A better way uses workload identity federation between the two cloud providers. Each service gets a local service account or task role from its home cloud. When the first app starts, it asks its local cloud for a short token. It sends that token to the second cloud to trade it for a temporary role. No human ever sees or stores a permanent secret key.

Data flows between the two platforms over public HTTPS or private network tunnels. Public HTTPS with mutual TLS works well for low traffic and simple web calls. For heavy data loads, teams set up a private VPN or direct fiber link. Private routing keeps traffic off the open internet and lowers data transfer fees.

Common mistakes and how to scope roles

The biggest mistake in multi-cloud setups is sharing one service account across many apps. If five different apps use the same cloud role, one bug puts all five at risk. Shared roles also make audit logs useless during an incident. You can see that a role read a file, but not which app did it.

Broad permissions cause similar trouble for growing engineering teams. Developers often give a container full admin rights just to make a test work. Those broad rights stay in place when the app goes to production. Attackers who break into one container can then reach databases and queues across both clouds.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Unlogged network calls and database queries create blind spots for security teams. Standard cloud logs show when a role logs in, not what data the app reads. If a service pulls customer emails or card numbers, you need clear query logs. Masking rules can also rewrite emails, phone numbers, or national IDs in query results.

To fix this, give every single container service its own unique identity role. Scope each role so it can only call the exact service it needs. Lock down network firewall rules to allow traffic only from known subnet ranges. Check your role trust rules every month and drop unused permissions right away.

Keeping multi-cloud container ops simple

Managing two container platforms means your team writes two sets of deployment rules. Keep the container images identical so you can run them on either cloud. Store your container build files in one central registry that both clouds can read.

Standardize how your apps read settings and write log lines across both platforms. Use the same JSON log format on Google and Amazon so alerts match up. When an error happens, engineers can trace the request ID from one cloud to the next. Simple rules let your team focus on code instead of cloud plumbing.

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

How do containers on Google and Amazon log in without static keys?

Use workload identity trust between Google service accounts and Amazon task roles. Your app trades its local cloud token for a short temporary credential by default.

Should we use public endpoints or a private VPN between clouds?

Start with public HTTPS endpoints protected by strict cloud identity checks for low traffic. Move to a private VPN or direct network link when traffic volume grows high.

How do we stop developers from using broad admin roles across clouds?

Create one dedicated role per app and limit its rules to specific resources. Review cloud trust policies in code reviews before any new service goes live.

The query runs. The emails stay hidden.