AWS Sign-In Duration Up to 90 Days: How to Extend aws login Sessions

AWS Sign-in duration lets aws login and MCP tools stay signed in up to 90 days. How it differs from max session duration, setup steps and revocation.

Nato Lagidze24 November 202610 min read0 viewsAWS
AWS Sign-In Duration Up to 90 Days: How to Extend aws login Sessions

You can now stay signed in to the AWS CLI for up to 90 days instead of re-running aws login every 12 hours. On 23 November 2026, AWS added a new Sign-in duration setting for individual IAM users and IAM roles. It covers the AWS CLI's aws login command, the AWS MCP Server and other OAuth-based tools. It does not change how long you stay signed in to the AWS Management Console.

The setting is off by default: nothing changes until an administrator sets a longer duration on a specific user or role. Below we explain what it does, how it differs from the old "maximum session duration", how to set it up, how to see and revoke sessions, and whether 90 days is a good idea.

What is AWS Sign-In duration?

According to the AWS What's New post, Sign-in duration "controls how long an OAuth Sign-in session remains active, for individual IAM users and roles." AWS pitches it at "developers and AI agents" who need to "stay authenticated for up to 90 days without frequent sign-ins or consent prompts."

Here's how a sign-in session works, per the AWS Sign-In session management guide:

  • When you authenticate, AWS Sign-In creates a sign-in session with its own ID, creation time and expiry.
  • During that session, tools use short-lived OAuth access tokens. They are renewed with refresh tokens, so you don't have to sign in again.
  • When the session expires or is revoked, you have to authenticate again.

AWS presents this as "a more secure alternative to static access keys." You get credentials that rotate automatically instead of a long-lived AKIA... key sitting in ~/.aws/credentials.

What changed: 12 hours vs 90 days

Before this launch, the AWS CLI's console-credentials login guide said the session from aws login "will be valid for up to the set session duration of the IAM principal (maximum of 12 hours), after which you must run aws login again." The aws login command itself arrived in November 2025 (AWS What's New, 2025).

Before 23 Nov 2026 Now
Longest aws login session 12 hours 90 days (7,776,000 seconds)
Where it's set Role's Maximum session duration New Sign-in duration setting on each IAM user or role
Minimum value n/a 1 hour (3,600 seconds), per the IAM guide
Default if not set Up to 12 hours Unchanged. AWS says existing limits "remain unchanged unless administrators explicitly configure longer durations"
Console sessions Unaffected Still unaffected
Cost Free No charge mentioned by AWS
Regions Commercial All AWS commercial Regions

One wording difference to know about: the Sign-In guide says "the default session duration is 12 hours," while the IAM role settings guide says that if you don't set a value, "the role's existing MaxSessionDuration setting applies." In practice, roles keep behaving as they did until you change them.

Sign-in duration vs maximum session duration: what's the difference?

This is the most confusing part, because IAM roles now have two similar-sounding settings.

Setting What it controls Range
Maximum session duration (existing) Lifetime of each individual temporary AWS STS credential 1 to 12 hours (default 1 hour)
Sign-in duration (new) How long the overall OAuth sign-in session can keep renewing those credentials 1 hour to 90 days

The Sign-In guide says that, for supported CLI and OAuth flows, "sign-in session duration takes precedence over the existing IAM role Maximum Session Duration setting," while "the role's Maximum Session Duration continues to govern the lifetime of individual temporary AWS Security Token Service (AWS STS) credentials." The IAM guide adds that the new setting "does not affect AWS Management Console sessions or traditional AWS STS sessions" (for example, a plain sts assume-role call).

In other words, you still get short-lived keys. The CLI just keeps fetching new ones for up to 90 days without asking you to sign in again. The CLI guide says the cached credentials refresh "every 15 minutes as needed."

Does this change the AWS console session timeout?

No. This is the question most people searching "AWS console session timeout" will have. AWS says Sign-in duration "does not affect AWS Management Console sessions," and the Sign-In guide repeats that "console sessions continue to follow their existing session duration settings." If you use IAM Identity Center, its separate access-portal session setting still applies. Identity Center's 15-minute-to-90-day range has been around since 2023 and is a different feature.

How to set Sign-in duration (step by step)

For an IAM role (console)

Per the IAM User Guide:

  1. Open the IAM console and choose Roles.
  2. Choose the role.
  3. In the Summary section, choose Edit.
  4. For Sign-in duration, choose a value. This is separate from Maximum session duration.
  5. Choose Save changes.

The change applies only to new sign-in sessions. Existing sessions keep their old expiry until they end or you revoke them.

For an IAM role (AWS CLI or API)

The IAM guide says to use aws iam update-role with the --max-signin-session-duration parameter (MaxSigninSessionDuration in the API), and aws iam get-role to view the current value. The guide gives the allowed range in seconds (3,600 to 7,776,000), so seven days would look like this:

aws iam update-role \
  --role-name DeveloperRole \
  --max-signin-session-duration 604800

For an IAM user

In the IAM console, choose Users, select the user, find the sign-in session duration setting, choose Edit, enter a value up to 90 days and save. AWS says the IAM API and CLI also support this, but the user guides we checked document only the console steps for users.

Then sign in once

On the developer's machine, run aws login (AWS CLI 2.32.0 or later, per AWS's 2025 announcement). After the browser sign-in, the CLI keeps renewing credentials for the configured duration. For extended sessions, AWS recommends the credential daemon, which "stores refresh tokens encrypted at rest" and hands the CLI and SDKs only short-lived credentials.

How to list and revoke AWS sign-in sessions

Longer sessions are only safe if you can kill them. The Sign-In guide documents three CLI commands:

aws signin list-sessions \
  --principal-arn arn:aws:iam::123456789012:role/DeveloperRole

aws signin get-session \
  --session-arn arn:aws:signin:us-east-1:123456789012:session/my-session-id

aws signin batch-revoke-sessions \
  --session-arns arn:aws:signin:us-east-1:123456789012:session/my-session-id

Two caveats from AWS's documentation:

  • Revocation "can take up to one hour to take effect," and "already-issued access tokens can remain valid until they expire."
  • Revoking one session "does not automatically revoke other sessions" for the same user or role.

Administrators can manage sessions across the account. Individual users can see and revoke only their own.

Monitoring in CloudTrail

Token issuance and renewal show up as CreateOAuth2Token events from signin.amazonaws.com. AWS's example events include SignInSessionExtended (whether a custom duration is in use) and SignInDuration in seconds. That makes it easy to build an alert for any session set longer than your policy allows.

Who should use 90-day sessions? A decision table

This table is our own guidance, not AWS's.

Use case Suggested Sign-in duration Why
Developer laptop, daily CLI use 1–7 days Fewer prompts, short exposure if the laptop is lost
AI coding agent or MCP client running long tasks Up to the length of the task, often days Avoids an agent stalling on a consent prompt
Shared or CI machine Don't use aws login; use roles and OIDC Human sign-in sessions don't belong on shared hosts
Break-glass or admin roles Keep the default High privilege should mean frequent re-authentication
Replacing long-lived access keys Any duration is an improvement Rotating credentials beat static keys

What are people saying?

In the first day after launch, we found no Reddit, Hacker News or forum threads specifically about the new Sign-in duration setting that we could link to. Earlier community posts about IAM Identity Center sessions, like this AWS Builder Center post, note that Identity Center's maximum is 90 days and warn that raising it "is an org-wide policy" that affects every user in the instance. Questions we expect admins to ask:

  • Can I enforce a maximum across the whole organisation? (AWS hasn't announced an organisation-wide cap for this setting. Its condition-key documentation covers network and identity conditions on sign-in actions.)
  • Does this work for root users? (AWS's announcement mentions only IAM users and roles.)
  • Does it extend Kiro or IDE sessions? (AWS names the CLI, the AWS MCP Server and "other OAuth-enabled applications." Check your tool's documentation.)

Editor's take

This launch is really about AI agents. An MCP client or coding agent that has to stop every 12 hours to ask a human to sign in again isn't useful for long jobs. AWS's answer is better than the obvious workaround of pasting a static access key into an agent config. Sessions rotate, show up in CloudTrail and can be revoked.

But "up to 90 days" is a ceiling, not a target. Revocation takes up to an hour, so for most teams one week is a sensible maximum for humans, with longer durations limited to narrowly scoped agent roles. Set a CloudTrail alert on SignInDuration, and use the credential daemon. If you're also reviewing security spend this week, see our breakdown of AWS WAF's new pricing from February 2027.

For related identity changes, see Amazon Cognito token exchange for AI agents and the Amazon Q Developer to AWS Assistant and Kiro transition. If you're new to AWS accounts, start with our AWS Free Tier guide.

FAQ

How long does aws login last?

By default, the same as before: up to 12 hours, governed by the IAM principal's existing settings. If an administrator sets a Sign-in duration on your IAM user or role, it can last up to 90 days.

How do I increase the AWS CLI session timeout?

Ask an administrator to set Sign-in duration on your IAM role (IAM console, Roles, Edit) or on your IAM user, then run aws login again. The new duration applies only to new sessions.

How do I change the AWS console session timeout?

You can't with this feature. Sign-in duration does not affect AWS Management Console sessions. Console sessions keep their existing duration settings. According to the IAM User Guide, "IAM user sessions are 12 hours by default" in the console.

What is the maximum AWS sign-in duration?

90 days (7,776,000 seconds). The minimum is 1 hour (3,600 seconds), per the IAM User Guide.

Is Sign-in duration the same as maximum session duration?

No. Maximum session duration (1–12 hours) limits each temporary STS credential. Sign-in duration limits how long the overall sign-in session can keep renewing those credentials.

How do I revoke an AWS CLI login session?

Use aws signin list-sessions to find it and aws signin batch-revoke-sessions to revoke it. Revocation can take up to one hour, and already-issued access tokens can stay valid until they expire. On your own machine, aws logout signs you out of the local CLI session.

Does AWS Sign-In duration cost anything?

AWS's announcement doesn't mention any charge, and it's configured through IAM.

Is it available in all Regions?

AWS says it's available in all AWS commercial Regions.

Sources

Featured image: Aerial photo of an Amazon Web Services data center site in the us-west-2 (Oregon) Region, by Tedder, CC BY-SA 4.0, via Wikimedia Commons (cropped). It is a general AWS facility photo, not an image of AWS Sign-In. Source

Share:

Comments

Leave a comment