Plenty of organizations run almost everything on Azure and use AWS for one thing, such as Amazon Bedrock. The identity team audits Entra ID every quarter, but AWS IAM is a second system that one or two people understand. A server that needs AWS access ends up with an IAM access key that nobody on the Azure side can see.
You can keep Entra ID in charge. AWS IAM can trust your Entra tenant as an OpenID Connect (OIDC) identity provider. A workload swaps an Entra access token with AWS STS for temporary credentials, and an app role assignment in Entra ID decides who may. See How to access AWS resources from Microsoft Entra ID tenants using AWS STS.
api://northwind-aws-bedrock-prod and an app rolehttps://sts.windows.net/<tenant-id>/, with the Application ID URI as its audienceThe workload asks Entra ID for a token for api://northwind-aws-bedrock-prod, then calls AssumeRoleWithWebIdentity:
aws sts assume-role-with-web-identity \--role-arn arn:aws:iam::111122223333:role/bedrock-invoke \--role-session-name "$(hostname)" \--web-identity-token "$ENTRA_TOKEN"
The AWS SDKs cannot get an Entra token, so wrap both steps in a script and point a credential_process profile at it.
This trust policy checks the audience and nothing else:
{"Version": "2012-10-17","Statement": [{"Effect": "Allow","Principal": {"Federated": "arn:aws:iam::111122223333:oidc-provider/sts.windows.net/<tenant-id>/"},"Action": "sts:AssumeRoleWithWebIdentity","Condition": {"StringEquals": {"sts.windows.net/<tenant-id>/:aud": "api://northwind-aws-bedrock-prod"}}}]}
AWS only checks that the token came from your tenant for this app. Entra ID decides who gets it: assign the app role to grant access, remove the assignment to take it away. Day to day, nobody touches AWS IAM.
Warning: This only works with Assignment required set to Yes. Without it, Entra ID gives an app-only token for your app to any app in the tenant that asks, with no roles claim. AWS cannot check the roles claim, so every service principal in your tenant could assume the role. See Controlling tokens without the roles claim.
Figure: Assignment required is what makes Entra ID the gatekeeper
Also:
aud key to the azp claim, so the audience check behaves differentlysub with the object ID of each allowed identity. This catches a mistaken assignment in Entra ID, but every new server then needs an AWS change tooUse a managed identity so no secret is stored on the machine:
All AWS access now depends on Entra ID:
AssumeRoleWithWebIdentity call in CloudTrailRemoving an assignment does not cut access at once. Entra ID caches managed identity tokens for about 24 hours, and AWS sessions already issued stay valid until they expire. Keep the role's maximum session duration at 1 hour, and in an emergency follow Do you know how to roll AWS credentials if they are exposed?
| Entra ID federation | IAM Roles Anywhere | |
|---|---|---|
| Best when | You mostly use Azure and already manage identities in Entra ID | You mostly use AWS, or the servers cannot get an Entra identity |
| Secret on the server | None with a managed identity | A certificate private key |
| AWS tooling | None, you write a small token script | aws_signing_helper |
This is for workloads, not people. People sign in through IAM Identity Center: Do you sign in to AWS with SSO instead of IAM users?