An enterprise requires that all Generative AI model outputs are logged for compliance, but logs must not contain any PII. How can this be achieved in an AWS environment using Amazon Bedrock?
Trap 1: Write a Lambda function to strip logs before writing to S3
This adds unnecessary complexity and latency compared to native service features.
Trap 2: Use IAM policies to prevent logs from being written
This violates the enterprise requirement to have logs for compliance.
Trap 3: Use AWS CloudTrail to log API calls and enable redaction in…
CloudTrail logs metadata, not the prompt/response content itself.
- A
Write a Lambda function to strip logs before writing to S3
Why it fails: This adds unnecessary complexity and latency compared to native service features.
- B
Enable Bedrock Model Invocation Logging with Guardrails PII redaction enabled
This is the native method to log inference data while ensuring PII is stripped by the Guardrail.
- C
Use IAM policies to prevent logs from being written
Why it fails: This violates the enterprise requirement to have logs for compliance.
- D
Use AWS CloudTrail to log API calls and enable redaction in CloudWatch
Why it fails: CloudTrail logs metadata, not the prompt/response content itself.