Use temporary credentials
Framework question: How do you manage identities for people and machines?
- Risk if not established
- High
- Framework verified
- 23 Oct 2026
AWS Well-Architected Framework — SEC02-BP02 Use temporary credentials
Executive summary
Why this practice matters
Use short-lived credentials that are issued on demand and expire automatically, for both people and machines. People sign in through a central identity provider; workloads assume roles or use workload identity. Long-term keys become rare, justified exceptions rather than the default.
Business impact
- A leaked credential expires on its own instead of working indefinitely.
- Removes the most common source of cloud breaches: exposed access keys.
- Reduces the rotation and tracking burden for long-term secrets.
- Ties every session to a known identity and policy.
Assign
Accountable and responsible roles
Responsibilities are held separately from roles, so accountability type and typical roles are stated explicitly.
| Responsibility | Accountability type | Typical roles |
|---|---|---|
Provide temporary-credential access Provide federation and role-based access paths, and guardrails against new keys. Typical roles: Cloud / Platform Engineer, Cloud Platform Engineer | responsible | Cloud / Platform EngineerCloud Platform Engineer |
Migrate workloads off long-term keys Move applications and pipelines from stored keys to roles. Typical roles: DevOps Engineer, Software Engineer, DevOps Engineer, Software Engineer | responsible | DevOps EngineerSoftware EngineerDevOps Engineer, Software Engineer |
Approve long-term credential exceptions Approve and review any remaining long-term credentials. Typical roles: Security Engineer, Security Engineer | consulted | Security EngineerSecurity Engineer |
Assessment
Assessment and evidence state
States describe how far the practice has moved from intent to something continuously validated.
- 0
Not Assessed
Credential types have not been reviewed.
Indicators
- Long-term credential count unknown.
- 1
Not Implemented
People and machines routinely use long-term access keys.
Indicators
- Developers use personal access keys.
- Applications embed keys.
- 2
Partially Implemented
Human access is federated, but many machine identities still use long-term keys.
Indicators
- Workloads outside the cloud use keys.
- No guardrail against new keys.
- 3
Implemented
People federate and machines use roles; remaining long-term credentials are justified.
Indicators
- Roles used for compute.
- Exceptions listed with replacement plans.
- 4
Continuously Validated
New long-term credentials are prevented by guardrails and the remaining few are continuously reviewed.
Indicators
- New keys require approval.
- Key count trends down.
Assessment dimensions
Human access
Practice-specificLong-term keys · Mixed · Federated temporary
Machine access
Practice-specificAccess keys · Mixed · Roles / workload identity
Remaining long-term credentials
Practice-specificUnknown · Known · Justified and shrinking
Prevention
Practice-specificNone · Guidance · Blocked by guardrail
Caution
A short list of long-term keys can still be high risk if they're powerful or unrotated. Judge by both the count and the justification for each remaining key.
Standard
What you should be able to demonstrate
Statements a reviewer should be able to confirm from evidence, not from intent.
- People access the cloud through federation and receive temporary credentials.
- Workloads use roles or workload identity, not stored access keys.
- External and on-premises systems use temporary-credential mechanisms where available.
- Remaining long-term credentials are few, listed and justified.
- Guardrails prevent new long-term keys without approval.
Trade-offs to hold in view
- Some third-party tools only support static keys; isolate and tightly scope those until alternatives exist.
- Federation and role assumption add initial setup effort, though they cut ongoing key management.
- Short session lengths improve security but can interrupt long-running work, so set durations by use case.
Assess
Questions to ask
Each question exposes the difference between an intention and an operating practice.
- discovery
How many long-term access keys exist, and what uses each one?
Establishes the size of the problem.
Usually asked by: Security Engineer, Cloud / Platform Engineer
- challenge
Which of those keys could be replaced by a role or federation today?
Most remaining keys are habit, not necessity.
Usually asked by: DevOps Engineer, Software Engineer
- evidence
What prevents someone creating a new long-term key without approval?
Without prevention, the problem grows back.
Usually asked by: Cloud / Platform Engineer
- executive
If one of our access keys appeared in a public repository tonight, how long would it keep working?
Frames credential lifetime as exposure time.
Usually asked by: Security Leader, Technology Executive
Evidence
Required and expected evidence
Reusable evidence definitions held once in the evidence library and referenced by every practice that relies on them. Each links to what good evidence looks like and to worked examples.
Credential & Secrets Inventory
A current inventory of the long-term credentials and secrets a workload or organisation relies on: what each is, what uses it, where it is stored, who owns it, whether it rotates, when it was last rotated and audited, and why a temporary alternative isn't used.
Use the Credential & Secrets Inventory to show which long-term credentials remain and why.
Minimum expected content
- Scope: workloads, accounts and environments covered
- Each long-term credential or secret: type (access key, password, API token, certificate, etc.) and purpose
- Consuming identity or system
- Storage location (secrets service, parameter store, other)
- Owner
- Rotation method (automatic/manual), interval, and last rotation date
- Last audit or access-review date
- Justification where a temporary credential is not used, and the planned replacement
- Detection of secrets in code repositories or artefacts
- Exceptions with owner and expiry
Anti-patterns
- Access keys for machines where roles could be used
- Secrets in source code, environment files or wikis
- A spreadsheet nobody reconciles
- Rotation 'planned' but never done
- Credentials shared between people or systems
- No owner for service credentials
Review: Reconcile at least quarterly against real configuration, and immediately after any suspected credential exposure.
Identity & Authentication Standard
The organisation's standard for how people and machines authenticate: approved sign-in methods, MFA requirements, password rules, federation, permitted credential types, and detection of suspicious sign-ins, with any exceptions.
Use the Identity & Authentication Standard to show where long-term credentials are prohibited.
Minimum expected content
- Scope: identity types covered (workforce, root/break-glass, machine, external/customer)
- Approved sign-in methods for each identity type
- MFA requirement and acceptable factor types, including phishing-resistant options for privileged users
- Password or passphrase rules, referencing an external standard where used (e.g. NIST SP 800-63)
- Federation requirement: which access must go through the central identity provider
- Permitted credential types and where long-term credentials are prohibited
- Detection and response for suspicious or anomalous sign-ins
- How each requirement is technically enforced
- Exceptions with owner, rationale and expiry
- Owner, approval date and review date
Anti-patterns
- A policy that says 'MFA recommended'
- Root and break-glass identities left out of scope
- Different teams apply different sign-in rules
- Requirements written down but not enforced in the identity provider
- No mention of machine identities
Review: Review annually and after changes to identity providers, regulatory requirements or significant authentication incidents.
Governance Exception Register
A controlled register of approved deviations from applicable organisational governance requirements, including rationale, risk, compensating controls, decision authority and expiry or remediation state.
Use the Governance Exception Register for approved long-term credential exceptions.
Minimum expected content
- Governance requirement being excepted
- Scope of the exception
- Rationale for the deviation
- Risk and business/operational impact
- Approver or appropriate risk/decision authority
- Compensating controls or interim safeguards
- Approval date
- Expiry or mandatory review date
- Remediation, closure or migration plan
- Current status
Anti-patterns
- Teams deviate from standards informally with no recorded exception
- The exception approver is the same person asking for the deviation despite lacking risk authority
- Exceptions have no expiry/review date and become permanent by default
- The rationale records delivery pressure but not the resulting risk or impact
- Compensating controls are vague promises with no owner or verification
- Closed exceptions are deleted so prior governance decisions cannot be explained
Review: Maintain continuously; review each exception by its expiry/review date and when the relevant requirement, workload risk or compensating control changes.
Diagnosis
Common evidence gaps
Personal access keys
Engineers use long-lived personal access keys for CLI and SDK work.
Keys in workloads
Applications and pipelines use stored keys when they could assume a role.
External workloads on static keys
On-premises or other-cloud systems use static keys instead of temporary-credential mechanisms.
No prevention
Nothing stops new long-term keys being created.
Implementation
Implementation guidance
Federate human access
Have people access the cloud through federation, receiving temporary credentials for console and CLI.
Use roles for workloads
Give compute, containers and functions roles instead of stored keys.
Cover external workloads
Use certificate- or identity-based mechanisms for on-premises, IoT and other-cloud systems that need access.
Handle consumer access
Give customer-facing apps limited temporary credentials through a customer identity service.
Prevent new long-term keys
Use organisation guardrails to block or require approval for new long-term keys.
Measure
Measurements
- Number of long-term access keys, trended over time.
- Percentage of human access through federation.
- Percentage of workloads using roles.
- Number of long-term credential exceptions.
Related
Outcomes and practices
Business outcomes
Practices