Docs / Signing in
Signing in
How AccessLens signs in with IAM Identity Center device authorization, shares the AWS CLI's SSO cache, picks a hub account and keeps credentials in memory only.
Updated
AccessLens signs in with AWS IAM Identity Center only. It never uses long-lived access keys, the [default] profile or the AWS SDK's default credential chain, so environment variables, ~/.aws/credentials and instance metadata are never consulted.
Choose how to sign in
- An existing profile. AccessLens reads the
[sso-session …]and[profile …]blocks in~/.aws/config(sso_start_url,sso_region,sso_account_id,sso_role_name,sso_registration_scopes). Only IAM Identity Center profiles can be selected. Profiles with static keys,credential_processor role chaining are listed but can't be chosen, and the app warns if static keys are present in its environment. - A start URL. Enter your AWS access-portal URL and its region.
Approve in your browser
AccessLens uses the OIDC device-authorization flow, the same one aws sso login uses. Your system browser opens the AWS sign-in page; check that it shows the same code as the app, then approve. AccessLens never opens AWS pages inside the app.
If you've already run aws sso login for that session, AccessLens finds the token in the AWS CLI's cache and doesn't ask again.
The shared SSO cache
The SSO token is stored where the AWS CLI stores it, ~/.aws/sso/cache, in exactly the CLI's format, so the app and the CLI share one sign-in. On macOS and Linux the file is written with mode 0600. This cache is the only place token material touches disk.
For sso-session profiles with a refresh token, AccessLens renews the token when it has less than 10 minutes left. Settings → AWS sign-in shows how long the session has.
Pick the hub
After sign-in, choose the hub: the account and permission set AccessLens works from. AccessLens lists the accounts and roles your identity can use, gets that permission set's short-lived credentials, and records its role ARN, which the role's trust policy refers to.
From the hub, AccessLens assumes the AccessLensReadOnly role in each account you add, with that account's ExternalId. Sessions are named accesslens and last one hour.
Credentials stay in memory
Hub and per-account credentials are held in memory only, refreshed five minutes before they expire, and zeroized when you sign out. They're never written to disk or to the logs, which go through a redacting writer.
If your session expires while AccessLens is working (during a scheduled scan, for example), it pauses and shows a Re-authenticate with SSO prompt instead of failing silently.
Launch at login
With Launch at login on (Settings), AccessLens starts in the tray and restores your last SSO session from the CLI cache without prompting, as long as the token is still valid.