AWS Sign-In Now Allows 90-Day Sessions for aws login and MCP Clients
On 23 November 2026 AWS announced a configurable sign-in duration for AWS Sign-In. Administrators can now let an IAM role or IAM user stay signed in through OAuth for up to 90 days. It covers the AWS CLI's aws login, the AWS MCP Server and other OAuth-enabled applications. Console sessions are not affected.
AWS pitches it as a safer alternative to static access keys for developers and AI agents that run for days. That is fair as far as it goes. It also means a single browser sign-in can now keep minting credentials for three months, so it needs a decision from whoever owns IAM.
What happened
The session management guide describes a sign-in session as the relationship between a principal and AWS Sign-In. Clients hold short-lived OAuth access tokens and renew them with refresh tokens until the session ends. The new setting controls how long that session may last.
| Item | Value | Source |
|---|---|---|
| Range | 1 hour (3,600 s) to 90 days (7,776,000 s) | IAM API model, maxSigninSessionDurationType |
| Set on a role | UpdateRole / CreateRole with MaxSigninSessionDuration; clear with ResetMaxSigninSessionDuration |
IAM role settings |
| Set on a user | On the login profile: CreateLoginProfile / UpdateLoginProfile |
IAM API model |
| Default when unset | "Existing behaviour"; the Sign-In guide says 12 hours | Sign-In guide, IAM docs |
| Clients covered | aws login, AWS MCP Server, other OAuth clients |
Announcement |
| Not covered | Console sessions, plain STS AssumeRole sessions |
Sign-In guide |
| New APIs | signin list-sessions, get-session, batch-revoke-sessions |
Sign-In guide |
| Org-wide off switch | SCP condition key signin:PutSignInDurationBlock |
Condition keys |
Two details are easy to miss. First, for these OAuth flows the sign-in duration "takes precedence over" the role's MaxSessionDuration, which now only limits each individual STS credential. Second, revocation is not instant. The guide says a revoke "can take up to one hour" to take effect, and access tokens already issued stay valid until they expire.
What changes for engineers
The control you relied on has moved. Many teams cap role sessions with MaxSessionDuration at one hour and assume that bounds a stolen laptop's access. For aws login and MCP clients it no longer does, if someone sets a sign-in duration on the role. The cap still applies to each credential, but the client renews it silently for as long as the sign-in session allows.
Refresh tokens become the asset to protect. A 90-day session is only as safe as the refresh token on disk. The guide recommends the AWS CLI credential daemon, which keeps refresh tokens encrypted and hands the CLI and SDKs only short-lived credentials. I could not read that page's content, because it renders client-side, so I have not checked how it works on each platform.
Agents are the intended use, and that cuts both ways. A coding agent or MCP client that works for days without a sign-in prompt is convenient. It is also exactly the long-lived, unattended credential that showed up in many of the incidents in my AI agent security incident log. If you give an agent's role a long sign-in duration, scope that role tightly and do not reuse it for humans.
You can see it in CloudTrail. Each token issue or renewal is a CreateOAuth2Token event from signin.amazonaws.com. The guide shows additionalEventData.SignInSessionExtended set to "true" and SignInDuration in seconds when a configured duration is in use, plus the signInSessionArn. That is enough for a detection rule.
What I ran
AWS commands are off limits on this machine, so I checked the public API definitions instead. In the botocore models on GitHub, MaxSigninSessionDuration first appears in the IAM model in the 18 November update (botocore 1.44.6). It is defined as an integer from 3,600 to 7,776,000, and it is on CreateRole, UpdateRole, CreateLoginProfile and UpdateLoginProfile, with matching Reset... flags on the update calls. It is not on CreateUser, which is why the user setting lives on the login profile. The Sign-In model lists ListSessions, GetSession and BatchRevokeSessions. Older SDKs will not know these fields, so update the CLI or SDK before you script against them.
These are the commands I would run in my own accounts, taken from the docs and the API model:
# Which roles already have a sign-in duration set? (field is omitted when unset)
aws iam list-roles --query 'Roles[].RoleName' --output text | tr '\t' '\n' | while read r; do
aws iam get-role --role-name "$r" --query "Role.[RoleName,MaxSigninSessionDuration]" --output text
done | awk '$2 != "None"'
# Give one agent role 7 days instead of 90
aws iam update-role --role-name ci-agent-role --max-signin-session-duration 604800
# See and kill sessions for that role
aws signin list-sessions --principal-arn arn:aws:iam::111122223333:role/ci-agent-role
aws signin batch-revoke-sessions --session-arns <session-arn>
And a CloudTrail Lake query to find extended sessions as they are used:
SELECT eventTime, userIdentity.arn, element_at(additionalEventData, 'SignInDuration') AS duration_s
FROM <event-data-store-id>
WHERE eventSource = 'signin.amazonaws.com' AND eventName = 'CreateOAuth2Token'
AND element_at(additionalEventData, 'SignInSessionExtended') = 'true'
I have not run either against a live account, and the get-role output field name is taken from the API model rather than from real output.
What to do this week
- Decide your policy before someone sets it by hand. If you do not want long sessions yet, deploy the SCP that denies
signin:CreateOAuth2Tokenwhensignin:PutSignInDurationBlockis true, from the condition keys page. - If you allow them, set durations per role, starting at days, not 90 days, and only on roles used by
aws loginor MCP clients. - Add a detection for
CreateOAuth2Tokenevents withSignInSessionExtended = "true"and alert on roles you did not approve. - Add
signin batch-revoke-sessionsto your offboarding and incident runbooks, and note the one-hour delay. - If agents use the AWS MCP Server, record which role each one signs in as. My MCP changelog tracker now notes this change.
FAQ
What is the default AWS sign-in session duration?
The Sign-In guide says 12 hours. The IAM docs and API model describe an unset value as keeping the existing behaviour. Nothing changes unless an administrator sets a value.
Does this make AWS Management Console sessions last 90 days?
No. The guide says console sessions keep their existing duration settings.
Does revoking a sign-in session cut access immediately?
No. Revocation can take up to an hour, and access tokens already issued stay valid until they expire.
Can I block 90-day sessions across my organisation?
Yes. An SCP that denies signin:CreateOAuth2Token with the condition signin:PutSignInDurationBlock set to true blocks the creation and renewal of extended sessions.
Related: Amazon Cognito CIMD for MCP clients, MCP authorization and OAuth explained, AI agent identity and non-human identities and the MCP changelog tracker.
Spot an error or something out of date? Email me and I will fix it and log it on the corrections page.
I'm Ajay Kumar — I build and operate PandaStack, an open-source Firecracker microVM cloud for AI agents, and write about the infrastructure and tooling around it.
Need this kind of infrastructure work? See what I do or email hello@ajayk.sh.
Related
Amazon Cognito Now Accepts MCP Clients by URL: CIMD Without App Clients
On 19 November 2026 Amazon Cognito added Client ID Metadata Document (CIMD) policies, so MCP clients such as VS Code and Claude can sign in to a user pool without an app client each. The limits, the grant rules, and what the real client documents look like.
6 minNov 24, 2026AWS WAF Now Inspects MCP and A2A Traffic: What It Blocks
On 23 November 2026 AWS WAF gained an AI Security rule group for LLM, MCP and A2A endpoints, backed by Bedrock Guardrails. What it checks, what it blocks by default, the fail-open default, the cost, and what I saw testing MCP SDK traffic.
10 minNov 20, 2026How to Fix CVE-2026-115563 in MCP Python SDK OAuth Clients (2026)
The MCP Python SDK let a malicious MCP server choose where your OAuth client secret was sent. Upgrading is not enough for client-credentials agents: you must pass issuer=. A tested fix, with a local harness that shows the secret leaking on 2.1.1 and 1.29.1 and stopping on 2.3.0 and 1.30.0.
10 min