Ensure that your Amazon Bedrock AgentCore gateways are configured to use AWS Key Management Service (KMS) Customer-Managed Keys (CMKs) for encryption at rest instead of the default service-managed AWS managed keys. By default, Amazon Bedrock AgentCore encrypts gateway data at rest using service-managed AWS KMS keys, which are owned and operated by AWS and provide no customer control over key management lifecycle. While service-managed keys provide baseline encryption, they do not meet the stricter compliance and governance requirements that many organizations must satisfy.
When a gateway is configured with a Customer-Managed Key, the encryption key ARN is stored in the kmsKeyArn attribute of the gateway configuration. If this field is null or absent, the gateway is relying on the default service-managed AWS managed key, which does not allow customer control over key rotation schedules, access policies, or audit visibility at the individual key level. Note that for AgentCore Gateway resources, AWS managed keys are single-tenant and differ per region.
Using a CMK for Amazon Bedrock AgentCore gateway encryption grants you significantly greater control over the encryption lifecycle. With a CMK, you can rotate the key on your own schedule, control access to the key through granular IAM and KMS key policies, disable or delete the key when it is no longer needed, and audit all key usage through AWS CloudTrail and Amazon CloudWatch Logs. The gateway service role requires the kms:CreateGrant, kms:DescribeKey, kms:Decrypt, and kms:GenerateDataKey permissions on the CMK.
Using Customer-Managed Keys to encrypt Amazon Bedrock AgentCore gateways is essential for organizations with strict compliance, regulatory, or internal governance requirements, such as those operating under HIPAA, PCI-DSS, FedRAMP, or ISO 27001 frameworks. Service-managed keys provide no mechanism to restrict, audit, or revoke access to the key independently of the AWS service, meaning organizations cannot demonstrate individual key ownership or customized access control to auditors. With CMKs, security teams retain the ability to immediately revoke all access to encrypted gateway data by disabling or scheduling the deletion of the key, providing a critical incident response capability that is unavailable with service-managed encryption. Additionally, CMK usage is fully logged in AWS CloudTrail, enabling comprehensive audit trails that demonstrate who accessed or managed the key and when, which is a key control requirement in many compliance frameworks.
Audit
To determine if your Amazon Bedrock AgentCore gateways are encrypted with Customer-Managed Keys, perform the following operations:
Remediation / Resolution
To encrypt your Amazon Bedrock AgentCore gateways with a Customer-Managed Key, perform the following operations:
Before associating a CMK with a gateway, you must first create a customer-managed KMS key with the appropriate key policy that grants the gateway service role the necessary permissions (kms:CreateGrant, kms:DescribeKey, kms:Decrypt, kms:GenerateDataKey). If the key is disabled or deleted after association, access to the encrypted gateway data will be lost. For more information on creating KMS keys and key policies, see the AWS Key Management Service Developer Guide. References
- AWS Documentation
- Encrypt your AgentCore gateway with a customer-managed KMS key
- Data encryption
- Create an Amazon Bedrock AgentCore gateway
- Customer managed keys
- Create a KMS key
- KMS key access and permissions
- AWS Command Line Interface (CLI) Documentation
- list-gateways
- get-gateway
- update-gateway
- CloudFormation Documentation
- AWS::KMS::Key
- AWS::KMS::Alias
- Terraform Documentation
- Resource: aws_kms_key
- Resource: aws_kms_alias
- AWS Provider