- AWS published GetScopedCredentials on November 20, an API that gives an agent or process credentials with fewer permissions, a shorter lifetime, or both.
- Each scoped session keeps the caller's identity and can only lose permissions, so a sub-agent cannot receive more access than its parent.
- Teams still write the policies, which at launch AWS limits to one inline policy of 2,048 characters. Review any wildcards, and decide who may call the API.
Give the agent a permit, not the master key
When an agent is handed the full credentials of the session that started it, it can use every permission those credentials carry. AWS's security team makes this point. An agent chooses its actions at runtime, often guided by prompts or tool output. If its permissions are too broad, a mistake can reach well beyond the task it was given.
The idea worth holding onto is simple. Authority should shrink as it is passed down. A manager who gives a contractor a building pass does not hand over the master key. For an agent, the simplest setup is, in effect, to give it the master key. On November 20, AWS published a feature that lets teams narrow that access.
How the narrowing works
The feature is GetScopedCredentials, a new call in AWS Security Token Service (STS), the service that issues short-lived credentials. You call it with credentials you already hold, such as those from an EC2 instance profile or a Lambda function. You pass in a scope down policy, a shorter session length, or both. A scope down policy is a short rule describing the most the new credentials may do.
The result is the overlap between what your session can already do and what the policy allows. So permissions can only go down. The requested session length also cannot exceed what remains on the calling session.
AWS describes two styles. One lists only what the task needs, such as read access to a single S3 storage bucket. The other keeps most permissions and removes a few, using a NotAction statement. AWS's example blocks identity management, assuming other roles and deleting certain resources.
Delegation that only shrinks
The call can be repeated with the credentials it returns. That lets a lead agent hand each helper a smaller slice of its own access. Because every step can only subtract, AWS says a helper never ends up with more than the agent that launched it. A session can carry at most three scope down policies, and each new one intersects with all earlier ones. Calls that only shorten the session do not count toward that limit.
The scoped credentials keep the caller's identity. That includes the role session name and session tags. Every call is logged in AWS CloudTrail, and a description you attach is recorded in the event. Later calls made with scoped credentials show the access key ID, which can be traced to the immediate parent session. For a security team, that means a narrowed agent still leaves a trail it can follow up the chain, one parent at a time.
AWS also shows a case with no agent in it. Picture an application that serves many customers from one S3 bucket, with each customer's files in their own folder-like prefix. One IAM role covers all of them. A trusted broker in the application finds out who the customer is after sign-in. It then requests credentials that reach only that customer's prefix and passes those to the worker. S3 refuses the worker any other prefix, although the role behind it could open them all.
Where the work remains
This is a building block, not a finished control. Someone still has to write each policy. At launch, the API accepts one inline policy of up to 2,048 characters. AWS warns that a task using Athena to query S3 data also needs the S3 read permission, because Athena uses your credentials to read it.
AWS suggests IAM Policy Autopilot, an open source tool that reads your code and proposes the permissions it needs. AWS says its output can include wildcards, and that you should review them and replace them with the specific actions and resources the task should reach. A policy drafted by a tool and never read is a permit nobody checked.
Two other limits are in the post. Some AWS services do not support scoped credentials, and AWS points to its API reference for the list. AWS also advises running agents in isolated or sandbox environments so they can use only the scoped credentials. The post does not claim this feature stops an agent from being misled. It limits what a misled agent can reach.
AWS says the API is available in all commercial Regions, GovCloud (US) and the China Regions. At launch, each account gets its own request allowance for it in each Region, set at 200 calls per second.
Questions to put to your team
Ask whether any agent runs today with the full credentials of the session that launched it. Ask who writes and who reviews the scope down policy for each agent, and who checks the wildcards. Ask who may call sts:GetScopedCredentials. AWS says you can restrict this with conditions such as the caller's role, tags and network endpoint, and cap session length with the sts:DurationSeconds key.
Ask whether CloudTrail events for scoped sessions are being watched, since they let you trace each session to its immediate parent, and so up the chain. Finally, ask where agents run, and whether that environment is isolated.
The lesson is that the question for agent security is no longer only what an agent may do. It is how little each agent was handed, and whether anyone can show it.
Produced by the WebPulse Newsroom with AI assistance from the original reporting credited below, and checked against that source by our editorial review. How we use AI.
Original reporting: AWS Security.





