More Info:
Bedrock Guardrails should use Customer Managed Keys for EncryptionRisk Level
HighAddress
SecurityCompliance Standards
- APRA CPS 234 (Australia)
- BSI C5 (Germany)
- Brazil LGPD
- CCPA / CPRA (California)
- CIS Critical Security Controls v8
- CMMC 2.0
- CSA Cloud Controls Matrix v4
- DPDPA
- Digital Operational Resilience Act (EU)
- ISO/IEC 27018
- ISO/IEC 27701
- MAS Technology Risk Management (Singapore)
- MITRE ATT&CK (Cloud)
- NIST SP 800-171
- NYDFS 23 NYCRR 500
- SOC2
- SWIFT Customer Security Controls Framework
- Sarbanes-Oxley IT General Controls
- StateRAMP
- UK NCSC Cyber Assessment Framework
Triage and Remediation
- Remediation
Remediation
Using Console
Using Console
To use a customer managed KMS key (CMK) for AWS Bedrock Guardrails via the AWS console, you generally need to:
- Create (or verify) a suitable KMS key
- Configure its key policy so Bedrock can use it
- Create a new Guardrail that uses that CMK (you cannot switch an existing Guardrail from AWS-owned to CMK; you must recreate it)
1. Create a customer managed KMS key
- Sign in to the AWS Management Console in the same region where your Guardrails are or will be.
- Go to Key Management Service (KMS):
Services → Key Management Service. - In the left pane, choose Customer managed keys → Create key.
- Key type: choose Symmetric.
Key usage: Encrypt and decrypt.
Click Next. - Alias: give it a meaningful name, e.g.
alias/bedrock-guardrails-cmk.
Optionally add description and tags. Click Next. - Key administrators: select IAM users/roles who can manage the key (e.g., a security admin role). Click Next.
- Key users: add the IAM roles/users that will use Bedrock and need to encrypt/decrypt data with this key (e.g. your Bedrock service role or application roles).
Click Next, then Finish to create the key.
2. Ensure KMS key policy allows Bedrock to use the key
You must allow the Bedrock service to use this key. In console terms:- In KMS, select your new key (by alias).
- Go to the Key policy tab.
- If using the default policy model (recommended), use Switch to policy view.
-
You need a statement that allows
bedrock.amazonaws.comto use the key, scoped to your account and region. If the console doesn’t provide a wizard entry for Bedrock yet, you can add something equivalent to this (adjust region and account): - Save the key policy.
3. Create a Guardrail using the CMK
Existing Bedrock Guardrails that were created with AWS-owned keys generally cannot be switched to CMK in-place; create a new Guardrail and point your applications to it.- Go to Amazon Bedrock in the console.
- In the left navigation, choose Guardrails.
- Click Create guardrail.
- Configure:
- Name, Description
- Your content filters, policies, and other settings as needed.
- Look for Encryption or Encryption key (sometimes under Advanced settings or similar, depending on UI version).
- Select Use a customer managed key (or equivalent wording).
- From the dropdown, choose the alias of the CMK you created (e.g.
alias/bedrock-guardrails-cmk). - Complete the remaining configuration and click Create.
4. Migrate usage to the new Guardrail
- Update any applications, agents, or workflows that reference the old Guardrail ID to use the new Guardrail ID.
- Test to confirm Bedrock operations using the Guardrail succeed and there are no KMS access errors (if you see
AccessDeniedExceptionfrom KMS, revisit the key policy and IAM roles).
Using CLI
Using CLI
Below are concise, AWS‑CLI–only steps to move an existing Bedrock Guardrail to use a customer‑managed KMS key (CMK) instead of the AWS‑managed key.
Note the You can then use the alias ARN:
Edit Then apply the updated policy:
You need the latest version number and current config to reuse fields.
Then run:
You should see your CMK ARN under
1. Create a Customer-Managed KMS Key
"KeyId" or "Arn" from the output (call it KMS_KEY_ID).(Optional) Create an alias:arn:aws:kms:<region>:<account-id>:alias/bedrock-guardrails-cmk2. Ensure the KMS Key Policy Allows Bedrock to Use It
Get the existing key policy:key-policy.json and add a statement like (merge with existing policy):3. Get the Existing Guardrail Configuration
4. Update the Guardrail to Use the CMK
Editguardrail.json:- Remove read-only fields such as
status,createdAt,updatedAt,arn, etc. - Keep/adjust only the editable configuration (e.g.,
name,description,topicPolicyConfig,contentPolicyConfig, etc.). - Add or update the encryption configuration to include your KMS key ARN:
5. Verify the Guardrail Now Uses the CMK
kmsKeyId.Using Python
Using Python
To use a customer-managed KMS key (CMK) for Amazon Bedrock Guardrails with Python, you need to:
Optionally, create an alias:
You can fetch and update the key policy via
Note:
If this value is your CMK ARN/alias, the guardrail is now using customer-managed keys for encryption.
- Create or choose a KMS CMK
- Add the right key policy / IAM permissions
- Create or update the guardrail with the CMK
boto3.1. Create a KMS CMK (if you don’t have one)
2. Ensure KMS key policy / IAM permissions
At minimum, allow the IAM role/user that calls Bedrock APIs to use the key forEncrypt, Decrypt, etc.Example KMS key policy statement to add (using the principal that runs your Python code, e.g. an IAM role ARN):boto3, or edit it in the console.Also ensure the principal’s IAM policy allows calling those kms:* actions on this CMK.3. Create a new guardrail using the CMK
Use the Bedrock control-plane client (bedrock or bedrock-control-plane, depending on your SDK version). Example with boto3:kmsKeyId can be a key ID, key ARN, alias name, or alias ARN; using the ARN is safest.4. Update an existing guardrail to use the CMK
If you have an existing guardrail using an AWS-managed key, update it withupdate_guardrail:update_guardrail generally requires you to provide all required configuration fields, not just kmsKeyId, so you may want to first get_guardrail and reuse its config.5. Verify encryption setting
Useget_guardrail and confirm kmsKeyId is set:
