How Can You Call GCP From AWS Without Using Static Keys?

How Can You Call GCP From AWS Without Using Static Keys?

The persistent reliance on long-lived access keys within modern professional software environments represents a significant systemic failure that contemporary security engineering teams must urgently address to maintain operational integrity. For years, the industry standard for multi-cloud communication involved generating service account keys in Google Cloud Platform (GCP), downloading a JSON file, and then manually injecting that file into an Amazon Web Services (AWS) environment. This practice essentially turns a sophisticated cloud architecture into a fragile house of cards, where a single mishandled configuration or a developer’s accidental repository push can expose the entire infrastructure to malicious actors.

As organizations scale their cross-cloud footprint in 2026, the complexity of managing these static secrets grows exponentially. Each key represents a permanent back door that requires manual rotation, meticulous auditing, and complex lifecycle management. When a workload in Amazon EKS needs to interact with a Google Cloud Storage bucket, the traditional method creates a perpetual security debt. The goal is no longer just to facilitate connectivity but to do so using a protocol that ensures identity is ephemeral and automatically verified. Transitioning to a keyless architecture is not merely a preference; it has become a prerequisite for maintaining a resilient and compliant posture in an environment where speed and security must coexist.

The Hidden Cost of Hardcoded Cloud Credentials

Static cloud credentials often behave like a physical key left under a doormat, providing a false sense of security while remaining vulnerable to anyone who knows where to look. When an engineering team hardcodes a GCP service account key into an AWS environment, they are effectively creating a high-value target for attackers who specialize in credential harvesting. This approach lacks the dynamism required for modern defense, as these keys do not expire on their own and often remain active long after their original purpose has been fulfilled. The administrative burden of rotating these secrets manually often leads to “rotation fatigue,” where keys are left untouched for months or even years, further increasing the window of opportunity for a potential breach.

Beyond the immediate security risks, the financial and operational costs of maintaining static keys are substantial. Auditing becomes a nightmare when multiple services share a single key, making it nearly impossible to pinpoint which specific workload performed an action during a forensic investigation. Furthermore, the manual overhead associated with securing these JSON files—using external vaulting solutions or complex encryption layers—adds unnecessary friction to the development lifecycle. This friction discourages engineers from following best practices, leading to shortcuts that ultimately compromise the organization’s overall security posture. By removing the need for static keys, teams can eliminate these hidden costs and refocus their energy on building core business value.

The Shift Toward Zero-Trust Multi-Cloud Connectivity

The industry has decisively moved toward a zero-trust model where identity is never assumed but must be continuously proven through cryptographic means. Workload identity federation serves as the cornerstone of this shift, allowing systems to establish trust boundaries without the exchange of shared secrets. In a multi-cloud context, this means that an AWS service can prove its identity to Google Cloud by leveraging its own native identity provider. Instead of a permanent key, the workload uses a short-lived token that is generated on the fly and expires shortly after its intended use. This drastically reduces the blast radius of any potential compromise, as a stolen token is essentially useless by the time an attacker can attempt to exploit it.

This zero-trust philosophy fundamentally changes how trust is established between disparate cloud providers. Rather than relying on what a service “knows” (a secret key), the system relies on what a service “is” (its cryptographically signed identity). When an Amazon EKS pod attempts to access a resource in GCP, the interaction is governed by a set of predefined rules that map the AWS identity directly to a corresponding GCP identity. This mapping ensures that the trust is granular and specific to the task at hand. By adopting this model, organizations can achieve a higher level of security while simultaneously simplifying their infrastructure, as the cloud providers handle the heavy lifting of identity verification and token lifecycle management.

Mechanics of the AWS-to-GCP Token Exchange

The technical process of connecting these two environments without static keys involves a sophisticated sequence often referred to as the “token dance.” This process begins within the AWS environment, where the application workload retrieves its native AWS identity. The application then generates a SigV4-signed request, which acts as a verifiable proof of its Amazon identity. This request is not a secret itself but a cryptographic signature that demonstrates the caller holds a valid AWS IAM role. This signed request is then sent to Google’s Security Token Service (STS) with a request to exchange it for a temporary Google access token.

Once Google receives the request, it does not simply take the caller’s word for it. Instead, Google Cloud “replays” that signed request against the AWS Security Token Service to verify its authenticity. AWS validates the signature and confirms the identity of the caller, returning the Amazon Resource Name (ARN) to Google. At this point, Google Cloud checks the ARN against its own Workload Identity Pool configuration. If the AWS identity matches the criteria established by the administrator, Google issues a short-lived OAuth 2.0 access token. This token, which typically expires within one hour, is then used by the AWS workload to call GCP APIs, such as writing to a storage bucket or querying a database. The entire cycle occurs in seconds and leaves no permanent secret footprint.

Architectural Choices: Direct Pool Access versus Impersonation

When designing this federated bridge, engineers must decide between two primary mapping strategies, each with its own trade-offs. Direct Pool Access is generally considered the modern standard for new deployments because it allows permissions to be granted directly to the federated identity. In this model, the Google Cloud IAM roles are bound to the pool principal itself, meaning there is no need for a middle-man service account. This reduces the number of moving parts in the system and simplifies the auditing process, as the logs will show the federated AWS identity as the primary actor. It also minimizes the potential for misconfiguration, as there are fewer IAM bindings to manage across the project.

Service Account Impersonation, however, remains a valid alternative for specific legacy scenarios or organizational requirements. In this second approach, the federated AWS identity is granted the permission to “act as” or impersonate a specific GCP service account. The exchange involves an additional step: after receiving the initial federation token, the system makes a second call to generate an access token for the service account. While this adds complexity, it is sometimes necessary when a specific Google API does not yet support direct principal sets or when an organization has standardized all permissions around existing service accounts. Most experts agree that unless there is a specific technical limitation, direct pool access is the safer and more streamlined choice for a keyless workflow.

Leveraging Multi-Cloud Abstractions for Security

Manually managing the intricacies of SigV4 signing and token exchange across different providers can lead to brittle and complex application code. This is where open-source abstractions like MultiCloudJ become essential for maintaining clean architecture. By utilizing a library that wraps the provider-specific logic into a portable client, developers can interact with cloud resources without needing to understand the underlying “token dance.” This abstraction ensures that the security logic is handled by a well-tested framework rather than being reinvented within every microservice. It allows teams to swap cloud providers or update security protocols with minimal impact on the business logic, providing true cloud portability.

Using such frameworks also helps prevent “provider sprawl,” where the application code becomes littered with specific SDK calls for AWS and GCP. A unified client can handle the credentials overrider logic internally, automatically refreshing tokens and managing the exchange process in the background. This approach not only enhances security by ensuring that best practices are consistently applied but also improves developer productivity. When the complexity of cross-cloud authentication is hidden behind a clean interface, engineers can focus on delivering features rather than debugging infrastructure plumbing. This separation of concerns is vital for maintaining a fast-moving engineering organization that does not want to compromise on security.

Implementing a Keyless Workflow in Four Steps

Establishing this connection begins with the creation of a Workload Identity Pool in the Google Cloud console or via a command-line interface. This pool serves as the logical container for all external identities that are allowed to access GCP resources. Once the pool is established, an AWS provider must be configured within it. This configuration defines the specific AWS account that is trusted and sets up attribute mappings. These mappings are critical because they translate the complex AWS ARN into a stable, readable attribute that Google Cloud IAM can understand and use for permission checks.

The third step involves granting the necessary permissions directly to the identity principal within the pool. For example, if the AWS workload needs to manage files, the Storage Object Admin role is assigned to the specific federated attribute mapped earlier. This ensures that only the authorized AWS role can perform the action. Finally, the application code is integrated with a library like MultiCloudJ to automate the retrieval of temporary tokens. This implementation ensures that the application never touches a long-lived JSON key. The entire workflow resulted in a system that was self-healing and naturally resistant to credential-based attacks, as every access request was backed by a real-time cryptographic verification of identity.

The industry recognized that the transition to a keyless architecture was the only viable path forward for maintaining a secure multi-cloud presence. Engineers adopted workload identity federation to eliminate the risks associated with static secrets and simplified their systems by removing the overhead of key rotation. These steps provided a blueprint for organizations that sought to bridge the gap between AWS and GCP without sacrificing security. By implementing these automated identity exchanges, teams ensured that every cross-cloud call was verified in real-time, effectively neutralizing the threat of leaked credentials. Moving forward, the focus shifted toward expanding these zero-trust principles to every facet of the distributed infrastructure, ensuring a more resilient digital future.

Subscribe to our weekly news digest.

Join now and become a part of our fast-growing community.

Invalid Email Address
Thanks for Subscribing!
We'll be sending you our best soon!
Something went wrong, please try again later