The AWS CLI froze, and the team stared at the screen. The issue wasn’t a network hiccup. It was permissions. Azure AD stood in the way, and integration with AWS access control wasn’t playing nice.
Connecting AWS CLI with Azure Active Directory Access Control is a problem that shows up in every serious multi-cloud setup. AWS Identity and Access Management (IAM) and Azure AD operate in their own worlds. Getting them to trust each other is what unlocks a seamless workflow for authentication, authorization, and identity federation.
The goal: run AWS CLI commands with identities managed in Azure AD, without juggling temporary tokens or manual credential swaps. The method: combine AWS IAM roles with Azure AD’s OpenID Connect (OIDC) or SAML-based federation. These connections let Azure AD issue the identity, while AWS grants the right permissions automatically at runtime.
The flow is simple once it’s in place:
- An Azure AD user logs in with their corporate account.
- Azure AD issues a security token using OIDC or SAML.
- AWS STS assumes a pre-mapped IAM role based on the Azure-issued identity.
- AWS CLI commands run under that IAM role’s permissions without needing static keys.
Setting this up starts with creating an IAM role in AWS, configured for federated access. This role trusts the Azure AD identity provider. Mappings between Azure AD groups and AWS IAM roles ensure different teams receive only what they need.