-
Notifications
You must be signed in to change notification settings - Fork 69
Description
Describe the bug
Bedrock Guardrail piiFilters
seem to only be enabled on the output side by default (which I would argue is probably a wrong/counter-intuitive choice), and also setting inputEnabled: true
doesn't seem to do anything?
Expected Behavior
1/ Given a Bedrock Guardrail is created with a PII filter which doesn't specify either inputEnabled
or outputEnabled
, I'd suggest (regardless of underlying CloudFormation behaviour) that enabling on both sides would be a sensible and maximally-secure default for the construct. For e.g:
new bedrock.Guardrail(this, "MyGuardrail", {
piiFilters: [
{
action: bedrock.GuardrailAction.ANONYMIZE,
type: bedrock.PIIType.General.EMAIL,
},
]
});
2/ When I explicitly specify inputEnabled
, I'd certainly expect the PII filter to be enabled on the input side:
new bedrock.Guardrail(this, "MyGuardrail", {
piiFilters: [
{
action: bedrock.GuardrailAction.ANONYMIZE,
inputEnabled: true,
type: bedrock.PIIType.General.EMAIL,
},
]
});
Current Behavior
In both the above cases, the above deployed guardrail's PII filter has output action Mask
and input action disabled
Reproduction Steps
Code snippet above
Possible Solution
I don't see the construct doing anything particularly weird on CDK side here, so maybe the issue is that the underlying CloudFormation interface behaves weirdly and we should consider improving the abstraction the CDK provides?
Additional Information/Context
No response
CDK CLI Version
2.1007.0
Framework Version
0.1.309
Node.js Version
22.15.1
OS
macOS
Language
Typescript
Language Version
No response
Region experiencing the issue
us-west-2
Code modification
No
Other information
No response
Service quota
- I have reviewed the service quotas for this construct
Metadata
Metadata
Assignees
Labels
Type
Projects
Status