Home icon

Secure AI agents with Amazon Bedrock AgentCore Identity on Amazon ECS

Machine Learning Blog



This article explains how to secure AI agents running on Amazon ECS using Amazon Bedrock AgentCore Identity with OAuth 2.0 and session binding.

  • Implements Authorization Code Grant (3-legged OAuth) for secure user-delegated access
  • Uses session binding to prevent CSRF and browser-swapping attacks
  • Separates agentic workload from session binding service for independent scaling
  • Integrates AWS ALB OIDC authentication with Microsoft Entra ID as identity provider
  • Stores scoped OAuth tokens in AgentCore Identity Token Vault
  • Demonstrates GitHub API integration with least-privilege scoped permissions
  • Provides complete working implementation with code examples on GitHub

The solution secures AI agents across compute platforms (ECS, EKS, Lambda, on-premises) by combining inbound OIDC authentication, outbound OAuth 2.0 authorization, and cryptographic session binding to prevent unauthorized access.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Oct 14
2025
Securing AI agents with Amazon Bedrock AgentCore Identity
Mar 12
2026
Secure AI agents with Policy in Amazon Bedrock AgentCore
Jun 1
2026
Secure AI agents with Policy and Lambda interceptors in Amazon Bedrock AgentCore gateway
Aug 15
2025
Introducing Amazon Bedrock AgentCore Identity: Securing agentic AI at scale

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.