Security teams should use AWS STS to replace long lived credentials with short lived, task scoped access. Issue temporary credentials only when a user or workload needs them, map access through roles rather than direct account permissions, and revoke or expire sessions quickly. This reduces standing privilege, limits blast radius, and makes cloud access easier to govern across teams and environments.
Why STS Changes the Access Model in AWS
AWS STS is most useful when security teams want access to be granted for a purpose, not left in place indefinitely. Instead of distributing long-lived IAM users or static keys, STS issues temporary sessions that expire on their own, which aligns access to the work being done and reduces the chance that forgotten credentials become a standing entry path.
That design matters because the security objective is not only to authenticate successfully, but to make every session time-bound, narrowly scoped, and tied to a role assumption event. When teams rely on roles and temporary credentials, they can separate who or what initiates access from what that access can do, which improves governance and makes review easier across accounts, pipelines, and workloads.
Using STS well also changes the operational burden. Access decisions move from distributing secrets to controlling trust relationships, session duration, and role boundaries. That makes it easier to support ephemeral workflows, cross-account administration, and automation without keeping permanent credentials alive in code, config, or local environments.
For a deeper identity and lifecycle lens, see Ultimate Guide to NHIs and the section on Key Challenges and Risks, which cover rotation, overprivilege, and visibility gaps.
How Teams Should Apply STS for Short Lived Access
The cleanest pattern is to make STS the normal path for both human and workload access wherever a direct long-lived credential would otherwise be used. In practice, that means role assumption, session expiry, and tightly defined permissions should be the default, while static keys are treated as an exception that requires stronger justification and tighter monitoring.
Role design is the real control point. If a role is too broad, STS only makes the privilege temporary, not safe. Security teams should therefore use role boundaries, scoped policies, and environment-specific roles so the temporary session reflects the minimum access needed for that task, account, or pipeline stage. The role is the policy container; STS is the delivery mechanism.
Operationally, this works best when session length matches the task. Interactive admin work may tolerate a shorter session than a batch job, and automation often needs a different renewal pattern than a person. The point is to remove unnecessary persistence while avoiding brittle expiry settings that push teams back toward permanent credentials.
Examples of supporting guidance and control models include CSA Cloud Controls Matrix, CIS Controls v8, and NIST Cybersecurity Framework 2.0, all of which reinforce access control, account management, and governance.
Risk and Threat Considerations
STS reduces standing access, but it does not eliminate cloud risk if the underlying role is overprivileged or the trust path is too broad. Temporary credentials can still be abused within their lifetime, and attackers often prefer them because they inherit legitimate cloud permissions and can blend into normal operational activity.
Failure mechanism: Excessive role permissions, long session durations, weak trust policies, or exposed session material can let an attacker turn a short-lived credential into a meaningful foothold before it expires.
Impact: The result can be unauthorized data access, cross-account movement, destructive actions, or abuse of automation at cloud scale, even though the original credential was temporary.
That is why teams should treat STS as one layer in a broader control stack, not as a substitute for least privilege, strong trust policy design, logging, and session monitoring. The control works best when temporary access is easy to obtain for legitimate work, but hard to abuse outside that purpose. For attacker behaviour and cloud access abuse patterns, see MITRE ATT&CK Enterprise Matrix and the OWASP Non-Human Identity Top 10.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 address the attack and risk surface, while CIS Controls v8, NIST CSF 2.0, NIST Zero Trust (SP 800-207) and NIST SP 800-63 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | 6 — Access Control Management | STS directly supports account and access control discipline in cloud environments. |
| Recommendation — Restrict cloud access to approved roles and remove standing credentials from routine workflows. | ||
| NIST CSF 2.0 | PR.AC-4 — Access Permissions and Authorizations | STS is a practical way to enforce time-bound access permissions and role-based authorization. |
| GV.PO-01 — Policy Establishment and Communication | STS usage should be governed by policy for session length, role scope, and exception handling. | |
| Recommendation — Use time-bound role sessions to enforce least-privilege authorization for cloud access. Define policy for temporary credential use, role assumption, and session expiry. | ||
| NIST Zero Trust (SP 800-207) | SC-7 — Continuous Verification and Access Enforcement | STS fits zero trust by limiting access to verified, short-lived sessions. |
| Recommendation — Apply continuous verification so access is granted only through short-lived sessions. | ||
| OWASP Non-Human Identity Top 10 | NHI-01 — Secrets and Credential Management | STS is used to replace long-lived cloud credentials with temporary session credentials. |
| NHI-03 — Overprivilege and Excessive Permissions | STS reduces standing access only when the assumed roles are narrowly scoped. | |
| NHI-05 — Lifecycle, Offboarding, and Revocation | Temporary sessions support rapid expiration and revocation of cloud access paths. | |
| Recommendation — Replace static cloud secrets with short-lived credentials and rotate or expire sessions quickly. Scope each role to the minimum permissions needed for the task or workload. Set short session lifetimes and revoke trust paths promptly when access should end. | ||
| NIST SP 800-63 | AAL2 — Authenticator Assurance Level 2 | Temporary access still depends on strong authenticated session initiation for cloud role use. |
| IAL1 — Identity Assurance Level 1 | Federated or role-based cloud access still depends on a trusted identity proofing model upstream. | |
| Recommendation — Require strong authentication before allowing role assumption or session issuance. Anchor role issuance to a trusted upstream identity process. | ||
Practitioner Guidance
What to prioritise: Put your effort into role design, trust policy scope, and session duration before you tune automation. STS only reduces standing access when the role itself is narrow and the session is short enough to matter.
What to verify: Confirm that every high-value workflow uses temporary credentials end to end, that no production path depends on shared static keys, and that you can trace who assumed which role, when, and for how long.
Common mistake: Treating STS as a convenience feature while leaving broad role permissions intact. That removes credential persistence but preserves excessive privilege, which is usually the more dangerous half of the problem.
Practitioner takeaway: Use STS to make cloud access ephemeral by default, but measure success by whether privilege is both time-bound and meaningfully scoped, not merely by whether credentials expire.
Related resources from NHI Mgmt Group
- How should security teams implement AWS Identity Center to reduce standing access in multi-account environments?
- How should security teams reduce standing privilege in AWS environments?
- How should security teams reduce standing privilege in cloud production environments?
- How should security teams reduce standing privilege in cloud environments?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on September 17, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org