Document Content Analysis & Validation with Bedrock Guardrails

Here we provide the steps to set up a basic Amazon Bedrock Guardrails configuration.

Requirements

  • An AWS account. Either of the following are required:
    • The AWS access key ID and secret key.
    • An AWS Role ARN and External ID.
      • The Role will need to be given permissions for the products being used.
  • AWS Bucket used to process the files. The AWS region and the name of the bucket are required.

    The AWS Bucket used to process the files should not be used as a storage location. It's used by Guardrails to process the documents to extract the text and data.

To utilize this feature, ensure that the IAM user has write access for the following actions:

  • ListCollections

  • CreateCollection

  • CreateUser

  • IndexFaces

  • AssociateFaces

  • SearchUsers

  • DeleteFaces

You are billed directly by Amazon for the use of these features.

Bedrock Guardrails Configuration

Once you have the required information, follow these steps.

  1. Navigate to Capture.
  2. Select Adv Image Processing from the side navigation.
  3. Select the New Configuration Type drop-down.
  4. Select Amazon Bedrock Guardrails.

    New AIP configuration options.

  5. Enter a name for the Guardrails configuration in the Amazon Bedrock Guardrail Name field.
  6. Select either Key and Secret or Role Assumption for authentication.

    1. Key and Secret:
      1. AWS Access Key ID — enter the key ID for your AWS account.
      2. AWS Secret Key — enter the secret key for your account.
    2. Role Assumption:
      1. AWS Role ARN — enter the previously configured ARN.
      2. Duration (seconds) — enter a duration for the authentication to be maintained before reauthenticating.
      3. External ID — enter the External ID associated with the AWS Role Arn.
  7. Select Validate.

  8. Once the AWS account is validated complete the following:
    1. AWS Region — use the drop-down to select
    2. AWS Bucket — use the drop-down to select the bucket you created to use with Textract.
  9. Select Validate.

  10. Once the AWS Bucket is validated, complete the following:
    1. AWS Bedrock Guardrail: use the drop-down to select the guardrail that was configured on AWS.

    2. Object: use the drop-down to select the object where you want to save the content analysis value.

    3. Object Results Field: use the drop-down to select the field where you want to save the analysis value.

  11. Select Save.

New Bedrock Guardrails configuration.

The analysis values saved in the selected object field will contain the results of the denied topics from the guardrail.

For implementation of this configuration, see Scheduled AIP.