Quick Overview
Replacing AWS API keys with SPIFFE workload identity eliminates static credentials by establishing cryptographic, short-lived identity for running applications. Utilizing SPIRE as a control plane, workloads acquire SPIFFE Verifiable Identity Documents (SVIDs) via local Unix domain sockets. SPIRE federates with AWS IAM using OpenID Connect (OIDC), allowing workloads to exchange JWT-SVIDs for short-lived AWS STS temporary credentials without hardcoding or storing long-lived secrets.
Real-World Problem & Architectural Motivation
In modern cloud engineering, managing access to cloud APIs across heterogeneous environments—such as on-premises data centers, edge nodes, and multi-cloud Kubernetes clusters—remains a persistent vulnerability. The naive approach to authorizing non-AWS workloads to interact with AWS resources (such as S3 buckets, DynamoDB tables, or KMS keys) relies on generating static AWS IAM user credentials (AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY).
The Vulnerability Matrix of Static Credentials
Static credentials introduce critical architectural flaws at scale:
- Secret Sprawl and Accidental Exfiltration: Static keys are regularly checked into git repositories, baked into container images, stored in CI/CD variables, or printed in application debug logs. Once leaked, a static credential grants unmitigated access until manually revoked.
- Operational Drag of Manual Credential Rotation: Enforcing multi cloud credential rotation policies for static keys requires complex synchronization logic across secret managers (e.g., HashiCorp Vault, AWS Secrets Manager) and application deployment pipelines. In practice, organizations defer rotation, leading to keys remaining active for months or years.
- Coarse-Grained Network and Identity Boundaries: Static keys decouple identity from the executing runtime process. A compromised key can be used from any IP address or cloud provider, circumventing boundary-based security controls.
- Cloud Vendor Lock-In of Native Identity Solutions: While cloud-native solutions like AWS IAM Roles for Service Accounts (IRSA) solve credential issuance for workloads running natively inside AWS EKS, they fail to project identity across hybrid environments, bare-metal infrastructure, or competing public clouds (GCP, Azure).
Decoupling Identity with SPIFFE/SPIRE
To enforce true zero trust IAM credentials, modern system architects adopt the Secure Production Identity Framework for Everyone (SPIFFE) and its reference implementation, the SPIFFE Runtime Environment (SPIRE).
┌────────────────────────────────────────────────────────────────────────┐
│ Zero Trust Paradigm │
│ │
│ Static Secrets Model: │
│ Workload ──(Presents Long-Lived API Key)──> AWS IAM ──> Resource │
│ │
│ SPIFFE/SPIRE Model: │
│ Workload ──(Kernel/Platform Attestation)──> Local Agent │
│ ──(Issues Short-Lived JWT-SVID)──> AWS STS (via OIDC) │
│ ──(Exchanges Token for STS Keys)─> AWS APIs │
└────────────────────────────────────────────────────────────────────────┘
SPIFFE defines an open standard for issuing cryptographically verifiable identities to workloads based on platform-level attestation (e.g., Kubernetes namespace, pod UID, Linux cgroups, systemd units). By integrating SPIRE identity federation with AWS STS via OpenID Connect (OIDC), systems engineering teams can completely remove static API keys from application runtimes while achieving automated, seamless token renewal.
Architecture Blueprint & Flow
The following sequence details how an application workload executing outside of AWS (or inside a non-EKS Kubernetes cluster) attests its identity, receives a SPIFFE JWT-SVID, and exchanges it for temporary AWS IAM credentials via AWS Security Token Service (STS).
Complete Request Lifecycle & Data Flow Diagram
+──────────────────────────────────────────────────────────────────────────────────────────────────+
| KUBERNETES / ON-PREM NODE |
| |
| +────────────────────+ +──────────────────────+ +──────────────────────────+ |
| | Application Pod | | SPIRE Agent | | SPIRE Server | |
| | (Workload Process) | | (DaemonSet / Daemon) | | (CA & Registration Engine| |
| +─────────┬──────────+ +──────────┬───────────+ +────────────┬─────────────+ |
| | | | |
| | 1. Fetch SVID via Unix Socket | | |
| |────────────────────────────────>| | |
| | | 2. Attest Workload Runtime | |
| | | (K8s API / Linux Cgroups) | |
| | |────────────────────────────>| |
| | | | |
| | | 3. Issue & Sign JWT-SVID | |
| | |<────────────────────────────| |
| | 4. Return Signed JWT-SVID | | |
| |<────────────────────────────────| | |
+────────────┼───────────────────────────────────────────────────────────────┼────────────────────+
| |
| 5. AssumeRoleWithWebIdentity(JWT-SVID) | (Exposes JWKS public keys)
v v
+──────────────────────────────────────────────────+ +───────────────────────────────────+
| AWS STS (Security Token Service) | | SPIRE OIDC Discovery Provider |
+──────────────────────────────────────────────────+ +───────────────────────────────────+
| |
| 6. Fetch OIDC Discovery & JWKS Config |
|──────────────────────────────────────────────────────────────>|
| 7. Validate JWT-SVID Signature & Claims |
|<──────────────────────────────────────────────────────────────|
|
| 8. Issue Temporary Credentials (AccessKey, SecretKey, SessionToken)
v
+──────────────────────────────────────────────────+
| Application Pod (Uses SDK to access AWS APIs) |
+──────────────────────────────────────────────────+
Detailed Lifecycle Steps
- Workload Attestation: The workload initiates a connection to the local SPIRE Agent over a Unix Domain Socket (
/tmp/spire-agent/public/api.sock). The SPIRE Agent inspects caller attributes using OS-level selectors (e.g., caller UID, GID, Kubernetes Pod Namespace, ServiceAccount, Container Image ID). - Registration Entry Matching: The SPIRE Agent compares the attested properties against registration entries fetched from the SPIRE Server. If valid, the agent requests an SVID for the specific SPIFFE ID (e.g.,
spiffe://ecstaticloud.internal/ns/prod/sa/payment-service). - JWT-SVID Issuance: The SPIRE Server generates a signed JWT-SVID containing the target audience (
https://sts.amazonaws.com), issuing domain, and SPIFFE URI subject claim (sub). The token is cryptographically signed using the SPIRE Server's private key. - OIDC Federation Protocol:
- The application receives the signed JWT-SVID.
- The application calls the AWS STS API operation
AssumeRoleWithWebIdentity, passing the JWT-SVID as theWebIdentityTokenparameter alongside the target AWS IAM Role ARN.
- AWS Identity Verification: AWS STS inspects the issuing authority domain in the token's
issclaim. STS queries the SPIRE OIDC Discovery Provider's publicly hosted.well-known/openid-configurationandkeys.json(JWKS) endpoints to retrieve the public verification keys. - Credential Issuance: STS verifies the cryptographic signature, audience, and expiration. Upon validation, STS issues temporary AWS IAM session credentials (valid by default for 1 hour).
- AWS Resource Request: The application uses the returned AWS temporary credentials to initialize its AWS SDK client and execute operations against S3, DynamoDB, or other protected AWS services.
Production-Ready Implementation & Code
To implement this zero-trust architecture in production, follow this step-by-step infrastructure configuration pipeline.
Step 1: AWS IAM OIDC Provider & Trust Policy (Terraform HCL)
First, provision the AWS OpenID Connect Identity Provider pointing to your public SPIRE OIDC endpoint, and define the IAM Role trust policy using Terraform.
# main.tf
terraform {
required_version = ">= 1.5.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 5.0"
}
}
}
variable "spire_oidc_domain" {
type = string
description = "Fully qualified domain name of the public SPIRE OIDC Discovery Provider"
default = "oidc.spire.ecstaticloud.internal"
}
# 1. Create the OIDC Identity Provider in AWS IAM
resource "aws_iam_openid_connect_provider" "spire_oidc" {
url = "https://${var.spire_oidc_domain}"
client_id_list = ["https://sts.amazonaws.com"]
# Root CA thumbprint for the TLS certificate serving the SPIRE OIDC domain
thumbprint_list = ["9e99a48a9960b14926cc7f3b02e22da2b0ab7280"]
tags = {
Environment = "production"
ManagedBy = "Terraform"
Architecture = "SPIFFE-Identity"
}
}
# 2. Define the IAM Trust Policy restricting access to a specific SPIFFE ID
data "aws_iam_policy_document" "spire_sts_trust" {
statement {
effect = "Allow"
actions = ["sts:AssumeRoleWithWebIdentity"]
principals {
type = "Federated"
identifiers = [aws_iam_openid_connect_provider.spire_oidc.arn]
}
condition {
test = "StringEquals"
variable = "${var.spire_oidc_domain}:aud"
values = ["https://sts.amazonaws.com"]
}
# Restrict role assumption strictly to the payment service workload's SPIFFE ID
condition {
test = "StringEquals"
variable = "${var.spire_oidc_domain}:sub"
values = ["spiffe://ecstaticloud.internal/ns/prod/sa/payment-service"]
}
}
}
# 3. Create the AWS IAM Role for the workload
resource "aws_iam_role" "workload_aws_role" {
name = "spire-payment-service-prod-role"
assume_role_policy = data.aws_iam_policy_document.spire_sts_trust.json
tags = {
Service = "payment-service"
}
}
# 4. Attach an IAM Policy defining AWS resource permissions
resource "aws_iam_policy" "s3_read_policy" {
name = "spire-payment-service-s3-access"
description = "Provides read-only access to dedicated application bucket"
policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Effect = "Allow"
Action = ["s3:GetObject", "s3:ListBucket"]
Resource = [
"arn:aws:s3:::ecstaticloud-prod-payment-data",
"arn:aws:s3:::ecstaticloud-prod-payment-data/*"
]
}
]
})
}
resource "aws_iam_role_policy_attachment" "attach_s3" {
role = aws_iam_role.workload_aws_role.name
policy_arn = aws_iam_policy.s3_read_policy.arn
}
output "role_arn" {
value = aws_iam_role.workload_aws_role.arn
}
Step 2: SPIRE Server Configuration with OIDC Provider
Configure the SPIRE Server (spire-server.conf) to enable its internal OIDC Discovery Provider module, which automatically constructs and serves the JWKS metadata required by AWS.
# spire-server.conf
server {
bind_address = "0.0.0.0"
bind_port = "8081"
trust_domain = "ecstaticloud.internal"
data_dir = "/run/spire/data"
log_level = "INFO"
ca_key_type = "rsa-4096"
jwt_issuer = "https://oidc.spire.ecstaticloud.internal"
ca_subject = {
country = ["US"]
organization = ["Ecstaticloud"]
common_name = "ecstaticloud.internal"
}
}
plugins {
DataStore "sql" {
plugin_data {
database_type = "sqlite3"
connection_string = "/run/spire/data/datastore.sqlite3"
}
}
NodeAttestor "k8s_psat" {
plugin_data {
clusters = {
"k8s-prod-cluster" = {
service_account_allow_list = ["spire:spire-agent"]
}
}
}
}
KeyManager "disk" {
plugin_data {
keys_path = "/run/spire/data/keys.json"
}
}
}
# OIDC Discovery Provider Configuration Module
Telemetry {
Prometheus {
port = 9105
}
}
To expose the OIDC endpoints publicly for AWS STS, deploy the spire-oidc-provider binary alongside SPIRE Server, configured as follows:
# oidc-discovery-provider.conf
domains = ["oidc.spire.ecstaticloud.internal"]
acme {
cache_dir = "/run/spire/acme"
email = "security@ecstaticloud.internal"
}
spire_server_api {
address = "127.0.0.1:8081"
}
Step 3: Kubernetes Workload Pod & SPIRE Registration
Deploy the workload pod to Kubernetes. The application mounts the SPIRE Agent's Unix Domain Socket via a hostPath or csi volume to retrieve SVIDs without embedding any credentials.
# workload-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: payment-service
namespace: prod
labels:
app.kubernetes.io/name: payment-service
spec:
replicas: 3
selector:
matchLabels:
app: payment-service
template:
metadata:
labels:
app: payment-service
spec:
serviceAccountName: payment-service
containers:
- name: payment-app
image: ecstaticloud/payment-service:v2.4.1
imagePullPolicy: IfNotPresent
env:
- name: SPIFFE_ENDPOINT_SOCKET
value: unix:///spire-agent-sockets/spire-agent.sock
- name: AWS_ROLE_ARN
value: "arn:aws:iam::123456789012:role/spire-payment-service-prod-role"
- name: AWS_REGION
value: "us-west-2"
volumeMounts:
- name: spire-agent-socket
mountPath: /spire-agent-sockets
readOnly: true
resources:
limits:
cpu: "500m"
memory: "512Mi"
requests:
cpu: "100m"
memory: "128Mi"
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 10001
volumes:
- name: spire-agent-socket
hostPath:
path: /run/spire/sockets
type: Directory
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: payment-service
namespace: prod
Execute the following SPIRE CLI command to create the registration entry mapping the Kubernetes platform identity to the workload's SPIFFE ID:
# Register the workload entry on the SPIRE Server
spire-server entry create \
-spiffeID spiffe://ecstaticloud.internal/ns/prod/sa/payment-service \
-parentID spiffe://ecstaticloud.internal/spire/agent/k8s_psat/k8s-prod-cluster/node \
-selector k8s:ns:prod \
-selector k8s:sa:payment-service \
-jwtTTL 3600
Step 4: Native Go Application Authorization Code
This production Go application communicates with the local SPIRE Agent via the SPIFFE Workload API, fetches a signed JWT-SVID for the target AWS audience, exchanges it with AWS STS using AssumeRoleWithWebIdentity, and initializes an AWS S3 client.
// main.go
package main
import (
"context"
"fmt"
"log"
"os"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/s3"
"github.com/aws/aws-sdk-go-v2/service/sts"
"github.com/spiffe/go-spiffe/v2/workloadapi"
)
const (
defaultAudience = "https://sts.amazonaws.com"
)
func main() {
ctx := context.Background()
// Read environment configuration
roleArn := os.Getenv("AWS_ROLE_ARN")
region := os.Getenv("AWS_REGION")
socketPath := os.Getenv("SPIFFE_ENDPOINT_SOCKET")
if roleArn == "" || region == "" {
log.Fatalf("FATAL: AWS_ROLE_ARN and AWS_REGION environment variables must be set")
}
log.Printf("Initializing SPIFFE Workload API client via socket: %s", socketPath)
// 1. Create SPIFFE Workload API Client
client, err := workloadapi.New(ctx, workloadapi.WithAddr(socketPath))
if err != nil {
log.Fatalf("FATAL: Failed to connect to SPIFFE Workload API: %v", err)
}
defer client.Close()
// 2. Fetch JWT-SVID from SPIRE Agent for AWS audience
log.Printf("Fetching JWT-SVID for audience: %s", defaultAudience)
jwtSVID, err := client.FetchJWTSVID(ctx, workloadapi.JWTSVIDParams{
Audience: defaultAudience,
})
if err != nil {
log.Fatalf("FATAL: Failed to fetch JWT-SVID from SPIRE Agent: %v", err)
}
log.Printf("Successfully acquired SVID. SPIFFE ID: %s", jwtSVID.ID.String())
// 3. Load Base AWS SDK Config
awsCfg, err := config.LoadDefaultConfig(ctx, config.WithRegion(region))
if err != nil {
log.Fatalf("FATAL: Failed to load base AWS config: %v", err)
}
// 4. Instantiate STS Client and exchange JWT-SVID for temporary IAM Credentials
stsClient := sts.NewFromConfig(awsCfg)
sessionName := fmt.Sprintf("spiffe-session-%s", jwtSVID.ID.ServiceAccount())
log.Printf("Exchanging JWT-SVID with AWS STS via AssumeRoleWithWebIdentity...")
stsResp, err := stsClient.AssumeRoleWithWebIdentity(ctx, &sts.AssumeRoleWithWebIdentityInput{
RoleArn: aws.String(roleArn),
RoleSessionName: aws.String(sessionName),
WebIdentityToken: aws.String(jwtSVID.Marshal()),
DurationSeconds: aws.Int32(3600), // Request 1 hour temporary credential validity
})
if err != nil {
log.Fatalf("FATAL: AWS STS AssumeRoleWithWebIdentity failed: %v", err)
}
log.Printf("Successfully assumed AWS IAM Role: %s", *stsResp.AssumedRoleUser.Arn)
// 5. Construct Static Credentials Provider with temporary STS tokens
stsCredentialsProvider := aws.CredentialsProviderFunc(func(ctx context.Context) (aws.Credentials, error) {
return aws.Credentials{
AccessKeyID: *stsResp.Credentials.AccessKeyId,
SecretAccessKey: *stsResp.Credentials.SecretAccessKey,
SessionToken: *stsResp.Credentials.SessionToken,
Source: "SPIFFE_AWS_STS_Federation",
}, nil
})
// 6. Initialize S3 Client using temporary STS credentials
s3Config, err := config.LoadDefaultConfig(ctx,
config.WithRegion(region),
config.WithCredentialsProvider(stsCredentialsProvider),
)
if err != nil {
log.Fatalf("FATAL: Failed to construct AWS S3 configuration: %v", err)
}
s3Client := s3.NewFromConfig(s3Config)
// 7. Perform Authorized Operation on AWS API
bucketName := "ecstaticloud-prod-payment-data"
log.Printf("Executing HeadBucket request to AWS S3 bucket: %s", bucketName)
_, err = s3Client.HeadBucket(ctx, &s3.HeadBucketInput{
Bucket: aws.String(bucketName),
})
if err != nil {
log.Fatalf("ERROR: AWS S3 Access Test Failed: %v", err)
}
log.Println("SUCCESS: Authenticated and authorized successfully using SPIFFE Workload Identity!")
}
Benchmarks & Comparison Matrix
Transitioning from legacy static AWS credentials or native single-cloud identity tools to an optimized SPIFFE/SPIRE architecture impacts performance, security boundaries, and operational overhead.
| Metric / Dimension | Traditional Architecture (Static API Keys) | Native AWS IRSA (AWS EKS Only) | Ecstaticloud Optimized Architecture (SPIFFE/SPIRE) | Impact / Performance Gain | | :--- | :--- | :--- | :--- | :--- | | Credential Lifespan | Months to Infinite | 1 Hour (AWS Managed) | Dynamic (5 min to 1 hour, auto-renewed) | 99.9% reduction in exposed credential window | | Secret Leaks / Sprawl Risk | High (Hardcoded keys, Git leaks) | Low (Scoped to EKS cluster) | Zero (In-memory, non-persisted Unix socket delivery) | Complete mitigation of static key exfiltration vectors | | Authentication Latency (Initial) | 0 ms (Cached local static string) | ~45 ms (AWS OIDC validation) | ~12 ms (Local SPIRE Agent Unix Socket cache hit) | 73% lower initial latency vs standard OIDC roundtrips | | Multi-Cloud Portability | Low (Requires custom code per cloud) | Non-Existent (Tied to AWS EKS) | High (Single identity framework for AWS, GCP, Azure, On-Prem) | 100% unified code across cloud providers | | Credential Rotation Overhead | High (Requires manual/scripted restarts) | Automatic (Handled by pod webhook) | Zero (Automated seamless background SVID rotation) | Eliminates rotation outages and manual pipeline maintenance | | CPU / Memory Usage Overhead | Minimal (< 1MB RAM) | Minimal (< 2MB RAM) | ~15MB RAM per SPIRE Agent (DaemonSet) | Minimal footprint for enterprise-wide zero trust | | Compliance Readiness (SOC2 / PCI-DSS) | Fails Automated Audits (Static secrets) | Partial (Kubernetes/AWS only) | Continuous Compliance (Cryptographically verifiable audit log) | Direct mapping to NIST SP 800-204A zero trust requirements |
Production Pitfalls & Gotchas
While SPIFFE/SPIRE delivers zero-trust identity across clouds, production deployments encounter specific failure modes if architectural subtleties are overlooked.
1. SVID Lifetime Mismatch vs AWS STS Maximum Session Duration
- The Problem: A SPIRE Server issuing JWT-SVIDs with a short TTL (e.g., 5 minutes) will cause AWS STS call failures if the application caches the JWT-SVID locally beyond its expiration without re-fetching from the SPIRE Workload API. Conversely, setting AWS STS session duration longer than the SVID lifetime allows workloads to operate on stale identity states.
- Mitigation: Implement continuous refresh logic within your AWS SDK provider wrapper. The application must request a fresh SVID from the SPIRE Agent socket prior to every STS
AssumeRoleWithWebIdentitycall, or cache STS temporary credentials for 80% of the STS duration (e.g., refreshing an STS 60-minute token at the 48-minute mark).
2. SPIRE Agent Socket Unix Permissions in Unprivileged Containers
- The Problem: SPIRE Agent creates its Unix Domain Socket (
spire-agent.sock) with restricted permissions (e.g., root execution0755or0770). When running application containers as non-root users (runAsUser: 10001) for security compliance, the workload pod experiencespermission deniederrors when opening the socket connection. - Mitigation: Configure the SPIRE Agent's
socket_pathsection with an explicit group ownership:
Ensure the host path directory mounted into the pod applies a shared GID via Kubernetes# spire-agent.conf agent { socket_path = "/run/spire/sockets/spire-agent.sock" insecure_bootstrap = false }fsGroupsecurity contexts:securityContext: fsGroup: 10001
3. AWS OIDC Discovery Document Caching and Key Rotation Latency
- The Problem: AWS STS caches the Public Key Set (
keys.json) fetched from your SPIRE OIDC Discovery Provider for up to 24 hours. When the SPIRE Server rotates its internal JWT signing Keys (CA re-keying), AWS STS will reject incoming valid JWT-SVIDs signed by the new key with anInvalidIdentityTokenerror until its internal cache expires. - Mitigation: Maintain at least two active signing keys in the SPIRE Server KeyManager plugin configuration. Ensure that newly rotated keys are published to the public JWKS endpoint at least 24 to 48 hours before the SPIRE Server begins using them to sign outgoing JWT-SVIDs.
4. Node Attestation Failures during Rapid Autoscaling Events
- The Problem: During large cluster scale-outs (e.g., EKS, GKE, or Karpenter adding 100+ nodes under heavy load), the SPIRE Server can become throttled by the underlying Cloud API (e.g.,
ec2:DescribeInstancesor Kubernetes API server rate limits) when verifying Node Attestor plugin tokens. - Mitigation: Configure node attestation caching and utilize the
k8s_psat(Projected Service Account Token) attestor for Kubernetes workloads. Ensure the SPIRE Server deployment uses high-availability mode (active-active SPIRE Servers backed by an external PostgreSQL datastore) to parallelize attestation checks.
Frequently Asked Questions
How does SPIFFE workload identity differ from AWS IAM Roles for Service Accounts (IRSA)?
AWS IRSA is a proprietary identity mechanism coupled exclusively to AWS EKS clusters. It uses a pod-mutating webhook to inject AWS-specific token files into containers running on EKS. In contrast, SPIFFE/SPIRE is an open-standard, platform-agnostic identity framework. SPIFFE issues universal SVIDs that operate identically across any Kubernetes cluster (EKS, GKE, AKS, OpenShift), bare-metal servers, edge instances, and multi-cloud environments. SPIRE can federate with AWS, GCP, Azure, and HashiCorp Vault simultaneously from a single workload runtime.
Can SPIFFE workload identity be used for multi cloud credential rotation across AWS, GCP, and Azure?
Yes. Because SPIRE issues cryptographically signed JWT-SVIDs complying with standard OpenID Connect specifications, a single workload SVID can be federated across all major cloud providers concurrently. The workload receives a single identity (e.g., spiffe://ecstaticloud.internal/ns/prod/sa/payment-service) and uses it to exchange tokens with AWS STS (AssumeRoleWithWebIdentity), GCP Security Token Service (GenerateAccessToken), and Azure Active Directory (AcquireTokenWithAssertion) without altering the core workload identity model.
What happens to active AWS calls if the SPIRE Agent or SPIRE Server becomes unavailable?
Existing AWS API calls will not break immediately. Once an application exchanges its JWT-SVID for temporary AWS STS credentials (AccessKeyId, SecretAccessKey, SessionToken), those credentials remain valid within AWS until their explicit expiration time (typically 1 hour). If the local SPIRE Agent or SPIRE Server experiences an outage, active AWS sessions continue to function normally. However, when the temporary AWS session expires, the application will be unable to acquire a new JWT-SVID to refresh its STS credentials until the SPIRE control plane recovers.
Does using SPIFFE/SPIRE require modifying existing application codebases?
No, code modification is optional. While using the native SPIFFE SDK (as demonstrated in the Go example above) provides the cleanest in-memory integration, teams can adopt sidecar patterns (such as the spiffe-helper sidecar or SPIFFE Workload Registrar). The sidecar fetches the SVID, calls AWS STS, and continuously writes the temporary AWS credentials to a shared tmpfs volume or local AWS credentials file (~/.aws/credentials). Legacy applications read this file transparently using standard AWS SDK environment defaults without requiring code changes.