ML 21022 1
AI agents are only as powerful as the tools they can access. Whether retrieving customer data from a CRM, posting updates to Slack, or querying a GitHub repository, agents need to call external APIs, and that means securely passing credentials at runtime. Getting that right, without hardcoding secrets in code or exposing them in agent prompts, is one of the defining challenges of building production-ready agentic systems.
Amazon Bedrock AgentCore Identity meets this challenge through credential providers and a token vault that automatically create and manage a secret in AWS Secrets Manager in your account for each Outbound credential provider resource. This secret contains either the API key or client secret along with the other metadata for the external identity provider. While AgentCore Identity fully creates and manages these secrets, customers couldn’t configure custom tags, rotation policies, or customer managed AWS Key Management Service (AWS KMS) key encryption at creation time.
Today, we’re excited to announce the ability to reference a secret in AWS Secrets Manager for AgentCore Identity, so you can reference your own preconfigured secret from Secrets Manager and retain full control over how it is managed. With this ability, you can extend your organization’s existing secrets governance processes to AgentCore. You can provide an existing, preconfigured AWS Secrets Manager secret to use with your credential provider resources. You retain full control over its encryption configuration, rotation, replication, tags, and resource policies, just as you would manage other secrets in Secrets Manager. You can also choose a secret from another AWS account within the same AWS Region, though cross-Region secret sharing isn’t supported. This also supports secrets brought in through AWS Secrets Manager external connectors, enabling integration with third-party secret managers.
In this post, we will review example use cases, and walk through how to get started configuring your credential provider resources with an existing secret.
The following are example use cases:
To learn more about the secret configuration options available, see the AWS Secrets Manager User Guide.
To follow along, you need the following:
secretsmanager:GetSecretValue access to the secret.kms:Decrypt permission on that key for the service principal.To reference a secret in AWS Secrets Manager, provide the secret ARN and JSON key when creating your credential provider resources through the AgentCore Identity API. AgentCore Identity retrieves the credential value from the specified JSON key in your secret at runtime.
The following sections show how to create a credential provider resource with a referenced secret using the AWS Management Console, the AWS CLI, or an AI agent.
You can configure a referenced secret when creating new credential provider resources directly from the Amazon Bedrock AgentCore Identity console. The feature supports both API key and OAuth client credential types.
Figure 1: AgentCore Identity console, creating an Outbound Auth resource with a referenced secret.
To add an API key with a referenced secret, complete the following steps:
arn:aws:secretsmanager:us-east-1:123456789012:secret:myApiKeySecret-AbCdEf.Figure 2: AgentCore Identity console, adding an API key from Secrets Manager.
To add an OAuth client secret with a referenced secret, complete the following steps:
google-oauth-client-v5fz5).Figure 3: AgentCore Identity console, adding an OAuth client secret from Secrets Manager.
You can configure a referenced secret when creating a new Outbound Auth resource directly for an OAuth client secret from the AWS CLI as shown in the following code:
If you’re using an AI coding agent (like Kiro or similar), you can prompt it to configure a referenced secret directly:
“I have an existing secret in AWS Secrets Manager at ARN arn:aws:secretsmanager:us-east-1:123456789012:secret:my-api-key. Create an OAuth2 credential provider in Amazon Bedrock AgentCore Identity named <client-name>, using GoogleOauth2 as the vendor. The client ID is <clientId>, the client secret source is EXTERNAL, and the secret JSON key is key.”
Note: Replace <client-name> and <clientId> with your values.
Important: Give AgentCore Identity permission to read your secret by adding a resource policy to the secret that allows the service principal to call secretsmanager:GetSecretValue. If your secret is encrypted with a customer managed KMS key, also give the service principal kms:Decrypt permission on that key.
With the ability to reference a secret in AWS Secrets Manager, AgentCore Identity gives you the flexibility to use your existing secrets and secret management practices when configuring outbound auth for your AI agents. You can retain full control over how your credentials are encrypted, rotated, and accessed, while AgentCore Identity handles retrieving them at runtime.
To get started, see the Amazon Bedrock AgentCore Identity documentation. For more on secret management, see the AWS Secrets Manager User Guide.
Used Euler A and Beta 57 40 steps and 5 cfg. There might be some…
Processing millions of user reviews in real-time, under strict latency and cost constraints, is no…
The AI giant behind Claude submitted paperwork on Monday that would take it public, just…
Augmented reality (AR) devices like smart glasses may soon be able to predict where a…
EDIT: I can't believe how many great and useful replies I've got, and not a…