- AWS outbound identity federation: an IAM role requests a signed JWT from AWS STS with
GetWebIdentityToken. Works on EC2, ECS, Lambda and anywhere else the role has credentials. - Amazon EKS: a pod uses a projected Kubernetes service account token issued by the cluster.
AWS outbound identity federation
Enable outbound federation
Enable outbound identity federation once per AWS account. See AWS’s getting started guide.GetWebIdentityToken is not available on the global STS endpoint. Set a region so that the token request goes to a regional endpoint. The AWS CLI and the Node.js SDK read AWS_REGION. Boto3 reads AWS_DEFAULT_REGION and not AWS_REGION, so in Python set AWS_DEFAULT_REGION or pass sts_client=boto3.client("sts", region_name="us-west-2").
Get and inspect a token
sub is the ARN of the role. AWS-specific claims sit in a nested object under https://sts.amazonaws.com/, and which ones appear depends on the session.
Configure Reducto
In Studio, open Settings > Workload identity and create a provider with the AWS preset:
Add a mapping for the role:
To match a nested claim, add a transformation on the provider, then match the attribute. For example, add a transformation with
attribute = reducto.aws_environment and claim = ["https://sts.amazonaws.com/", "principal_tags", "environment"]. Then add the mapping condition reducto.aws_environment = production.
If the claim is missing from a token, the transformation fails and so does the exchange. Check a sample token first.
Call Reducto
The AWS token provider needsboto3 in Python or @aws-sdk/client-sts in Node.js. It uses the default AWS credential chain.
aws_web_identity_token_provider(audience=..., signing_algorithm=..., duration_seconds=...) in Python and awsWebIdentityTokenProvider({ audience, signingAlgorithm, durationSeconds }) in Node.js set the request. The audience defaults to https://platform.reducto.ai and the signing algorithm to RS256 (ES384 is the other option). In Node.js, install the optional peer dependency @aws-sdk/client-sts.
A 300-second AWS token gives an access token of at most 300 seconds. The SDK requests a new AWS token for each exchange, so the short lifetime only means more frequent exchanges.
Amazon EKS
EKS clusters publish a public OIDC issuer, so Reducto can use OIDC discovery. Get the cluster’s issuer:
Add a mapping with
sub = system:serviceaccount:payments:reducto-client. Then use k8s_service_account_token_provider("/var/run/secrets/reducto/token") (Python) or k8sServiceAccountTokenProvider("/var/run/secrets/reducto/token") (Node.js), as shown in the Kubernetes guide.
Do not use the IRSA token at AWS_WEB_IDENTITY_TOKEN_FILE for Reducto. Its audience is sts.amazonaws.com. Mount a separate projected token with the Reducto audience.
AWS best practices
- Use one IAM role or one Kubernetes service account per workload, and match its exact ARN or
sub. - Restrict
sts:IdentityTokenAudienceandsts:DurationSecondsin IAM so roles can mint tokens only for Reducto, with short lifetimes. - Add account or organization conditions through transformations when several accounts share an issuer setup.
- Read EKS projected tokens from the file on every exchange so rotated tokens are used.