Ensure that your Amazon Bedrock AgentCore gateways are configured with an authorization type other than NONE to control access to the tools and resources exposed through those gateways. Amazon Bedrock AgentCore gateways support three inbound authorization types: AWS IAM (AWS_IAM), which validates AWS IAM identity credentials and enforces IAM policies; Custom JWT (CUSTOM_JWT), which validates JSON Web Tokens issued by a supported identity provider such as Amazon Cognito, Okta, or any OpenID Connect-compatible provider; and No Authorization (NONE), which allows any caller to invoke the gateway without any form of authentication or authorization. By default, when a gateway is created with the NONE authorization type, any entity that can reach the gateway endpoint can invoke it and interact with its targets, including calling Lambda functions, querying API Gateway endpoints, and accessing MCP servers.
When authorization is enabled, AgentCore evaluates the credentials or token presented by the caller before routing requests to any of the gateway's targets. With AWS_IAM authorization, callers must have the bedrock-agentcore:InvokeGateway permission on the specific gateway resource. With CUSTOM_JWT authorization, callers must present a valid JWT issued by the configured identity provider and meeting all claims restrictions such as allowed audiences, clients, and scopes. Either option ensures that only authenticated and authorized identities can interact with your AI agents' tooling layer through the gateway.
Enabling authorization on Amazon Bedrock AgentCore gateways is critical to preventing unauthorized access to your AI agent infrastructure. A gateway with no authorization (NONE) is effectively a public endpoint — any caller who knows or can discover the gateway URL can invoke its targets without presenting any credentials. This exposes potentially sensitive tools and backend services to unauthenticated actors, enabling unauthorized data retrieval, abuse of backend Lambda functions, and exploitation of any API endpoints registered as gateway targets.
Authorization also provides an audit trail that connects gateway invocations to specific identities. With IAM authorization, all requests are logged in AWS CloudTrail under the caller's IAM identity; with JWT authorization, the JWT subject claim is recorded in CloudTrail gateway events. This traceability is essential for incident investigation, compliance auditing, and detecting anomalous access patterns. Enabling authorization is a foundational security control that should be in place for all gateways, regardless of whether the gateway operates in development or production.
Audit
To determine if your Amazon Bedrock AgentCore gateways have authorization enabled, perform the following operations:
Remediation / Resolution
To enable authorization on your Amazon Bedrock AgentCore gateways, perform the following operations:
Amazon Bedrock AgentCore gateways support two authorization types: AWS IAM (AWS_IAM) and Custom JWT (CUSTOM_JWT). With IAM authorization, callers must hold an IAM identity with the bedrock-agentcore:InvokeGateway permission scoped to the gateway resource. With Custom JWT authorization, you must first set up a compatible identity provider (such as Amazon Cognito, Okta, Auth0, or Microsoft Entra ID) and provide the OIDC discovery URL to AgentCore. If you do not have an existing OIDC identity provider, see Option 2 in the AWS CLI remediation section below for complete instructions to set up Amazon Cognito from scratch using a machine-to-machine (M2M) client_credentials flow — the recommended approach for server-to-server (agent-invoking-gateway) scenarios. Important: The
authorizerType property of an Amazon Bedrock AgentCore gateway is immutable — it cannot be changed after the gateway has been created. If your gateway was created with authorizerType = NONE, you must delete the existing gateway and recreate it with the desired authorization type (CUSTOM_JWT or AWS_IAM). Make sure to note any existing gateway targets (Lambda functions, API Gateway endpoints, MCP servers) so you can reattach them to the new gateway. References
- AWS Documentation
- Amazon Bedrock AgentCore Gateway: Securely connect tools and other resources to your Gateway
- Set up inbound authorization for your gateway
- Prerequisites for using the Amazon Bedrock AgentCore gateway service
- Create an AgentCore gateway using the API
- Create an AgentCore gateway using the AWS Management Console
- Configure inbound JWT authorizer
- Amazon Cognito
- Resource-based policies for Amazon Bedrock AgentCore
- AWS Command Line Interface (CLI) Documentation
- list-gateways
- get-gateway
- create-gateway
- delete-gateway
- CloudFormation Documentation
- AWS::BedrockAgentCore::Gateway
- AWS::BedrockAgentCore::Gateway AuthorizerConfiguration
- AWS::BedrockAgentCore::Gateway CustomJWTAuthorizerConfiguration
- Terraform Documentation
- Data Source: aws_iam_policy_document