Skip to content

@cdklabs/genai-idp-bda-processor

Constructs

BdaMetadataTable

A DynamoDB table for storing BDA processing metadata.

This table uses a composite key (execution_id, record_number) to efficiently store and query metadata about individual records processed by Bedrock Data Automation. The table design supports tracking the processing status and results of each document record within a BDA execution.

Key features: - Partition key: execution_id (String) - identifies the BDA execution - Sort key: record_number (Number) - identifies individual records within the execution - TTL enabled with ExpiresAfter attribute for automatic cleanup - Point-in-time recovery enabled for data protection - KMS encryption for data security

Initializers

import { BdaMetadataTable } from '@cdklabs/genai-idp-bda-processor'

new BdaMetadataTable(scope: Construct, id: string, props?: BdaMetadataTableProps)
Name Type Description
scope constructs.Construct The construct scope.
id string The construct ID.
props BdaMetadataTableProps Configuration properties for the DynamoDB table.

scopeRequired
  • Type: constructs.Construct

The construct scope.


idRequired
  • Type: string

The construct ID.


propsOptional

Configuration properties for the DynamoDB table.


Methods

Name Description
toString Returns a string representation of this construct.
applyRemovalPolicy Apply the given removal policy to this resource.
addToResourcePolicy Adds a statement to the resource policy associated with this file system.
grant Adds an IAM policy statement associated with this table to an IAM principal's policy.
grantFullAccess Permits all DynamoDB operations ("dynamodb:*") to an IAM principal.
grantReadData Permits an IAM principal all data read operations from this table: BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, DescribeTable.
grantReadWriteData Permits an IAM principal to all data read/write operations to this table.
grantStream Adds an IAM policy statement associated with this table's stream to an IAM principal's policy.
grantStreamRead Permits an IAM principal all stream data read operations for this table's stream: DescribeStream, GetRecords, GetShardIterator, ListStreams.
grantTableListStreams Permits an IAM Principal to list streams attached to current dynamodb table.
grantWriteData Permits an IAM principal all data write operations to this table: BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable.
metric Return the given named metric for this Table.
metricConditionalCheckFailedRequests Metric for the conditional check failed requests this table.
metricConsumedReadCapacityUnits Metric for the consumed read capacity units this table.
metricConsumedWriteCapacityUnits Metric for the consumed write capacity units this table.
metricSuccessfulRequestLatency Metric for the successful request latency this table.
metricSystemErrors Metric for the system errors this table.
metricSystemErrorsForOperations Metric for the system errors this table.
metricThrottledRequests How many requests are throttled on this table.
metricThrottledRequestsForOperation How many requests are throttled on this table, for the given operation.
metricThrottledRequestsForOperations How many requests are throttled on this table.
metricUserErrors Metric for the user errors.
addGlobalSecondaryIndex Add a global secondary index of table.
addLocalSecondaryIndex Add a local secondary index of table.
autoScaleGlobalSecondaryIndexReadCapacity Enable read capacity scaling for the given GSI.
autoScaleGlobalSecondaryIndexWriteCapacity Enable write capacity scaling for the given GSI.
autoScaleReadCapacity Enable read capacity scaling for this table.
autoScaleWriteCapacity Enable write capacity scaling for this table.
schema Get schema attributes of table or index.

toString
public toString(): string

Returns a string representation of this construct.

applyRemovalPolicy
public applyRemovalPolicy(policy: RemovalPolicy): void

Apply the given removal policy to this resource.

The Removal Policy controls what happens to this resource when it stops being managed by CloudFormation, either because you've removed it from the CDK application or because you've made a change that requires the resource to be replaced.

The resource can be deleted (RemovalPolicy.DESTROY), or left in your AWS account for data recovery and cleanup later (RemovalPolicy.RETAIN).

policyRequired
  • Type: aws-cdk-lib.RemovalPolicy

addToResourcePolicy
public addToResourcePolicy(statement: PolicyStatement): AddToResourcePolicyResult

Adds a statement to the resource policy associated with this file system.

A resource policy will be automatically created upon the first call to addToResourcePolicy.

Note that this does not work with imported file systems.

statementRequired
  • Type: aws-cdk-lib.aws_iam.PolicyStatement

The policy statement to add.


grant
public grant(grantee: IGrantable, actions: ...string[]): Grant

Adds an IAM policy statement associated with this table to an IAM principal's policy.

If encryptionKey is present, appropriate grants to the key needs to be added separately using the table.encryptionKey.grant* methods.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

The principal (no-op if undefined).


actionsRequired
  • Type: ...string[]

The set of actions to allow (i.e. "dynamodb:PutItem", "dynamodb:GetItem", ...).


grantFullAccess
public grantFullAccess(grantee: IGrantable): Grant

Permits all DynamoDB operations ("dynamodb:*") to an IAM principal.

Appropriate grants will also be added to the customer-managed KMS key if one was configured.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

The principal to grant access to.


grantReadData
public grantReadData(grantee: IGrantable): Grant

Permits an IAM principal all data read operations from this table: BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, DescribeTable.

Appropriate grants will also be added to the customer-managed KMS key if one was configured.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

The principal to grant access to.


grantReadWriteData
public grantReadWriteData(grantee: IGrantable): Grant

Permits an IAM principal to all data read/write operations to this table.

BatchGetItem, GetRecords, GetShardIterator, Query, GetItem, Scan, BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable

Appropriate grants will also be added to the customer-managed KMS key if one was configured.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

The principal to grant access to.


grantStream
public grantStream(grantee: IGrantable, actions: ...string[]): Grant

Adds an IAM policy statement associated with this table's stream to an IAM principal's policy.

If encryptionKey is present, appropriate grants to the key needs to be added separately using the table.encryptionKey.grant* methods.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

The principal (no-op if undefined).


actionsRequired
  • Type: ...string[]

The set of actions to allow (i.e. "dynamodb:DescribeStream", "dynamodb:GetRecords", ...).


grantStreamRead
public grantStreamRead(grantee: IGrantable): Grant

Permits an IAM principal all stream data read operations for this table's stream: DescribeStream, GetRecords, GetShardIterator, ListStreams.

Appropriate grants will also be added to the customer-managed KMS key if one was configured.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

The principal to grant access to.


grantTableListStreams
public grantTableListStreams(grantee: IGrantable): Grant

Permits an IAM Principal to list streams attached to current dynamodb table.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

The principal (no-op if undefined).


grantWriteData
public grantWriteData(grantee: IGrantable): Grant

Permits an IAM principal all data write operations to this table: BatchWriteItem, PutItem, UpdateItem, DeleteItem, DescribeTable.

Appropriate grants will also be added to the customer-managed KMS key if one was configured.

granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

The principal to grant access to.


metric
public metric(metricName: string, props?: MetricOptions): Metric

Return the given named metric for this Table.

By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the statistic and period properties.

metricNameRequired
  • Type: string

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

metricConditionalCheckFailedRequests
public metricConditionalCheckFailedRequests(props?: MetricOptions): Metric

Metric for the conditional check failed requests this table.

By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the statistic and period properties.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

metricConsumedReadCapacityUnits
public metricConsumedReadCapacityUnits(props?: MetricOptions): Metric

Metric for the consumed read capacity units this table.

By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the statistic and period properties.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

metricConsumedWriteCapacityUnits
public metricConsumedWriteCapacityUnits(props?: MetricOptions): Metric

Metric for the consumed write capacity units this table.

By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the statistic and period properties.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

metricSuccessfulRequestLatency
public metricSuccessfulRequestLatency(props?: MetricOptions): Metric

Metric for the successful request latency this table.

By default, the metric will be calculated as an average over a period of 5 minutes. You can customize this by using the statistic and period properties.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

~~metricSystemErrors~~
public metricSystemErrors(props?: MetricOptions): Metric

Metric for the system errors this table.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

metricSystemErrorsForOperations
public metricSystemErrorsForOperations(props?: SystemErrorsForOperationsMetricOptions): IMetric

Metric for the system errors this table.

This will sum errors across all possible operations. Note that by default, each individual metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the statistic and period properties.

propsOptional
  • Type: aws-cdk-lib.aws_dynamodb.SystemErrorsForOperationsMetricOptions

~~metricThrottledRequests~~
public metricThrottledRequests(props?: MetricOptions): Metric

How many requests are throttled on this table.

Default: sum over 5 minutes

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

metricThrottledRequestsForOperation
public metricThrottledRequestsForOperation(operation: string, props?: MetricOptions): Metric

How many requests are throttled on this table, for the given operation.

Default: sum over 5 minutes

operationRequired
  • Type: string

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

metricThrottledRequestsForOperations
public metricThrottledRequestsForOperations(props?: OperationsMetricOptions): IMetric

How many requests are throttled on this table.

This will sum errors across all possible operations. Note that by default, each individual metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the statistic and period properties.

propsOptional
  • Type: aws-cdk-lib.aws_dynamodb.OperationsMetricOptions

metricUserErrors
public metricUserErrors(props?: MetricOptions): Metric

Metric for the user errors.

Note that this metric reports user errors across all the tables in the account and region the table resides in.

By default, the metric will be calculated as a sum over a period of 5 minutes. You can customize this by using the statistic and period properties.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

addGlobalSecondaryIndex
public addGlobalSecondaryIndex(props: GlobalSecondaryIndexProps): void

Add a global secondary index of table.

propsRequired
  • Type: aws-cdk-lib.aws_dynamodb.GlobalSecondaryIndexProps

the property of global secondary index.


addLocalSecondaryIndex
public addLocalSecondaryIndex(props: LocalSecondaryIndexProps): void

Add a local secondary index of table.

propsRequired
  • Type: aws-cdk-lib.aws_dynamodb.LocalSecondaryIndexProps

the property of local secondary index.


autoScaleGlobalSecondaryIndexReadCapacity
public autoScaleGlobalSecondaryIndexReadCapacity(indexName: string, props: EnableScalingProps): IScalableTableAttribute

Enable read capacity scaling for the given GSI.

indexNameRequired
  • Type: string

propsRequired
  • Type: aws-cdk-lib.aws_dynamodb.EnableScalingProps

autoScaleGlobalSecondaryIndexWriteCapacity
public autoScaleGlobalSecondaryIndexWriteCapacity(indexName: string, props: EnableScalingProps): IScalableTableAttribute

Enable write capacity scaling for the given GSI.

indexNameRequired
  • Type: string

propsRequired
  • Type: aws-cdk-lib.aws_dynamodb.EnableScalingProps

autoScaleReadCapacity
public autoScaleReadCapacity(props: EnableScalingProps): IScalableTableAttribute

Enable read capacity scaling for this table.

propsRequired
  • Type: aws-cdk-lib.aws_dynamodb.EnableScalingProps

autoScaleWriteCapacity
public autoScaleWriteCapacity(props: EnableScalingProps): IScalableTableAttribute

Enable write capacity scaling for this table.

propsRequired
  • Type: aws-cdk-lib.aws_dynamodb.EnableScalingProps

schema
public schema(indexName?: string): SchemaOptions

Get schema attributes of table or index.

indexNameOptional
  • Type: string

Static Functions

Name Description
isConstruct Checks if x is a construct.
isOwnedResource Returns true if the construct was created by CDK, and false otherwise.
isResource Check whether the given construct is a Resource.
fromTableArn Creates a Table construct that represents an external table via table arn.
fromTableAttributes Creates a Table construct that represents an external table.
fromTableName Creates a Table construct that represents an external table via table name.

isConstruct
import { BdaMetadataTable } from '@cdklabs/genai-idp-bda-processor'

BdaMetadataTable.isConstruct(x: any)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

xRequired
  • Type: any

Any object.


isOwnedResource
import { BdaMetadataTable } from '@cdklabs/genai-idp-bda-processor'

BdaMetadataTable.isOwnedResource(construct: IConstruct)

Returns true if the construct was created by CDK, and false otherwise.

constructRequired
  • Type: constructs.IConstruct

isResource
import { BdaMetadataTable } from '@cdklabs/genai-idp-bda-processor'

BdaMetadataTable.isResource(construct: IConstruct)

Check whether the given construct is a Resource.

constructRequired
  • Type: constructs.IConstruct

fromTableArn
import { BdaMetadataTable } from '@cdklabs/genai-idp-bda-processor'

BdaMetadataTable.fromTableArn(scope: Construct, id: string, tableArn: string)

Creates a Table construct that represents an external table via table arn.

scopeRequired
  • Type: constructs.Construct

The parent creating construct (usually this).


idRequired
  • Type: string

The construct's name.


tableArnRequired
  • Type: string

The table's ARN.


fromTableAttributes
import { BdaMetadataTable } from '@cdklabs/genai-idp-bda-processor'

BdaMetadataTable.fromTableAttributes(scope: Construct, id: string, attrs: TableAttributes)

Creates a Table construct that represents an external table.

scopeRequired
  • Type: constructs.Construct

The parent creating construct (usually this).


idRequired
  • Type: string

The construct's name.


attrsRequired
  • Type: aws-cdk-lib.aws_dynamodb.TableAttributes

A TableAttributes object.


fromTableName
import { BdaMetadataTable } from '@cdklabs/genai-idp-bda-processor'

BdaMetadataTable.fromTableName(scope: Construct, id: string, tableName: string)

Creates a Table construct that represents an external table via table name.

scopeRequired
  • Type: constructs.Construct

The parent creating construct (usually this).


idRequired
  • Type: string

The construct's name.


tableNameRequired
  • Type: string

The table's name.


Properties

Name Type Description
node constructs.Node The tree node.
env aws-cdk-lib.ResourceEnvironment The environment this resource belongs to.
stack aws-cdk-lib.Stack The stack in which this resource is defined.
tableArn string Arn of the dynamodb table.
tableName string Table name of the dynamodb table.
encryptionKey aws-cdk-lib.aws_kms.IKey KMS encryption key, if this table uses a customer-managed encryption key.
tableStreamArn string ARN of the table's stream, if there is one.
resourcePolicy aws-cdk-lib.aws_iam.PolicyDocument Resource policy to assign to DynamoDB Table.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


envRequired
public readonly env: ResourceEnvironment;
  • Type: aws-cdk-lib.ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


stackRequired
public readonly stack: Stack;
  • Type: aws-cdk-lib.Stack

The stack in which this resource is defined.


tableArnRequired
public readonly tableArn: string;
  • Type: string

Arn of the dynamodb table.


tableNameRequired
public readonly tableName: string;
  • Type: string

Table name of the dynamodb table.


encryptionKeyOptional
public readonly encryptionKey: IKey;
  • Type: aws-cdk-lib.aws_kms.IKey

KMS encryption key, if this table uses a customer-managed encryption key.


tableStreamArnOptional
public readonly tableStreamArn: string;
  • Type: string

ARN of the table's stream, if there is one.


resourcePolicyOptional
public readonly resourcePolicy: PolicyDocument;
  • Type: aws-cdk-lib.aws_iam.PolicyDocument
  • Default: No resource policy statements are added to the created table.

Resource policy to assign to DynamoDB Table.

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-dynamodb-table-resourcepolicy.html


Constants

Name Type Description
PROPERTY_INJECTION_ID string Uniquely identifies this class.

PROPERTY_INJECTION_IDRequired
public readonly PROPERTY_INJECTION_ID: string;
  • Type: string

Uniquely identifies this class.


BdaProcessor

Initializers

import { BdaProcessor } from '@cdklabs/genai-idp-bda-processor'

new BdaProcessor(scope: Construct, id: string, props: BdaProcessorProps)
Name Type Description
scope constructs.Construct No description.
id string No description.
props BdaProcessorProps No description.

scopeRequired
  • Type: constructs.Construct

idRequired
  • Type: string

propsRequired

Methods

Name Description
toString Returns a string representation of this construct.
metricBdaJobsFailed Creates a CloudWatch metric for failed BDA jobs.
metricBdaJobsSucceeded Creates a CloudWatch metric for successful BDA jobs.
metricBdaJobsTotal Creates a CloudWatch metric for total BDA jobs.
metricBdaRequestLatency Creates a CloudWatch metric for BDA request latency.
metricBdaRequestsFailed Creates a CloudWatch metric for failed BDA requests.
metricBdaRequestsMaxRetriesExceeded Creates a CloudWatch metric for BDA requests that exceeded max retries.
metricBdaRequestsNonRetryableErrors Creates a CloudWatch metric for BDA non-retryable errors.
metricBdaRequestsRetrySuccess Creates a CloudWatch metric for successful BDA request retries.
metricBdaRequestsSucceeded Creates a CloudWatch metric for successful BDA requests.
metricBdaRequestsThrottles Creates a CloudWatch metric for BDA request throttles.
metricBdaRequestsTotal Creates a CloudWatch metric for total BDA requests.
metricBdaRequestsTotalLatency Creates a CloudWatch metric for total BDA request latency.
metricBdaRequestsUnexpectedErrors Creates a CloudWatch metric for BDA unexpected errors.
metricProcessedCustomPages Creates a CloudWatch metric for processed custom pages.
metricProcessedDocuments Creates a CloudWatch metric for processed documents.
metricProcessedPages Creates a CloudWatch metric for processed pages.
metricProcessedStandardPages Creates a CloudWatch metric for processed standard pages.

toString
public toString(): string

Returns a string representation of this construct.

metricBdaJobsFailed
public metricBdaJobsFailed(props?: MetricOptions): Metric

Creates a CloudWatch metric for failed BDA jobs.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricBdaJobsSucceeded
public metricBdaJobsSucceeded(props?: MetricOptions): Metric

Creates a CloudWatch metric for successful BDA jobs.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricBdaJobsTotal
public metricBdaJobsTotal(props?: MetricOptions): Metric

Creates a CloudWatch metric for total BDA jobs.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricBdaRequestLatency
public metricBdaRequestLatency(props?: MetricOptions): Metric

Creates a CloudWatch metric for BDA request latency.

Measures individual request processing time.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricBdaRequestsFailed
public metricBdaRequestsFailed(props?: MetricOptions): Metric

Creates a CloudWatch metric for failed BDA requests.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricBdaRequestsMaxRetriesExceeded
public metricBdaRequestsMaxRetriesExceeded(props?: MetricOptions): Metric

Creates a CloudWatch metric for BDA requests that exceeded max retries.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricBdaRequestsNonRetryableErrors
public metricBdaRequestsNonRetryableErrors(props?: MetricOptions): Metric

Creates a CloudWatch metric for BDA non-retryable errors.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricBdaRequestsRetrySuccess
public metricBdaRequestsRetrySuccess(props?: MetricOptions): Metric

Creates a CloudWatch metric for successful BDA request retries.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricBdaRequestsSucceeded
public metricBdaRequestsSucceeded(props?: MetricOptions): Metric

Creates a CloudWatch metric for successful BDA requests.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricBdaRequestsThrottles
public metricBdaRequestsThrottles(props?: MetricOptions): Metric

Creates a CloudWatch metric for BDA request throttles.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricBdaRequestsTotal
public metricBdaRequestsTotal(props?: MetricOptions): Metric

Creates a CloudWatch metric for total BDA requests.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricBdaRequestsTotalLatency
public metricBdaRequestsTotalLatency(props?: MetricOptions): Metric

Creates a CloudWatch metric for total BDA request latency.

Measures total request processing time including retries.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricBdaRequestsUnexpectedErrors
public metricBdaRequestsUnexpectedErrors(props?: MetricOptions): Metric

Creates a CloudWatch metric for BDA unexpected errors.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricProcessedCustomPages
public metricProcessedCustomPages(props?: MetricOptions): Metric

Creates a CloudWatch metric for processed custom pages.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricProcessedDocuments
public metricProcessedDocuments(props?: MetricOptions): Metric

Creates a CloudWatch metric for processed documents.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricProcessedPages
public metricProcessedPages(props?: MetricOptions): Metric

Creates a CloudWatch metric for processed pages.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


metricProcessedStandardPages
public metricProcessedStandardPages(props?: MetricOptions): Metric

Creates a CloudWatch metric for processed standard pages.

propsOptional
  • Type: aws-cdk-lib.aws_cloudwatch.MetricOptions

Optional metric configuration properties.


Static Functions

Name Description
isConstruct Checks if x is a construct.

isConstruct
import { BdaProcessor } from '@cdklabs/genai-idp-bda-processor'

BdaProcessor.isConstruct(x: any)

Checks if x is a construct.

Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked.

Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

xRequired
  • Type: any

Any object.


Properties

Name Type Description
node constructs.Node The tree node.
environment @cdklabs/genai-idp.IProcessingEnvironment The processing environment that provides shared infrastructure and services.
maxProcessingConcurrency number The maximum number of documents that can be processed concurrently.
stateMachine aws-cdk-lib.aws_stepfunctions.IStateMachine The Step Functions state machine that orchestrates the document processing workflow.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


environmentRequired
public readonly environment: IProcessingEnvironment;
  • Type: @cdklabs/genai-idp.IProcessingEnvironment

The processing environment that provides shared infrastructure and services.

Contains input/output buckets, tracking tables, API endpoints, and other resources needed for document processing operations.


maxProcessingConcurrencyRequired
public readonly maxProcessingConcurrency: number;
  • Type: number

The maximum number of documents that can be processed concurrently.

Controls the throughput and resource utilization of the document processing system.


stateMachineRequired
public readonly stateMachine: IStateMachine;
  • Type: aws-cdk-lib.aws_stepfunctions.IStateMachine

The Step Functions state machine that orchestrates the document processing workflow.

Manages the sequence of processing steps and handles error conditions. This state machine is triggered for each document that needs processing and coordinates the entire extraction pipeline.


Structs

BdaMetadataTableProps

Properties for the BDA Metadata Table.

Uses the same FixedKeyTableProps pattern as other tables in the genai-idp package.

Initializer

import { BdaMetadataTableProps } from '@cdklabs/genai-idp-bda-processor'

const bdaMetadataTableProps: BdaMetadataTableProps = { ... }

Properties

Name Type Description
billingMode aws-cdk-lib.aws_dynamodb.BillingMode Specify how you are charged for read and write throughput and how you manage capacity.
contributorInsightsEnabled boolean Whether CloudWatch contributor insights is enabled.
contributorInsightsSpecification aws-cdk-lib.aws_dynamodb.ContributorInsightsSpecification Whether CloudWatch contributor insights is enabled and what mode is selected.
deletionProtection boolean Enables deletion protection for the table.
encryption aws-cdk-lib.aws_dynamodb.TableEncryption Whether server-side encryption with an AWS managed customer master key is enabled.
encryptionKey aws-cdk-lib.aws_kms.IKey External KMS key to use for table encryption.
importSource aws-cdk-lib.aws_dynamodb.ImportSourceSpecification The properties of data being imported from the S3 bucket source to the table.
kinesisPrecisionTimestamp aws-cdk-lib.aws_dynamodb.ApproximateCreationDateTimePrecision Kinesis Data Stream approximate creation timestamp precision.
kinesisStream aws-cdk-lib.aws_kinesis.IStream Kinesis Data Stream to capture item-level changes for the table.
maxReadRequestUnits number The maximum read request units for the table.
maxWriteRequestUnits number The write request units for the table.
pointInTimeRecovery boolean Whether point-in-time recovery is enabled.
pointInTimeRecoverySpecification aws-cdk-lib.aws_dynamodb.PointInTimeRecoverySpecification Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.
readCapacity number The read capacity for the table. Careful if you add Global Secondary Indexes, as those will share the table's provisioned throughput.
removalPolicy aws-cdk-lib.RemovalPolicy The removal policy to apply to the DynamoDB Table.
replicaRemovalPolicy aws-cdk-lib.RemovalPolicy The removal policy to apply to the DynamoDB replica tables.
replicationRegions string[] Regions where replica tables will be created.
replicationTimeout aws-cdk-lib.Duration The timeout for a table replication operation in a single region.
resourcePolicy aws-cdk-lib.aws_iam.PolicyDocument Resource policy to assign to table.
stream aws-cdk-lib.aws_dynamodb.StreamViewType When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.
tableClass aws-cdk-lib.aws_dynamodb.TableClass Specify the table class.
tableName string Enforces a particular physical table name.
waitForReplicationToFinish boolean [WARNING: Use this flag with caution, misusing this flag may cause deleting existing replicas, refer to the detailed documentation for more information] Indicates whether CloudFormation stack waits for replication to finish.
warmThroughput aws-cdk-lib.aws_dynamodb.WarmThroughput Specify values to pre-warm you DynamoDB Table Warm Throughput feature is not available for Global Table replicas using the Table construct.
writeCapacity number The write capacity for the table. Careful if you add Global Secondary Indexes, as those will share the table's provisioned throughput.

billingModeOptional
public readonly billingMode: BillingMode;
  • Type: aws-cdk-lib.aws_dynamodb.BillingMode
  • Default: PROVISIONED if replicationRegions is not specified, PAY_PER_REQUEST otherwise

Specify how you are charged for read and write throughput and how you manage capacity.


~~contributorInsightsEnabled~~Optional
  • Deprecated: use `contributorInsightsSpecification instead
public readonly contributorInsightsEnabled: boolean;
  • Type: boolean
  • Default: false

Whether CloudWatch contributor insights is enabled.


contributorInsightsSpecificationOptional
public readonly contributorInsightsSpecification: ContributorInsightsSpecification;
  • Type: aws-cdk-lib.aws_dynamodb.ContributorInsightsSpecification
  • Default: contributor insights is not enabled

Whether CloudWatch contributor insights is enabled and what mode is selected.


deletionProtectionOptional
public readonly deletionProtection: boolean;
  • Type: boolean
  • Default: false

Enables deletion protection for the table.


encryptionOptional
public readonly encryption: TableEncryption;
  • Type: aws-cdk-lib.aws_dynamodb.TableEncryption
  • Default: The table is encrypted with an encryption key managed by DynamoDB, and you are not charged any fee for using it.

Whether server-side encryption with an AWS managed customer master key is enabled.

This property cannot be set if serverSideEncryption is set.

NOTE: if you set this to CUSTOMER_MANAGED and encryptionKey is not specified, the key that the Tablet generates for you will be created with default permissions. If you are using CDKv2, these permissions will be sufficient to enable the key for use with DynamoDB tables. If you are using CDKv1, make sure the feature flag @aws-cdk/aws-kms:defaultKeyPolicies is set to true in your cdk.json.


encryptionKeyOptional
public readonly encryptionKey: IKey;
  • Type: aws-cdk-lib.aws_kms.IKey
  • Default: If encryption is set to TableEncryption.CUSTOMER_MANAGED and this property is undefined, a new KMS key will be created and associated with this table. If encryption and this property are both undefined, then the table is encrypted with an encryption key managed by DynamoDB, and you are not charged any fee for using it.

External KMS key to use for table encryption.

This property can only be set if encryption is set to TableEncryption.CUSTOMER_MANAGED.


importSourceOptional
public readonly importSource: ImportSourceSpecification;
  • Type: aws-cdk-lib.aws_dynamodb.ImportSourceSpecification
  • Default: no data import from the S3 bucket

The properties of data being imported from the S3 bucket source to the table.


kinesisPrecisionTimestampOptional
public readonly kinesisPrecisionTimestamp: ApproximateCreationDateTimePrecision;
  • Type: aws-cdk-lib.aws_dynamodb.ApproximateCreationDateTimePrecision
  • Default: ApproximateCreationDateTimePrecision.MICROSECOND

Kinesis Data Stream approximate creation timestamp precision.


kinesisStreamOptional
public readonly kinesisStream: IStream;
  • Type: aws-cdk-lib.aws_kinesis.IStream
  • Default: no Kinesis Data Stream

Kinesis Data Stream to capture item-level changes for the table.


maxReadRequestUnitsOptional
public readonly maxReadRequestUnits: number;
  • Type: number
  • Default: on-demand throughput is disabled

The maximum read request units for the table.

Careful if you add Global Secondary Indexes, as those will share the table's maximum on-demand throughput.

Can only be provided if billingMode is PAY_PER_REQUEST.


maxWriteRequestUnitsOptional
public readonly maxWriteRequestUnits: number;
  • Type: number
  • Default: on-demand throughput is disabled

The write request units for the table.

Careful if you add Global Secondary Indexes, as those will share the table's maximum on-demand throughput.

Can only be provided if billingMode is PAY_PER_REQUEST.


~~pointInTimeRecovery~~Optional
  • Deprecated: use pointInTimeRecoverySpecification instead
public readonly pointInTimeRecovery: boolean;
  • Type: boolean
  • Default: false - point in time recovery is not enabled.

Whether point-in-time recovery is enabled.


pointInTimeRecoverySpecificationOptional
public readonly pointInTimeRecoverySpecification: PointInTimeRecoverySpecification;
  • Type: aws-cdk-lib.aws_dynamodb.PointInTimeRecoverySpecification
  • Default: point in time recovery is not enabled.

Whether point-in-time recovery is enabled and recoveryPeriodInDays is set.


readCapacityOptional
public readonly readCapacity: number;
  • Type: number
  • Default: 5

The read capacity for the table. Careful if you add Global Secondary Indexes, as those will share the table's provisioned throughput.

Can only be provided if billingMode is Provisioned.


removalPolicyOptional
public readonly removalPolicy: RemovalPolicy;
  • Type: aws-cdk-lib.RemovalPolicy
  • Default: RemovalPolicy.RETAIN

The removal policy to apply to the DynamoDB Table.


replicaRemovalPolicyOptional
public readonly replicaRemovalPolicy: RemovalPolicy;
  • Type: aws-cdk-lib.RemovalPolicy
  • Default: undefined - use DynamoDB Table's removal policy

The removal policy to apply to the DynamoDB replica tables.


replicationRegionsOptional
public readonly replicationRegions: string[];
  • Type: string[]
  • Default: no replica tables are created

Regions where replica tables will be created.


replicationTimeoutOptional
public readonly replicationTimeout: Duration;
  • Type: aws-cdk-lib.Duration
  • Default: Duration.minutes(30)

The timeout for a table replication operation in a single region.


resourcePolicyOptional
public readonly resourcePolicy: PolicyDocument;
  • Type: aws-cdk-lib.aws_iam.PolicyDocument
  • Default: No resource policy statement

Resource policy to assign to table.


streamOptional
public readonly stream: StreamViewType;
  • Type: aws-cdk-lib.aws_dynamodb.StreamViewType
  • Default: streams are disabled unless replicationRegions is specified

When an item in the table is modified, StreamViewType determines what information is written to the stream for this table.


tableClassOptional
public readonly tableClass: TableClass;
  • Type: aws-cdk-lib.aws_dynamodb.TableClass
  • Default: STANDARD

Specify the table class.


tableNameOptional
public readonly tableName: string;
  • Type: string
  • Default:

Enforces a particular physical table name.


waitForReplicationToFinishOptional
public readonly waitForReplicationToFinish: boolean;
  • Type: boolean
  • Default: true

[WARNING: Use this flag with caution, misusing this flag may cause deleting existing replicas, refer to the detailed documentation for more information] Indicates whether CloudFormation stack waits for replication to finish.

If set to false, the CloudFormation resource will mark the resource as created and replication will be completed asynchronously. This property is ignored if replicationRegions property is not set.

WARNING: DO NOT UNSET this property if adding/removing multiple replicationRegions in one deployment, as CloudFormation only supports one region replication at a time. CDK overcomes this limitation by waiting for replication to finish before starting new replicationRegion.

If the custom resource which handles replication has a physical resource ID with the format region instead of tablename-region (this would happen if the custom resource hasn't received an event since v1.91.0), DO NOT SET this property to false without making a change to the table name. This will cause the existing replicas to be deleted.


warmThroughputOptional
public readonly warmThroughput: WarmThroughput;
  • Type: aws-cdk-lib.aws_dynamodb.WarmThroughput
  • Default: warm throughput is not configured

Specify values to pre-warm you DynamoDB Table Warm Throughput feature is not available for Global Table replicas using the Table construct.

To enable Warm Throughput, use the TableV2 construct instead.


writeCapacityOptional
public readonly writeCapacity: number;
  • Type: number
  • Default: 5

The write capacity for the table. Careful if you add Global Secondary Indexes, as those will share the table's provisioned throughput.

Can only be provided if billingMode is Provisioned.


BdaProcessorConfigurationDefinitionOptions

Options for configuring the BDA processor configuration definition.

Allows customization of evaluation and summarization models and parameters.

Initializer

import { BdaProcessorConfigurationDefinitionOptions } from '@cdklabs/genai-idp-bda-processor'

const bdaProcessorConfigurationDefinitionOptions: BdaProcessorConfigurationDefinitionOptions = { ... }

Properties

Name Type Description
evaluationModel @cdklabs/generative-ai-cdk-constructs.bedrock.IInvokable Optional configuration for the evaluation stage.
summarizationModel @cdklabs/generative-ai-cdk-constructs.bedrock.IInvokable Optional configuration for the summarization stage.

evaluationModelOptional
public readonly evaluationModel: IInvokable;
  • Type: @cdklabs/generative-ai-cdk-constructs.bedrock.IInvokable

Optional configuration for the evaluation stage.

Defines the model and parameters used for evaluating extraction accuracy.


summarizationModelOptional
public readonly summarizationModel: IInvokable;
  • Type: @cdklabs/generative-ai-cdk-constructs.bedrock.IInvokable

Optional configuration for the summarization stage.

Defines the model and parameters used for generating document summaries.


BdaProcessorProps

Configuration properties for the BDA document processor.

BDA Processor uses Amazon Bedrock Data Automation for document processing, providing a managed solution for extracting structured data from documents with minimal custom code. This processor leverages Amazon Bedrock's pre-built document processing capabilities through Data Automation projects.

BDA Processor is the simplest implementation path for common document types that are well-supported by Amazon Bedrock's extraction capabilities.

Initializer

import { BdaProcessorProps } from '@cdklabs/genai-idp-bda-processor'

const bdaProcessorProps: BdaProcessorProps = { ... }

Properties

Name Type Description
environment @cdklabs/genai-idp.IProcessingEnvironment The processing environment that provides shared infrastructure and services.
maxProcessingConcurrency number The maximum number of documents that can be processed concurrently.
configuration IBdaProcessorConfiguration Configuration for the BDA document processor.
dataAutomationProject IDataAutomationProject The Bedrock Data Automation Project used for document processing.
enableHITL boolean Enable Human In The Loop (HITL) review for documents with low confidence scores.
evaluationBaselineBucket aws-cdk-lib.aws_s3.IBucket Optional S3 bucket containing baseline evaluation data for model performance assessment.
sageMakerA2IReviewPortalURL string URL for the SageMaker A2I review portal used for HITL tasks.
summarizationGuardrail @cdklabs/generative-ai-cdk-constructs.bedrock.IGuardrail Optional Bedrock guardrail to apply to summarization model interactions.

environmentRequired
public readonly environment: IProcessingEnvironment;
  • Type: @cdklabs/genai-idp.IProcessingEnvironment

The processing environment that provides shared infrastructure and services.

Contains input/output buckets, tracking tables, API endpoints, and other resources needed for document processing operations.


maxProcessingConcurrencyOptional
public readonly maxProcessingConcurrency: number;
  • Type: number
  • Default: 100 concurrent workflows

The maximum number of documents that can be processed concurrently.

Controls the throughput and resource utilization of the document processing system.


configurationRequired
public readonly configuration: IBdaProcessorConfiguration;

Configuration for the BDA document processor.

Provides customization options for the processing workflow, including schema definitions and evaluation settings.


dataAutomationProjectRequired
public readonly dataAutomationProject: IDataAutomationProject;

The Bedrock Data Automation Project used for document processing.

This project defines the document processing workflow in Amazon Bedrock, including document types, extraction schemas, and processing rules.


enableHITLOptional
public readonly enableHITL: boolean;
  • Type: boolean
  • Default: false

Enable Human In The Loop (HITL) review for documents with low confidence scores.

When enabled, documents that fall below the confidence threshold will be sent for human review before proceeding with the workflow.


evaluationBaselineBucketOptional
public readonly evaluationBaselineBucket: IBucket;
  • Type: aws-cdk-lib.aws_s3.IBucket
  • Default: No evaluation baseline bucket is configured

Optional S3 bucket containing baseline evaluation data for model performance assessment.

Used to store reference documents and expected outputs for evaluating the accuracy and quality of document processing results.


sageMakerA2IReviewPortalURLOptional
public readonly sageMakerA2IReviewPortalURL: string;
  • Type: string
  • Default: No review portal URL is provided

URL for the SageMaker A2I review portal used for HITL tasks.

This URL is provided to human reviewers to access documents that require manual review and correction.


summarizationGuardrailOptional
public readonly summarizationGuardrail: IGuardrail;
  • Type: @cdklabs/generative-ai-cdk-constructs.bedrock.IGuardrail
  • Default: No guardrail is applied

Optional Bedrock guardrail to apply to summarization model interactions.

Helps ensure model outputs adhere to content policies and guidelines by filtering inappropriate content and enforcing usage policies.


Classes

BdaProcessorConfiguration

Configuration management for BDA document processing using Bedrock Data Automation.

This construct creates and manages the configuration for BDA document processing, including schema definitions and configuration values. It provides a centralized way to manage extraction schemas, evaluation settings, and summarization parameters.

Initializers

import { BdaProcessorConfiguration } from '@cdklabs/genai-idp-bda-processor'

new BdaProcessorConfiguration(definition: IBdaProcessorConfigurationDefinition)
Name Type Description
definition IBdaProcessorConfigurationDefinition The configuration definition instance.

definitionRequired

The configuration definition instance.


Methods

Name Description
bind Binds the configuration to a processor instance.

bind
public bind(processor: IBdaProcessor): IBdaProcessorConfigurationDefinition

Binds the configuration to a processor instance.

This method applies the configuration to the processor.

processorRequired

Static Functions

Name Description
fromFile Creates a configuration from a YAML file.
lendingPackageSample Creates a configuration for lending package processing.

fromFile
import { BdaProcessorConfiguration } from '@cdklabs/genai-idp-bda-processor'

BdaProcessorConfiguration.fromFile(filePath: string, options?: BdaProcessorConfigurationDefinitionOptions)

Creates a configuration from a YAML file.

filePathRequired
  • Type: string

Path to the YAML configuration file.


optionsOptional

Optional configuration options to override file settings.


lendingPackageSample
import { BdaProcessorConfiguration } from '@cdklabs/genai-idp-bda-processor'

BdaProcessorConfiguration.lendingPackageSample(options?: BdaProcessorConfigurationDefinitionOptions)

Creates a configuration for lending package processing.

optionsOptional

Optional configuration options.


BdaProcessorConfigurationDefinition

Configuration definition for BDA document processing.

Provides methods to create and customize configuration for Bedrock Data Automation processing.

Initializers

import { BdaProcessorConfigurationDefinition } from '@cdklabs/genai-idp-bda-processor'

new BdaProcessorConfigurationDefinition()
Name Type Description

Static Functions

Name Description
fromFile Creates a configuration definition from a YAML file.
lendingPackageSample Creates a default configuration definition for BDA processing.

fromFile
import { BdaProcessorConfigurationDefinition } from '@cdklabs/genai-idp-bda-processor'

BdaProcessorConfigurationDefinition.fromFile(filePath: string, options?: BdaProcessorConfigurationDefinitionOptions)

Creates a configuration definition from a YAML file.

Allows users to provide custom configuration files for document processing.

filePathRequired
  • Type: string

Path to the YAML configuration file.


optionsOptional

Optional customization for evaluation and summarization settings.


lendingPackageSample
import { BdaProcessorConfigurationDefinition } from '@cdklabs/genai-idp-bda-processor'

BdaProcessorConfigurationDefinition.lendingPackageSample(options?: BdaProcessorConfigurationDefinitionOptions)

Creates a default configuration definition for BDA processing.

This configuration includes basic settings for evaluation and summarization when using Bedrock Data Automation projects.

optionsOptional

Optional customization for evaluation and summarization settings.


BdaProcessorConfigurationSchema

Schema definition for BDA processor configuration. Provides JSON Schema validation rules for the configuration UI and API.

This class defines the structure, validation rules, and UI presentation for the BDA processor configuration, including document classes, attributes, evaluation settings, and summarization parameters.

Initializers

import { BdaProcessorConfigurationSchema } from '@cdklabs/genai-idp-bda-processor'

new BdaProcessorConfigurationSchema()
Name Type Description

Methods

Name Description
bind Binds the configuration schema to a processor instance.

bind
public bind(processor: IBdaProcessor): void

Binds the configuration schema to a processor instance.

Creates a custom resource that updates the schema in the configuration table.

processorRequired

The BDA document processor to apply the schema to.


Protocols

IBdaMetadataTable

Interface for the BDA metadata table.

This table stores metadata about BDA (Bedrock Data Automation) processing records, enabling tracking of individual document processing records within BDA jobs.

Properties

Name Type Description
node constructs.Node The tree node.
env aws-cdk-lib.ResourceEnvironment The environment this resource belongs to.
stack aws-cdk-lib.Stack The stack in which this resource is defined.
tableArn string Arn of the dynamodb table.
tableName string Table name of the dynamodb table.
encryptionKey aws-cdk-lib.aws_kms.IKey Optional KMS encryption key associated with this table.
tableStreamArn string ARN of the table's stream, if there is one.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


envRequired
public readonly env: ResourceEnvironment;
  • Type: aws-cdk-lib.ResourceEnvironment

The environment this resource belongs to.

For resources that are created and managed by the CDK (generally, those created by creating new class instances like Role, Bucket, etc.), this is always the same as the environment of the stack they belong to; however, for imported resources (those obtained from static methods like fromRoleArn, fromBucketName, etc.), that might be different than the stack they were imported into.


stackRequired
public readonly stack: Stack;
  • Type: aws-cdk-lib.Stack

The stack in which this resource is defined.


tableArnRequired
public readonly tableArn: string;
  • Type: string

Arn of the dynamodb table.


tableNameRequired
public readonly tableName: string;
  • Type: string

Table name of the dynamodb table.


encryptionKeyOptional
public readonly encryptionKey: IKey;
  • Type: aws-cdk-lib.aws_kms.IKey

Optional KMS encryption key associated with this table.


tableStreamArnOptional
public readonly tableStreamArn: string;
  • Type: string

ARN of the table's stream, if there is one.


IBdaProcessor

Interface for BDA document processor implementation.

BDA Processor uses Amazon Bedrock Data Automation for document processing, leveraging pre-built extraction capabilities for common document types. This processor is ideal for standard documents with well-defined structures and requires minimal custom code to implement.

Use BDA Processor when: - Processing standard document types like invoices, receipts, or forms - You need a managed solution with minimal custom code - You want to leverage Amazon Bedrock's pre-built extraction capabilities

Properties

Name Type Description
node constructs.Node The tree node.
environment @cdklabs/genai-idp.IProcessingEnvironment The processing environment that provides shared infrastructure and services.
maxProcessingConcurrency number The maximum number of documents that can be processed concurrently.
stateMachine aws-cdk-lib.aws_stepfunctions.IStateMachine The Step Functions state machine that orchestrates the document processing workflow.

nodeRequired
public readonly node: Node;
  • Type: constructs.Node

The tree node.


environmentRequired
public readonly environment: IProcessingEnvironment;
  • Type: @cdklabs/genai-idp.IProcessingEnvironment

The processing environment that provides shared infrastructure and services.

Contains input/output buckets, tracking tables, API endpoints, and other resources needed for document processing operations.


maxProcessingConcurrencyRequired
public readonly maxProcessingConcurrency: number;
  • Type: number

The maximum number of documents that can be processed concurrently.

Controls the throughput and resource utilization of the document processing system.


stateMachineRequired
public readonly stateMachine: IStateMachine;
  • Type: aws-cdk-lib.aws_stepfunctions.IStateMachine

The Step Functions state machine that orchestrates the document processing workflow.

Manages the sequence of processing steps and handles error conditions. This state machine is triggered for each document that needs processing and coordinates the entire extraction pipeline.


IBdaProcessorConfiguration

Interface for BDA document processor configuration.

Provides configuration management for Bedrock Data Automation processing.

Methods

Name Description
bind Binds the configuration to a processor instance.

bind
public bind(processor: IBdaProcessor): IBdaProcessorConfigurationDefinition

Binds the configuration to a processor instance.

This method applies the configuration to the processor.

processorRequired

The BDA document processor to apply to.


IBdaProcessorConfigurationDefinition

Interface for BDA processor configuration definition.

Defines the structure and capabilities of configuration for Bedrock Data Automation processing.

Properties

Name Type Description
evaluationModel @cdklabs/generative-ai-cdk-constructs.bedrock.IInvokable The invokable model used for evaluating extraction results.
summarizationModel @cdklabs/generative-ai-cdk-constructs.bedrock.IInvokable Optional invokable model used for document summarization.

evaluationModelRequired
public readonly evaluationModel: IInvokable;
  • Type: @cdklabs/generative-ai-cdk-constructs.bedrock.IInvokable

The invokable model used for evaluating extraction results.

Used to assess the quality and accuracy of extracted information by comparing extraction results against expected values.


summarizationModelOptional
public readonly summarizationModel: IInvokable;
  • Type: @cdklabs/generative-ai-cdk-constructs.bedrock.IInvokable

Optional invokable model used for document summarization.

When provided, enables automatic generation of document summaries that capture key information from processed documents.


IBdaProcessorConfigurationSchema

Interface for BDA configuration schema.

Defines the structure and validation rules for BDA processor configuration.

Methods

Name Description
bind Binds the configuration schema to a processor instance.

bind
public bind(processor: IBdaProcessor): void

Binds the configuration schema to a processor instance.

This method applies the schema definition to the processor's configuration table.

processorRequired

The BDA document processor to apply the schema to.


IDataAutomationProject

Interface representing an Amazon Bedrock Data Automation Project.

Data Automation Projects in Amazon Bedrock provide a managed way to extract structured data from documents using foundation models. This interface allows the IDP solution to work with existing Bedrock Data Automation Projects.

Methods

Name Description
grantInvokeAsync No description.

grantInvokeAsync
public grantInvokeAsync(grantee: IGrantable): Grant
granteeRequired
  • Type: aws-cdk-lib.aws_iam.IGrantable

Properties

Name Type Description
arn string The Amazon Resource Name (ARN) of the Bedrock Data Automation Project.

arnRequired
public readonly arn: string;
  • Type: string

The Amazon Resource Name (ARN) of the Bedrock Data Automation Project.

This ARN is used to invoke the project for document processing and is referenced in IAM policies to grant appropriate permissions.

Format: arn:aws:bedrock:{region}:{account}:data-automation-project/{project-id}