We’re excited to introduce Amazon Bedrock AgentCore Identity, a comprehensive identity and access management service purpose-built for AI agents. With AgentCore Identity AI, agent developers and administrators can securely access AWS resources and third-party tools such as GitHub, Salesforce, or Slack. AgentCore Identity provides robust identity and access management at scale so that agents can access your resources or tools either on behalf of users or themselves with pre-authorized user consent to minimize the need for custom access controls and identity infrastructure development.
As organizations deploy AI agents into production environments, they face a critical challenge: how to securely manage identity and access at scale. Applications need to authenticate users for invoking AI agents, and these agents need to access multiple tools and services, maintain audit trails, and integrate with existing enterprise identity systems—all while avoiding data leakage and maintaining compliance with organizational requirements. These requirements become exponentially more complex when agents operate across disparate systems, act on behalf of different users, and need to access resources and tools in both AWS and external third-party services.
In this post, we examine how AgentCore Identity solves these agentic AI security challenges. We start by exploring the core identity and security needs for enterprise AI agents, then dive into the architecture of AgentCore Identity for managing agent identities and credentials. We then demonstrate how to implement secure agent authentication through a practical customer support use case and conclude with best practices for enterprise-grade security at scale.
Building secure AI agents for enterprise deployment presents unique identity and access management challenges that traditional application security models weren’t designed to handle. The following diagram illustrates the areas where access control through authentication and authorization is required in a typical agentic workflow.

Let’s examine the specific security requirements that make agentic AI systems particularly complex:
When users or applications invoke an AI agent, you need to verify their identity and determine what they’re authorized to do. This inbound authentication must support multiple patterns:
AI agents need to interact with various resources and tools to accomplish tasks. This outbound authentication presents its own challenges:
Modern enterprises have invested heavily in identity infrastructure, and AI agents must integrate seamlessly:
For financial services companies and other regulated industries, every agent action must be traceable:
Without a purpose-built solution, developers spend months building custom authentication systems, implementing token vaults, managing OAuth flows, and creating audit mechanisms—all while trying to maintain security best practices.
AgentCore Identity addresses most of these challenges by providing a centralized capability for managing agent identities, securing credentials, and supporting seamless integration with AWS and third-party services through Sigv4, standardized OAuth 2.0 flows, and API keys.
The main components provided with AgentCore Identity include:
AgentCore Identity implements authentication and authorization controls that verify each request independently, requiring explicit verification for access attempts regardless of source. It integrates seamlessly with AWS services while also enabling agents to securely access external tools and services. You can use AgentCore Identity for securing access to the agents, and for securing access to the resources or tools that your agents access on behalf of users, as shown in the following diagram.

Whether you’re building simple automation scripts or complex multi-agent systems, AgentCore Identity provides the identity foundation to help your applications operate securely and efficiently.
Each agent receives a unique identity with associated metadata (such as name, Amazon Resource Name (ARN), OAuth return URLs, created time, last updated time) that can be managed centrally across your organization. This workload identity approach means agents are first-class citizens in your security architecture, not just applications masquerading as users.
AgentCore Identity implements a dual authentication approach:
The secure token vault is a key element of the security model for AgentCore Identity:
Seamless integration with the AgentCore SDK through declarative annotations such as @requires_access_token and @requires_api_key that automatically handle credential retrieval and injection, reducing boilerplate code and potential security vulnerabilities.
Let’s walk through a practical example of deploying a developer productivity agent that helps engineering teams manage their GitHub repositories, track issues, and streamline their development workflow, as shown in the following diagram.

This agent will authenticate developers using OAuth and then access GitHub to help them manage repositories, track issues, and review pull requests on their behalf. You can follow the complete example in this notebook.
First, configure your identity provider for agent users. You can use an OAuth 2.0-compatible identity provider of your choice. For this example, we use Amazon Cognito with a handy script provided in the notebook. We can then map the attributes required either directly or by relying on AWS Secrets Manager for storing and retrieving this information securely.
from bedrock_agentcore_starter_toolkit import Runtime
from boto3.session import Session
boto_session = Session()
region = boto_session.region_name
# Configure your Cognito User Pool
discovery_url = f'https://cognito-idp.{region}.amazonaws.com/{pool_id}/.well-known/openid-configuration'
client_id = 'your-cognito-app-client-id'
Configure your agent runtime to accept JWT tokens from your identity provider:
from bedrock_agentcore_starter_toolkit import Runtime
agentcore_runtime = Runtime()
response = agentcore_runtime.configure(
entrypoint="github_agent.py",
auto_create_execution_role=True,
auto_create_ecr=True,
requirements_file="requirements.txt",
region=region,
agent_name="strands_agent_github",
authorizer_configuration={
"customJWTAuthorizer": {
"discoveryUrl": discovery_url,
"allowedClients": [client_id]
}
}
)
Set up the OAuth provider to enable your agent to access GitHub services. AgentCore Identity provides preconfigured settings for popular services:
import boto3
agentcore_client = boto3.client('bedrock-agentcore-control', region_name=region)
response = agentcore_client.create_oauth2_credential_provider(
name='github-provider',
credentialProviderVendor='GithubOauth2',
oauth2ProviderConfigInput={
'githubOauth2ProviderConfig': {
'clientId': "<your-github-client-id>",
'clientSecret': "<your-github-client-secret>"
}
}
)
Create tools with AgentCore SDK annotations to automatically handle the three-legged OAuth process. The @requires_access_token decorator manages the entire OAuth flow, including user consent. You can check the full code for this example in the notebook, but we highlight the key parts in the snippet below:
from bedrock_agentcore import BedrockAgentCoreApp
from bedrock_agentcore.identity.auth import requires_access_token
from strands import Agent, tool
# Global token storage
github_access_token = None
app = BedrockAgentCoreApp()
@tool
def inspect_github_repos() -> str:
"""Tool that requires authentication to access private repos."""
global github_access_token
# Check if authentication is required
if not github_access_token:
return "Authentication required for GitHub access"
# Use token for authenticated API calls
headers = {"Authorization": f"Bearer {github_access_token}"}
### ... code for making authenticated requests with GitHub APIs ...
async def agent_task(user_message: str) -> None:
"""Main agent logic with authentication handling."""
global github_access_token
# Initial agent call
response = agent(user_message)
# Check if authentication is needed
if "Authentication required" in str(response.message):
# Trigger authentication flow
github_access_token = await need_token_3LO_async(access_token='')
# Retry with authentication
response = agent(user_message)
@requires_access_token(
provider_name="github-provider",
scopes=["repo", "read:user"],
auth_flow='USER_FEDERATION',
force_authentication=True,
)
async def need_token_3LO_async(*, access_token: str) -> str:
"""Handle OAuth authentication flow."""
global github_access_token
github_access_token = access_token
return access_token
# Create agent with authentication-aware tool
agent = Agent(
model="us.anthropic.claude-3-7-sonnet-20250219-v1:0",
tools=[inspect_github_repos]
)
@app.entrypoint
async def agent_invocation(payload):
"""Main entrypoint."""
user_message = payload.get("prompt", "...")
await agent_task(user_message)
### ... Code for returning responses ...
Deploy your agent using the AgentCore CLI:
bedrock-agentcore runtime launch
When users invoke your agent with their JWT token, AgentCore Identity will:
Let’s explore a demonstration of how an application would look like for this example.
As you can see, the agent seamlessly authenticates users and accesses their GitHub repositories without exposing credentials or requiring manual token management. The entire OAuth flow, including user consent and secure token storage, is handled automatically by AgentCore Identity.
Once you’ve completed the example provided, you can clean up the resources with the commands below to avoid unnecessary charges in your account. Remember to replace the provider ID with your own ID.
# Delete the agent runtime
bedrock-agentcore runtime delete --agent-name github-support-agent
# Delete the OAuth credential provider
aws bedrock-agentcore-identity delete-oauth-credential-provider
--provider-id <provider-id>
AgentCore Identity is designed to work seamlessly with the broader AgentCore environment and your existing identity infrastructure.
AgentCore Identity supports OAuth 2.0 or OpenID Connect-compatible identity providers, and providers accessible through API keys. For example, Amazon Cognito, Okta, and Microsoft Entra ID, among others.
Customers who use AgentCore Identity through either AgentCore Runtime or AgentCore Gateway, do not incur any additional charges for their use of AgentCore Identity. For other scenarios, you pay for only what you use and are charged based on the number of requests from the agent to AgentCore Identity for an OAuth token or an API key. For more information on pricing, refer to the AgentCore public pricing.
When implementing AgentCore Identity, follow these security best practices:
Minimize security risks by restricting agent access to only essential resources and capabilities:
Establish clear identity verification and management protocols for both human users and AI agents:
Protect authentication credentials through proper token lifecycle management:
force_authentication=True for sensitive operationsMaintain visibility into agent activities to detect anomalies and ensure compliance with organizational requirements:
For software as a service (SaaS) providers and multi-tenant environments:
Amazon Bedrock AgentCore Identity transforms how organizations secure AI agents at scale. By providing purpose-built identity and access management, it extinguishes months of custom development while providing enterprise-grade security. The service’s dual authentication model, secure token vault, and seamless integration with existing identity providers make it possible to deploy agents that can safely operate across organizational boundaries and access diverse resources .As AI agents become more prevalent in enterprise environments, the need for robust identity and access management will only grow. AgentCore Identity provides the foundation for this future, enabling organizations to build agents that are not just intelligent, but also secure, compliance-aligned, and trustworthy.
Ready to secure your AI agents with AgentCore Identity? Here are your next steps:
Start building secure, scalable AI agents today with Amazon Bedrock AgentCore Identity. Transform your proof-of-concept into production-ready systems that meet the highest enterprise security standards.
Rahul Sharma is a Principal Product Manager-Technical at Amazon Web Services with over 5 years of cumulative product management experience spanning Customer Identity and Access Management (CIAM), Infrastructure as Code (IaC), and most recently the agent identity space.
Fei Yuan is a Principal Engineer at AWS. During his 20+ years of experience, Fei has led different teams through various projects across Amazon and AWS, such as Amazon Lending Marketplace, Amazon Payment Services, Alexa ML Secure Computing, Amazon DataZone, Amazon SageMaker data governance, and Amazon Cognito. Most recently, he led the team that launched Amazon Bedrock AgentCore Identity service. Today he focuses on designing and implementing AWS products in the areas of agent identity, workload identity, and customer identity and access management.
Satveer Khurpa is a Sr. WW Specialist Solutions Architect, Amazon Bedrock at Amazon Web Services, specializing in Amazon Bedrock security. In this role, he uses his expertise in cloud-based architectures to develop innovative generative AI solutions for clients across diverse industries. Satveer uses his deep understanding of generative AI technologies and security principles to design scalable, secure, and responsible applications that unlock new business opportunities and drive tangible value while maintaining robust security postures.
Antonio Rodriguez is a Principal Generative AI Specialist Solutions Architect at Amazon Web Services. He helps companies of all sizes solve their challenges, embrace innovation, and create new business opportunities with Amazon Bedrock. Apart from work, he loves to spend time with his family and play sports with his friends.
Manuel Rioux est fièrement propulsé par WordPress