Skip to content

Latest commit

 

History

History
185 lines (174 loc) · 24.8 KB

File metadata and controls

185 lines (174 loc) · 24.8 KB

Requirements

Name Version
terraform >= 1.0.0
aws >= 4.0.0
local >= 2.1.0
random >= 3.1.0

Providers

Name Version
archive 2.7.1
aws 6.27.0
null 3.2.4
random 3.7.2

Modules

Name Source Version
lambda_layers ../../lambda-layer-codebuild n/a
processor_configuration ../../processor-configuration n/a

Resources

Name Type
aws_cloudwatch_event_rule.bda_event_rule resource
aws_cloudwatch_event_target.bda_event_target resource
aws_cloudwatch_log_group.bda_completion_logs resource
aws_cloudwatch_log_group.evaluation_function_logs resource
aws_cloudwatch_log_group.hitl_process_logs resource
aws_cloudwatch_log_group.hitl_status_update_logs resource
aws_cloudwatch_log_group.hitl_wait_logs resource
aws_cloudwatch_log_group.invoke_bda_logs resource
aws_cloudwatch_log_group.process_results_logs resource
aws_cloudwatch_log_group.state_machine_logs resource
aws_cloudwatch_log_group.summarization_logs resource
aws_codebuild_project.bda_processor_build resource
aws_ecr_repository.bda_processor resource
aws_iam_policy.bda_completion_policy resource
aws_iam_policy.codebuild_policy resource
aws_iam_policy.evaluation_function_policy resource
aws_iam_policy.hitl_process_policy resource
aws_iam_policy.hitl_status_update_policy resource
aws_iam_policy.hitl_wait_policy resource
aws_iam_policy.invoke_bda_policy resource
aws_iam_policy.invoke_data_automation_project resource
aws_iam_policy.kms_policy resource
aws_iam_policy.process_results_hitl_policy resource
aws_iam_policy.process_results_policy resource
aws_iam_policy.state_machine_policy resource
aws_iam_policy.summarization_bedrock_policy resource
aws_iam_policy.summarization_default_bedrock_policy resource
aws_iam_policy.summarization_guardrail_policy resource
aws_iam_policy.summarization_policy resource
aws_iam_policy.vpc_policy resource
aws_iam_role.bda_completion_role resource
aws_iam_role.codebuild_role resource
aws_iam_role.evaluation_function_role resource
aws_iam_role.hitl_process_role resource
aws_iam_role.hitl_status_update_role resource
aws_iam_role.hitl_wait_role resource
aws_iam_role.invoke_bda_role resource
aws_iam_role.process_results_role resource
aws_iam_role.state_machine_role resource
aws_iam_role.summarization_role resource
aws_iam_role_policy_attachment.bda_completion_kms_attachment resource
aws_iam_role_policy_attachment.bda_completion_policy_attachment resource
aws_iam_role_policy_attachment.bda_completion_vpc_attachment resource
aws_iam_role_policy_attachment.codebuild_policy_attachment resource
aws_iam_role_policy_attachment.evaluation_function_kms_attachment resource
aws_iam_role_policy_attachment.evaluation_function_policy_attachment resource
aws_iam_role_policy_attachment.evaluation_function_vpc_attachment resource
aws_iam_role_policy_attachment.hitl_process_kms_attachment resource
aws_iam_role_policy_attachment.hitl_process_policy_attachment resource
aws_iam_role_policy_attachment.hitl_process_vpc_attachment resource
aws_iam_role_policy_attachment.hitl_status_update_kms_attachment resource
aws_iam_role_policy_attachment.hitl_status_update_policy_attachment resource
aws_iam_role_policy_attachment.hitl_status_update_vpc_attachment resource
aws_iam_role_policy_attachment.hitl_wait_kms_attachment resource
aws_iam_role_policy_attachment.hitl_wait_policy_attachment resource
aws_iam_role_policy_attachment.hitl_wait_vpc_attachment resource
aws_iam_role_policy_attachment.invoke_bda_data_automation_attachment resource
aws_iam_role_policy_attachment.invoke_bda_kms_attachment resource
aws_iam_role_policy_attachment.invoke_bda_policy_attachment resource
aws_iam_role_policy_attachment.invoke_bda_vpc_attachment resource
aws_iam_role_policy_attachment.process_results_hitl_policy_attachment resource
aws_iam_role_policy_attachment.process_results_kms_attachment resource
aws_iam_role_policy_attachment.process_results_policy_attachment resource
aws_iam_role_policy_attachment.process_results_vpc_attachment resource
aws_iam_role_policy_attachment.state_machine_policy_attachment resource
aws_iam_role_policy_attachment.summarization_bedrock_attachment resource
aws_iam_role_policy_attachment.summarization_default_bedrock_attachment resource
aws_iam_role_policy_attachment.summarization_guardrail_attachment resource
aws_iam_role_policy_attachment.summarization_kms_attachment resource
aws_iam_role_policy_attachment.summarization_policy_attachment resource
aws_iam_role_policy_attachment.summarization_vpc_attachment resource
aws_lambda_function.bda_completion resource
aws_lambda_function.evaluation_function resource
aws_lambda_function.hitl_process resource
aws_lambda_function.hitl_status_update resource
aws_lambda_function.hitl_wait resource
aws_lambda_function.invoke_bda resource
aws_lambda_function.process_results resource
aws_lambda_function.summarization resource
aws_lambda_permission.allow_eventbridge_to_invoke_bda_completion resource
aws_sfn_state_machine.document_processing resource
aws_sqs_queue.bda_completion_dlq resource
aws_sqs_queue.invoke_bda_dlq resource
aws_sqs_queue.process_results_dlq resource
aws_sqs_queue.summarization_dlq resource
null_resource.create_module_build_dir resource
null_resource.trigger_bda_build resource
random_id.build_id resource
random_string.suffix resource
archive_file.bda_completion_code data source
archive_file.hitl_process_code data source
archive_file.hitl_status_update_code data source
archive_file.hitl_wait_code data source
archive_file.invoke_bda_code data source
archive_file.process_results_code data source
archive_file.summarization_code data source
aws_arn.data_automation_project data source
aws_caller_identity.current data source
aws_partition.current data source
aws_region.current data source

Inputs

Name Description Type Default Required
api_arn ARN of the GraphQL API that provides interfaces for querying document status and metadata string null no
api_graphql_url GraphQL URL of the API that provides interfaces for querying document status and metadata string null no
api_id ID of the GraphQL API that provides interfaces for querying document status and metadata string null no
bda_metadata_table_arn ARN of the DynamoDB table that stores BDA processing metadata (optional, required for HITL functionality) string null no
concurrency_table_arn ARN of the DynamoDB table that manages concurrency limits for document processing string n/a yes
config Configuration values from config_library YAML files any n/a yes
configuration_table_arn ARN of the DynamoDB table that stores configuration settings string n/a yes
data_automation_project_arn The ARN of the Bedrock Data Automation Project used for document processing string n/a yes
enable_ecr_image_scanning Enable ECR vulnerability scanning on image push for the BDA processor Lambda images bool false no
encryption_key_arn ARN of the KMS key used for encrypting resources in the document processing workflow string null no
evaluation_baseline_bucket_name Name of the S3 bucket containing baseline documents for evaluation. Leave empty to skip evaluation. string "" no
evaluation_model_id Optional model used for evaluating extraction results. If not provided, the model from config.yaml will be used. string null no
hitl_workteam_arn ARN of the SageMaker workteam for HITL string null no
idp_common_layer_arn ARN of the IDP common Lambda layer containing shared utilities string n/a yes
input_bucket_arn ARN of the S3 bucket where source documents to be processed are stored string n/a yes
lambda_layers_bucket_arn ARN of the S3 bucket for storing Lambda layers. If not provided, a new bucket will be created. string "" no
lambda_tracing_mode X-Ray tracing mode for Lambda functions. Valid values: Active, PassThrough string "Active" no
log_level The log level for document processing components string n/a yes
log_retention_days The retention period for CloudWatch logs generated by document processing components number 7 no
max_processing_concurrency Maximum number of concurrent document processing tasks number 100 no
metric_namespace The namespace for CloudWatch metrics emitted by the document processing system string n/a yes
name Name for the BDA processor resources string "bda-processor" no
output_bucket_arn ARN of the S3 bucket where processed documents and extraction results are stored string n/a yes
reporting_bucket_name Name of the S3 bucket for storing evaluation reporting data. string "" no
sagemaker_a2i_review_portal_url URL for the SageMaker A2I review portal string null no
save_reporting_function_name Name of the Lambda function that saves evaluation results to the reporting bucket. string "" no
summarization_guardrail Optional Bedrock guardrail to apply to summarization model interactions
object({
guardrail_id = string
guardrail_arn = string
})
null no
summarization_model_id Optional model used for document summarization. If not provided, the model from config.yaml will be used. string null no
tags Tags to apply to resources map(string) {} no
tracking_table_arn ARN of the DynamoDB table that tracks document processing status and metadata string n/a yes
vpc_config VPC configuration for Lambda functions
object({
subnet_ids = list(string)
security_group_ids = list(string)
})
null no
vpc_security_group_ids List of security group IDs for Lambda functions list(string) [] no
vpc_subnet_ids List of subnet IDs for Lambda functions to run in list(string) [] no
working_bucket_arn ARN of the S3 bucket used for storing intermediate processing artifacts string n/a yes

Outputs

Name Description
configuration Configuration for the BDA processor
data_automation_project Information about the Bedrock Data Automation Project
evaluation_function_arn ARN of the evaluation Lambda function (used by the Step Functions state machine)
evaluation_model The invokable model used for evaluating extraction results
lambda_functions Lambda functions used by the BDA processor
max_processing_concurrency Maximum number of concurrent document processing tasks
processor_configuration Processor configuration results
state_machine_arn ARN of the Step Functions state machine for document processing
state_machine_name Name of the Step Functions state machine for document processing
summarization_model Optional invokable model used for document summarization