Back to Checks
aws

Amazon Bedrock prompt is encrypted at rest with a customer-managed KMS key

bedrock_prompt_encrypted_with_cmk
Service: bedrockSeverity: medium
OfficialBuilt-inVerified
Categories:gen-aiencryption
Resource Type:Other

Bedrock prompts should be encrypted at rest with a customer-managed KMS key (CMK) rather than the AWS-owned default key. Prompts can contain sensitive instructions, business logic, and references to downstream tooling that warrant tenant-controlled key material and auditable access via AWS KMS.

Risk

A prompt encrypted only with the AWS-owned default key offers limited tenant control over key access and lifecycle: no customer KMS key policy to govern decrypt permissions, no control over rotation cadence or scheduled deletion, and gaps against frameworks (ISO 27001 A.8.24, NIST CSF PR.DS, KISA-ISMS-P 2.7.2) that require customer-managed keys for sensitive data at rest.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler aws --checks bedrock_prompt_encrypted_with_cmk

Recommendation

Encrypt every Bedrock prompt with a customer-managed KMS key to retain control over key access, rotation, and lifecycle. When using update-prompt, first retrieve the current draft and carry forward the fields you want to preserve, such as the existing description, defaultVariant, and variants, so the encryption change does not unintentionally overwrite prompt configuration.

Remediation

CLI

# Retrieve the current DRAFT prompt first and note the existing fields you want to preserve, such as description, defaultVariant, and variants:
aws bedrock-agent get-prompt --prompt-identifier <prompt_id> --prompt-version DRAFT --output json
# Then update the prompt and include the existing fields you want to keep alongside the CMK change:
aws bedrock-agent update-prompt --prompt-identifier <prompt_id> --name <prompt_name> --description <current_or_new_description> --default-variant <current_default_variant> --variants <current_or_updated_variants_json> --customer-encryption-key-arn <kms_key_arn>

Other

1Open the Amazon Bedrock console
2Navigate to Prompt management
3Select the prompt
4Edit the prompt and choose a customer-managed KMS key for encryption
5Save the prompt

Check Code

from prowler.lib.check.models import Check, Check_Report_AWS
from prowler.providers.aws.services.bedrock.bedrock_agent_client import (
    bedrock_agent_client,
)


class bedrock_prompt_encrypted_with_cmk(Check):
    """Ensure that Bedrock prompts are encrypted with a customer-managed KMS key.

    This check evaluates whether each Bedrock prompt is encrypted at rest using
    a customer-managed KMS key (CMK) rather than the AWS-owned default key.
    - PASS: The Bedrock prompt is encrypted with a customer-managed KMS key.
    - FAIL: The Bedrock prompt is not encrypted with a customer-managed KMS key.
    """

    def execute(self) -> list[Check_Report_AWS]:
        """Execute the Bedrock prompt CMK encryption check.

        Returns:
            A list of reports containing the result of the check.
        """
        findings = []
        for prompt in bedrock_agent_client.prompts.values():
            report = Check_Report_AWS(metadata=self.metadata(), resource=prompt)
            if prompt.customer_encryption_key_arn:
                report.status = "PASS"
                report.status_extended = f"Bedrock Prompt {prompt.name} is encrypted with a customer-managed KMS key."
            else:
                report.status = "FAIL"
                report.status_extended = f"Bedrock Prompt {prompt.name} is not encrypted with a customer-managed KMS key."
            findings.append(report)
        return findings