Agent Identity on AWS: GetScopedCredentials, Cognito and the Edge
The AWS Weekly Roundup for 24 November had a theme I rarely see AWS state outright: identity for agents. Three launches landed the same week, and together they sketch a model I think is sound. I'm working from the round
The AWS Weekly Roundup for 24 November had a theme I rarely see AWS state outright: identity for agents. Three launches landed the same week, and together they sketch a model I think is sound.
I'm working from the roundup's summaries here. I have not tested any of this.
The three pieces
STS GetScopedCredentials. Take the temporary credentials a workload already holds and derive narrower ones. You can cut permissions, session duration, or both. The result keeps the caller's original identity, and permissions only ever narrow. Access to the API is controlled by IAM policies and every call is recorded in CloudTrail. Available in all commercial Regions, GovCloud (US) and China.
Cognito dynamic client registration. MCP clients and AI agents can register themselves at runtime (RFC 7591) rather than someone creating an app client for each one. You choose between requiring an access token with a registration scope, or opening registration to any client. Registered clients carry a client ID prefix so you can filter them. Available on the Essentials and Plus plans.
CloudFront Functions network calls. Covered in my other post: a check at the edge, such as an agent's permissions and usage budget, before the request reaches your API or MCP server.
Why scoping down matters most
The line that stuck with me: a sub-agent can never end up with more access than whoever created it. That is the right property. The common failure in agent systems is an orchestrator holding broad credentials and handing them to whatever it spawns.
The pattern I'd try:
- The orchestrator gets a role scoped to the task.
- For each sub-agent, it calls GetScopedCredentials with a short session and only the actions that sub-task needs.
- CloudTrail shows the original identity throughout, so the audit trail still makes sense.
Compare that with today's approach of pre-creating a role per agent type and maintaining all those policies. Runtime narrowing is less to maintain, if the API behaves as described.
What I'd be cautious about
- Open dynamic registration on Cognito sounds convenient and is a risk. I'd start with the access-token-required mode.
- The roundup does not give request parameters, quotas or the exact policy syntax for GetScopedCredentials. I'd read the API reference before designing around it.
- I have not seen how the narrowed credentials interact with permission boundaries or SCPs. Likely they only intersect, but that is my assumption, not a stated fact.
Next step: write a small test that scopes credentials down to one S3 prefix and confirms a second call cannot widen them again. That is the property everything else relies on.
Sources
- AWS Weekly Roundup: Local Zone in Bogotรก, 30-minute Lambda timeout, and more, 24 November 2026 (AWS News Blog)
- Amazon CloudFront Functions can now make network calls (AWS What's New)
Drafted with AI assistance. I review and edit every post.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes โ full credit and traffic to the original publisher.