Skip to content

Commit ec8c08c

Browse files
author
Bob Strahan
committed
Merge branch 'develop' v0.3.21
2 parents bd57797 + c77fc8a commit ec8c08c

File tree

183 files changed

+20243
-43571
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+20243
-43571
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ rvl_cdip_*
2222
notebooks/examples/data
2323
.idea/
2424
.dsr/
25-
*tmp-dev-assets*
25+
*tmp-dev-assets*
26+
scratch/

.gitlab-ci.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
# Any publicly available image
55
image: public.ecr.aws/docker/library/python:3.13-bookworm
66

7+
# Global timeout for all jobs
8+
default:
9+
timeout: 2h
10+
711
# Change pip's cache directory to be inside the project directory since we can
812
# only cache local items.
913
# variables:
@@ -51,6 +55,7 @@ developer_tests:
5155

5256
integration_tests:
5357
stage: integration_tests
58+
timeout: 2h
5459
# variables:
5560
# # In order to run tests in another account, add a AWS_CREDS_TARGET_ROLE variable to the Gitlab pipeline variables.
5661
# AWS_CREDS_TARGET_ROLE: ${AWS_CREDS_TARGET_ROLE}
@@ -61,16 +66,16 @@ integration_tests:
6166
# Add rules to only run on develop branch
6267
rules:
6368
- if: $CI_COMMIT_BRANCH == "develop"
64-
when: always # always # When idp-accelerator CICD is reconfigured
69+
when: on_success
6570
- if: $CI_COMMIT_BRANCH =~ /^feature\/.*/
66-
when: always
71+
when: on_success
6772
- if: $CI_COMMIT_BRANCH =~ /^fix\/.*/
68-
when: always
73+
when: on_success
6974
- if: $CI_COMMIT_BRANCH =~ /^hotfix\/.*/
7075
when: manual
7176
- if: $CI_COMMIT_BRANCH =~ /^release\/.*/
7277
when: manual
73-
- when: manual # This will make it available on all other branches
78+
- when: manual
7479

7580
before_script:
7681
- python --version
@@ -98,7 +103,7 @@ integration_tests:
98103
deployment_validation:
99104
stage: deployment_validation
100105
rules:
101-
- when: always
106+
- when: on_success
102107

103108
before_script:
104109
- apt-get update -y

CHANGELOG.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,55 @@ SPDX-License-Identifier: MIT-0
55

66
## [Unreleased]
77

8+
## [0.3.21]
9+
10+
### Added
11+
12+
- **Claude Sonnet 4.5 Haiku Model Support**
13+
- Added support for Claude Haiku 4.5
14+
- Available for configuration across all document processing steps
15+
16+
- **X-Ray Integration for Error Analyzer Agent**
17+
- Integrated AWS X-Ray tracing tools to enhance diagnostic capabilities of the error analyzer agent
18+
- X-Ray context enables better distinction between infrastructure issues and application logic failures
19+
- Added trace ID persistence in DynamoDB alongside document status for complete traceability
20+
- Enhanced CloudWatch error log filtering for more targeted error analysis
21+
- Simplified CloudWatch results structure for improved readability and analysis
22+
- Updated error analyzer recommendations to leverage X-Ray insights for more accurate root cause identification
23+
24+
- **EU Region Support with Automatic Model Mapping**
25+
- Added support for deploying the solution in EU regions (eu-central-1, eu-west-1, etc.)
26+
- Automatic model endpoint mapping between US and EU regions for seamless deployment
27+
- Comprehensive model mapping table covering Amazon Nova and Anthropic Claude models
28+
- Intelligent fallback mappings when direct EU equivalents are unavailable
29+
- Quick Launch button for eu-central-1 region in README and deployment documentation
30+
- IDP CLI now supports eu-central-1 deployment with automatic template URL selection
31+
- Complete technical documentation in `docs/eu-region-model-support.md` with best practices and troubleshooting
32+
33+
### Changed
34+
35+
- **Migrated Evaluation from EventBridge Trigger to Step Functions Workflow**
36+
- Moved evaluation processing from external EventBridge-triggered Lambda to integrated Step Functions workflow step
37+
- **Race Condition Eliminated**: Evaluation now runs inside state machine before WorkflowTracker marks documents COMPLETE, preventing premature completion status when evaluation is still running
38+
- **Config-Driven Control**: Evaluation now controlled by `evaluation.enabled` configuration setting instead of CloudFormation stack parameter, enabling runtime control without stack redeployment
39+
- **Enhanced Status Tracking**: Added EVALUATING status to document processing pipeline for better visibility of evaluation progress
40+
- **UI Improvements**: Added support for displaying EVALUATING status in processing flow viewer and "NOT ENABLED" badge when evaluation is disabled in configuration
41+
- **Consistent Pattern**: Aligns evaluation with summarization and assessment patterns for unified feature control approach
42+
43+
44+
- **Migrated UI Build System from Create React App to Vite**
45+
- Upgraded to Vite 7 for faster build times
46+
- Updated to React 18, AWS Amplify v6, react-router-dom v6, and Cloudscape Design System
47+
- Reduced dependencies and node_modules size
48+
- Implemented strategic code splitting for improved performance
49+
- Environment variables now use `VITE_` prefix instead of `REACT_APP_` for local development
50+
51+
### Fixed
52+
53+
- **IDP CLI Code Cleanup and Portability Improvements** - [#91](https://github.com/aws-solutions-library-samples/accelerated-intelligent-document-processing-on-aws/issues/91), [#92](https://github.com/aws-solutions-library-samples/accelerated-intelligent-document-processing-on-aws/issues/92)
54+
- Removed dead code from previous refactors in batch_processor.py (51 lines)
55+
- Replaced hardcoded absolute paths with dynamic path resolution in rerun_processor.py for cross-platform compatibility
56+
857
## [0.3.20]
958

1059
### Added

Dockerfile.optimized

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Optimized Dockerfile for Lambda functions with minimal dependencies
22
# This builds each function with ONLY the dependencies it needs
33

4+
# checkov:skip=CKV_DOCKER_3: "The Dockerfile uses the official AWS Lambda Python base image (public.ecr.aws/lambda/python:3.12-arm64), which already configures the appropriate non-root user for Lambda execution"
5+
# checkov:skip=CKV_DOCKER_2: "The Dockerfile.optimized is specifically designed for AWS Lambda container images, which don't use Docker HEALTHCHECK instructions."
6+
7+
48
FROM public.ecr.aws/lambda/python:3.12-arm64 AS builder
59

610
# Copy uv from official distroless image

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ To quickly deploy the GenAI-IDP solution in your AWS account:
7070
| --------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
7171
| US West (Oregon) | us-west-2 | [![Launch Stack](https://cdn.rawgit.com/buildkite/cloudformation-launch-stack-button-svg/master/launch-stack.svg)](https://us-west-2.console.aws.amazon.com/cloudformation/home?region=us-west-2#/stacks/create/review?templateURL=https://s3.us-west-2.amazonaws.com/aws-ml-blog-us-west-2/artifacts/genai-idp/idp-main.yaml&stackName=IDP) |
7272
| US East (N.Virginia) | us-east-1 | [![Launch Stack](https://cdn.rawgit.com/buildkite/cloudformation-launch-stack-button-svg/master/launch-stack.svg)](https://us-east-1.console.aws.amazon.com/cloudformation/home?region=us-east-1#/stacks/create/review?templateURL=https://s3.us-east-1.amazonaws.com/aws-ml-blog-us-east-1/artifacts/genai-idp/idp-main.yaml&stackName=IDP) |
73+
| EU Central (Frankfurt) | eu-central-1 | [![Launch Stack](https://cdn.rawgit.com/buildkite/cloudformation-launch-stack-button-svg/master/launch-stack.svg)](https://eu-central-1.console.aws.amazon.com/cloudformation/home?region=eu-central-1#/stacks/create/review?templateURL=https://s3.eu-central-1.amazonaws.com/aws-ml-blog-eu-central-1/artifacts/genai-idp/idp-main.yaml&stackName=IDP) |
7374

7475
3. When the stack deploys for the first time, you'll receive an email with a temporary password to access the web UI
7576
4. Use this temporary password for your first login to set up a permanent password
@@ -138,6 +139,7 @@ To update an existing GenAIIDP stack to a new version:
138139
5. Enter the template URL:
139140
- us-west-2: `https://s3.us-west-2.amazonaws.com/aws-ml-blog-us-west-2/artifacts/genai-idp/idp-main.yaml`
140141
- us-east-1: `https://s3.us-east-1.amazonaws.com/aws-ml-blog-us-east-1/artifacts/genai-idp/idp-main.yaml`
142+
- eu-central-1: `https://s3.eu-central-1.amazonaws.com/aws-ml-blog-eu-central-1/artifacts/genai-idp/idp-main.yaml`
141143
6. Follow the prompts to update your stack, reviewing any parameter changes
142144
7. For detailed instructions, see the [Deployment Guide](./docs/deployment.md#updating-an-existing-stack)
143145

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.20
1+
0.3.21

config_library/pattern-1/lending-package-sample/config.yaml

Lines changed: 111 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ summarization:
6767
system_prompt: >-
6868
You are a document summarization expert who can analyze and summarize documents from various domains including medical, financial, legal, and general business documents. Your task is to create a summary that captures the key information, main points, and important details from the document. Your output must be in valid JSON format. \nSummarization Style: Balanced\\nCreate a balanced summary that provides a moderate level of detail. Include the main points and key supporting information, while maintaining the document's overall structure. Aim for a comprehensive yet concise summary.\n Your output MUST be in valid JSON format with markdown content. You MUST strictly adhere to the output format specified in the instructions.
6969
evaluation:
70+
enabled: true
7071
llm_method:
7172
top_p: '0.1'
7273
max_tokens: '4096'
@@ -242,7 +243,19 @@ agents:
242243
- Extract log_group, log_stream, and events data from tool response
243244
- Show complete log group and log stream names without truncation
244245
- Present actual log messages from events array in code blocks
245-
246+
247+
ANALYSIS GUIDELINES:
248+
- If has_performance_issues is false, focus on application logic errors
249+
- Use service timeline to rule out infrastructure bottlenecks
250+
- Service response times help eliminate timeout-related causes
251+
- For application errors use CloudWatch error messages for recommendations
252+
253+
ROOT CAUSE DETERMINATION:
254+
- Start with Step Function failure details (most specific)
255+
- Validate with CloudWatch error logs (most detailed)
256+
- Use X-Ray to categorize as infrastructure vs. application issue
257+
- DynamoDB provides supporting timeline context only
258+
246259
RECOMMENDATION GUIDELINES:
247260
For code-related issues or system bugs:
248261
- Do not suggest code modifications
@@ -322,6 +335,16 @@ pricing:
322335
price: '8.0E-8'
323336
- name: cacheWriteInputTokens
324337
price: '1.0E-6'
338+
- name: bedrock/us.anthropic.claude-haiku-4-5-20251001-v1:0
339+
units:
340+
- name: inputTokens
341+
price: '1.1E-06'
342+
- name: outputTokens
343+
price: '5.5E-06'
344+
- name: cacheReadInputTokens
345+
price: '1.1E-07'
346+
- name: cacheWriteInputTokens
347+
price: '1.4E-06'
325348
- name: bedrock/us.anthropic.claude-3-5-sonnet-20241022-v2:0
326349
units:
327350
- name: inputTokens
@@ -402,6 +425,93 @@ pricing:
402425
price: '1.5E-6'
403426
- name: cacheWriteInputTokens
404427
price: '1.875E-5'
428+
# EU model pricing
429+
- name: bedrock/eu.amazon.nova-lite-v1:0
430+
units:
431+
- name: inputTokens
432+
price: '7.8E-8'
433+
- name: outputTokens
434+
price: '3.1E-7'
435+
- name: cacheReadInputTokens
436+
price: '1.9E-8'
437+
- name: cacheWriteInputTokens
438+
price: '7.8E-8'
439+
- name: bedrock/eu.amazon.nova-pro-v1:0
440+
units:
441+
- name: inputTokens
442+
price: '1.0E-6'
443+
- name: outputTokens
444+
price: '4.2E-6'
445+
- name: cacheReadInputTokens
446+
price: '2.6E-7'
447+
- name: cacheWriteInputTokens
448+
price: '1.0E-6'
449+
- name: bedrock/eu.anthropic.claude-3-haiku-20240307-v1:0
450+
units:
451+
- name: inputTokens
452+
price: '2.5E-7'
453+
- name: outputTokens
454+
price: '1.25E-6'
455+
- name: bedrock/eu.anthropic.claude-haiku-4-5-20251001-v1:0
456+
units:
457+
- name: inputTokens
458+
price: '1.1E-6'
459+
- name: outputTokens
460+
price: '5.5E-6'
461+
- name: cacheReadInputTokens
462+
price: '1.1E-7'
463+
- name: cacheWriteInputTokens
464+
price: '1.4E-6'
465+
- name: bedrock/eu.anthropic.claude-3-5-sonnet-20241022-v2:0
466+
units:
467+
- name: inputTokens
468+
price: '3.0E-6'
469+
- name: outputTokens
470+
price: '1.5E-5'
471+
- name: cacheReadInputTokens
472+
price: '3.0E-7'
473+
- name: cacheWriteInputTokens
474+
price: '3.75E-6'
475+
- name: bedrock/eu.anthropic.claude-3-7-sonnet-20250219-v1:0
476+
units:
477+
- name: inputTokens
478+
price: '3.0E-6'
479+
- name: outputTokens
480+
price: '1.5E-5'
481+
- name: cacheReadInputTokens
482+
price: '3.0E-7'
483+
- name: cacheWriteInputTokens
484+
price: '3.75E-6'
485+
- name: bedrock/eu.anthropic.claude-sonnet-4-20250514-v1:0
486+
units:
487+
- name: inputTokens
488+
price: '3.0E-6'
489+
- name: outputTokens
490+
price: '1.5E-5'
491+
- name: cacheReadInputTokens
492+
price: '3.0E-7'
493+
- name: cacheWriteInputTokens
494+
price: '3.75E-6'
495+
- name: bedrock/eu.anthropic.claude-sonnet-4-5-20250929-v1:0
496+
units:
497+
- name: inputTokens
498+
price: '3.3E-6'
499+
- name: outputTokens
500+
price: '1.65E-5'
501+
- name: cacheReadInputTokens
502+
price: '3.3E-7'
503+
- name: cacheWriteInputTokens
504+
price: '4.125E-6'
505+
- name: bedrock/eu.anthropic.claude-sonnet-4-5-20250929-v1:0:1m
506+
units:
507+
- name: inputTokens
508+
price: '6.6E-6'
509+
- name: outputTokens
510+
price: '2.475E-5'
511+
- name: cacheReadInputTokens
512+
price: '6.6E-7'
513+
- name: cacheWriteInputTokens
514+
price: '8.25E-6'
405515
# AWS Lambda pricing (US East - N. Virginia)
406516
- name: lambda/requests
407517
units:
@@ -411,4 +521,3 @@ pricing:
411521
units:
412522
- name: gb_seconds
413523
price: '1.66667E-5' # $0.0000166667 per GB-second ($16.67 per 1M GB-seconds)
414-

0 commit comments

Comments
 (0)