Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.2] - 2025-10-01

### Security

- Upgraded tar-fs to `2.1.4` and `3.1.1`

## [1.2.1] - 2025-09-17

### Security
Expand Down
2 changes: 1 addition & 1 deletion deployment/build-s3-dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ set -e
# Check to see if input has been provided:
if [ -z "$1" ] || [ -z "$2" ] || [ -z "$3" ] || [ -z "$4" ]; then
echo "Please provide all required parameters for the build script"
echo "For example: ./build-s3-dist.sh solutions trademarked-solution-name v1.2.1 template-bucket-name"
echo "For example: ./build-s3-dist.sh solutions trademarked-solution-name v1.2.2 template-bucket-name"
exit 1
fi

Expand Down
3 changes: 1 addition & 2 deletions source/infrastructure/cdk.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@
"@aws-cdk/aws-codepipeline-actions:useNewDefaultBranchForCodeCommitSource": true,
"solution_id": "SO0281",
"solution_name": "enhanced-document-understanding-on-aws",
"solution_version": "v1.2.1",
"solution_version": "v1.2.2",
"app_namespace": "app.idp",

"application_trademark_name": "Enhanced Document Understanding on AWS"
}
}
12 changes: 8 additions & 4 deletions source/infrastructure/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/infrastructure/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "enhanced-document-understanding-on-aws-infrastructure",
"version": "1.2.1",
"version": "1.2.2",
"bin": {
"infrastructure": "bin/dus.js"
},
Expand Down
59 changes: 42 additions & 17 deletions source/infrastructure/test/dus-stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,32 @@ import { Capture, Match, Template } from 'aws-cdk-lib/assertions';
import { DusStack } from '../lib/dus-stack';
import { COMMERCIAL_REGION_LAMBDA_NODE_RUNTIME, EventSources } from '../lib/utils/constants';

interface SolutionData {
id: string;
name: string;
version: string;
}

interface BuildStackResult {
template: Template;
jsonTemplate: { [key: string]: any };
stack: cdk.Stack;
solutionData: SolutionData;
}

describe('When App is created', () => {
let template: Template;
let jsonTemplate: { [key: string]: any };
let stack: cdk.Stack;
const solutionId = process.env.SOLUTION_ID ?? 'undefined';
const solutionName = process.env.SOLUTION_NAME ?? 'undefined';
const solutionVersion = process.env.VERSION ?? 'undefined';

let solutionData: SolutionData;

beforeAll(() => {
[template, jsonTemplate, stack] = buildStack();
const result = buildStack();
template = result.template;
jsonTemplate = result.jsonTemplate;
stack = result.stack;
solutionData = result.solutionData;
});

describe('when workflow stacks are created', () => {
Expand Down Expand Up @@ -59,15 +75,15 @@ describe('When App is created', () => {
it('should have a description in the nested stack', () => {
const dusStack = stack as DusStack;
expect(Template.fromStack(dusStack.textractWorkflow).toJSON()['Description']).toEqual(
`(${solutionId}) - ${solutionName} - Nested Stack that deploys components to interact with Amazon Textract for uploaded documents - Version ${solutionVersion}`
`(${solutionData.id}) - ${solutionData.name} - Nested Stack that deploys components to interact with Amazon Textract for uploaded documents - Version ${solutionData.version}`
);

expect(Template.fromStack(dusStack.entityDetectionWorkflow).toJSON()['Description']).toEqual(
`(${solutionId}) - ${solutionName} - Nested Stack that deploys components to interact with Amazon Comprehend and Amazon Comprehend Medical for uploaded documents - Version ${solutionVersion}`
`(${solutionData.id}) - ${solutionData.name} - Nested Stack that deploys components to interact with Amazon Comprehend and Amazon Comprehend Medical for uploaded documents - Version ${solutionData.version}`
);

expect(Template.fromStack(dusStack.redactionWorkflow).toJSON()['Description']).toEqual(
`(${solutionId}) - ${solutionName} - Nested Stack that deploys components to redact content in uploaded documents - Version ${solutionVersion}`
`(${solutionData.id}) - ${solutionData.name} - Nested Stack that deploys components to redact content in uploaded documents - Version ${solutionData.version}`
);
});

Expand Down Expand Up @@ -155,7 +171,7 @@ describe('When App is created', () => {
it('should have a description in the nested UI stack', () => {
const dusStack = stack as DusStack;
expect(Template.fromStack(dusStack.uiInfrastructure.nestedUIStack).toJSON()['Description']).toEqual(
`(${solutionId}) - ${solutionName} - Nested stack that deploys UI components that include an S3 bucket for web assets and a CloudFront distribution - Version ${solutionVersion}`
`(${solutionData.id}) - ${solutionData.name} - Nested stack that deploys UI components that include an S3 bucket for web assets and a CloudFront distribution - Version ${solutionData.version}`
);
});
});
Expand Down Expand Up @@ -195,7 +211,7 @@ describe('When App is created', () => {
it('should have a description in the nested stack', () => {
const dusStack = stack as DusStack;
expect(Template.fromStack(dusStack.indexedStorage.kendraCaseSearch).toJSON()['Description']).toEqual(
`(${solutionId}) - ${solutionName} - Nested Stack that creates the Kendra Index for document search - Version ${solutionVersion}`
`(${solutionData.id}) - ${solutionData.name} - Nested Stack that creates the Kendra Index for document search - Version ${solutionData.version}`
);
});

Expand Down Expand Up @@ -373,7 +389,9 @@ describe('With all environment variables and context.json available', () => {
process.env.VERSION = 'v9.9.9';
process.env.APP_NAMESPACE = 'app.idp';

[template, jsonTemplate] = buildStack();
const result = buildStack();
template = result.template;
jsonTemplate = result.jsonTemplate;
});

afterAll(() => {
Expand Down Expand Up @@ -529,10 +547,7 @@ describe('With all environment variables and context.json available', () => {
});
});

function buildStack(): [Template, { [key: string]: any }, cdk.Stack] {
let template: Template;
let jsonTemplate: { [key: string]: any };

function buildStack(): BuildStackResult {
const app = new cdk.App({
context: rawCdkJson.context
});
Expand All @@ -549,8 +564,18 @@ function buildStack(): [Template, { [key: string]: any }, cdk.Stack] {
appNamespace: appNamespace,
applicationTrademarkName: rawCdkJson.context.application_trademark_name
});
template = Template.fromStack(stack);
jsonTemplate = template.toJSON();

return [template, jsonTemplate, stack];
const template = Template.fromStack(stack);
const jsonTemplate = template.toJSON();

return {
template,
jsonTemplate,
stack,
solutionData: {
id: solutionID,
name: solutionName,
version: version
}
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>java-lambda</artifactId>
<version>1.2.1</version>
<version>1.2.2</version>

<name>mock-java-lambda</name>

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "node-lambda",
"version": "1.2.1",
"version": "1.2.2",
"description": "A mock lambda implementation for CDK infrastructure unit",
"main": "index.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "mock-python-lambda"
version = "1.2.1"
version = "1.2.2"
authors = ["Amazon Web Services"]
description = "Mock function for infra testing"
packages = [{ include = "*.toml" }, { include = "*.lock" }]
Expand Down
4 changes: 2 additions & 2 deletions source/infrastructure/test/mock-ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/infrastructure/test/mock-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mock-react-app",
"version": "1.2.1",
"version": "1.2.2",
"description": "Mock Reactjs app used for unit testing constructs",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions source/lambda/create-presigned-url/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/lambda/create-presigned-url/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-presigned-url",
"version": "1.2.1",
"version": "1.2.2",
"description": "This lambda has minimal permissions required to create downloadable presigned URLs for documents.",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion source/lambda/custom-resource/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "custom-resource"
version = "1.2.1"
version = "1.2.2"
authors = [ "Amazon Web Services" ]
description = "Perform specific operations triggered by AWS CloudFormation events"
packages = [
Expand Down
4 changes: 2 additions & 2 deletions source/lambda/entity-detection/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/lambda/entity-detection/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "entity-detection",
"version": "1.2.1",
"version": "1.2.2",
"description": "This lambda function detects entities within Text",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions source/lambda/fetch-records/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/lambda/fetch-records/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "fetch-records",
"version": "1.2.1",
"version": "1.2.2",
"description": "This lambda backs the ApiGateway REST endpoint to process record and document fetch requests",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions source/lambda/get-inferences/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/lambda/get-inferences/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "get-inferences",
"version": "1.2.1",
"version": "1.2.2",
"description": "This lambda function is used to get inference results by backing the rest-endpoints",
"main": "index.js",
"scripts": {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-nodesdk-custom-config",
"version": "1.2.1",
"version": "1.2.2",
"description": "AWS Nodejs SDK Config intialization layer",
"main": "index.js",
"scripts": {
Expand Down
4 changes: 2 additions & 2 deletions source/lambda/layers/aws-sdk-lib/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading