AWS STS GetScopedCredentials Gives Agents Less Access, Not New Identity
AWS STS can derive narrower, shorter-lived temporary credentials while preserving caller identity, a useful least-privilege boundary for agents.
On this page

Giving an agent its own credential should not mean giving it a broader identity than the workload that launched it. AWS STS’s new GetScopedCredentials API is designed for the opposite direction: take temporary credentials already in use and derive a narrower permission set, a shorter session, or both. AWS says the result preserves the caller’s original identity and that permissions and duration can only be reduced, never expanded. [1]
That makes the API relevant to systems that hand work to agents, sub-agents or other delegated workloads. A service with access to several resources can mint a short-lived set that covers only the one operation a delegated task needs. Each call is controlled by IAM policy and logged in CloudTrail, according to AWS. The service is available in commercial Regions, GovCloud, the European Sovereign Cloud in Germany and China Regions. [1]
Narrowing is different from role assumption
The distinction is conceptual as well as practical. A role assumption can switch a workload into a different permission context. GetScopedCredentials is meant to preserve the existing identity while reducing what that identity can do. It is therefore useful when downstream actions should remain attributable to the original principal, but with a tighter boundary for one task.
A parent agent that can read several buckets, for example, could request a credential scoped to one bucket and a shorter session before starting a file-processing subtask. If the subtask is compromised or misbehaves, the credential it receives should not provide access to the parent’s other buckets. The guarantee depends on the policies and inputs used to derive the scoped credentials; the API does not decide what resources a task ought to access on the application’s behalf.
This is not a substitute for strong identity, authorization or tool design. The caller needs permission to invoke the API, the application must select the intended resource boundary, and the delegated process must receive only the derived credentials. If a tool can fall back to a broader ambient credential when the scoped token fails, the narrow boundary is only cosmetic. Likewise, logging the delegation does not itself alert on misuse; teams still need to route and review the CloudTrail events. [2]
Build the delegation path deliberately
Before adopting the API, inventory the credentials an agent can already access: environment variables, shared files, instance roles, SDK credential chains and any tool-specific secrets. Then design a task-to-permission mapping. A task that reads one document should not receive a token capable of writing an entire data store. Bound the session duration to the operation’s expected lifetime and handle expiration as an explicit failure, not a reason to silently retry with a broader identity.
Test both sides of the boundary. Confirm the scoped credential can perform the intended call, then verify that it cannot read a neighboring resource, change a policy or mint a broader credential. Inspect the audit event so responders can tie the delegated action to the original caller and the scope request. Also test what happens when scope creation fails: the safe outcome is a denied task with a useful error, not a privilege escalation fallback.
Short-lived credentials do not eliminate the need for policy review, but they can make least privilege dynamic. This complements the broader agent prompt-injection boundary principle: tools should receive only the authority needed for a specific action. For agent systems, the important shift is to treat every delegation as a first-class authorization decision with a narrower token, a bounded lifetime and an auditable parent identity.
Frequently asked questions
Can GetScopedCredentials give an agent more access than its caller?
AWS says the derived permissions and session duration can only be narrowed, not expanded; the derived credentials preserve the original caller identity.
What should happen if scope creation fails?
The delegated task should fail closed with a clear error. Falling back to a broader ambient credential would defeat the intended least-privilege boundary.

/* Comments */
Comments are offline right now — we reconnect automatically, nothing is lost.