diff --git a/.viperlightignore b/.viperlightignore index ccf496ab..f3614340 100644 --- a/.viperlightignore +++ b/.viperlightignore @@ -66,8 +66,11 @@ fwoa-core/routing/src/router/middlewares/setLogger.test.ts:72 fwoa-core/routing/src/router/middlewares/setLogger.test.ts:132 fwoa-core/routing/src/router/middlewares/setLogger.test.ts:189 fwoa-core/interface/src/inputExampleEncryptSelectedField.json:18 +#Email for eol mode +README.md:19 + #Email for maintenance mode -README.md:5 +README.md:23 # PDF Implementation Guide FHIR Works on AWS Implementation Guide - 24-MAR-2023 - v6.0.0.pdf diff --git a/CHANGELOG.md b/CHANGELOG.md index 82f7a766..812b9fc1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [6.1.4] - 2023-09-20 + +### Changelog for Packages in This project + +Please click corresponded links for more details for changelog of each package. +| Folder | Package | CHANGELOG | +| ----------------------------------------------------------- | ----------------------------------------- | ------------------------------------------------------ | +| [solutions/deployment](./solutions/deployment/) | [@aws/fhir-works-on-aws-deployment] | [Changelog](./solutions/deployment/CHANGELOG.md) | +| [solutions/smart-deployment](./solutions/smart-deployment/) | [@aws/fhir-works-on-aws-smart-deployment] | [Changelog](./solutions/smart-deployment/CHANGELOG.md) | + ## [6.1.3] - 2023-08-15 ### Changelog for Packages in This project diff --git a/README.md b/README.md index 22dbe947..bac6e49f 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,23 @@ # FHIR Works on AWS +## **End of Life Notice** + +FHIR Works on AWS is reaching end of life and will no longer be available starting on January 31, 2024 — the End of Life (EOL) date. Customers will be able to use FHIR Works on AWS until the EOL date, at which time the FHIR Works on AWS solution repository will be made read-only and archived for customers. + +### Will there be any new feature releases for FHIR Works on AWS? + +No. As the service is reaching EOL, we will not release any new features. However, we will continue to make security improvements and manage FHIR Works on AWS as expected until the EOL date. After the EOL date, FHIR Works on AWS will no longer receive any new feature updates, bug fixes or security updates from AWS. After the EOL date, customers who continue to use the software are responsible for the maintenance of the software and its dependencies. + +### Where should I migrate to? + +AWS HealthLake is a HIPAA-eligible service that provides FHIR APIs that help healthcare and life sciences companies securely store, transform, transact, and analyze health data in minutes to give a chronological view at the patient and population-level. AWS HealthLake natively achieved feature parity with FHIR Works on AWS including SMART on FHIR and Bulk FHIR capabilities. Further, AWS HealthLake can support customer conformance with 21st Century Cures Act for patient access and interoperability requirements through a fully managed FHIR server. + +AWS has released a migration tool in the FHIR Works on AWS GitHub repository to enable migration to Amazon HealthLake. The migration tool is a collection of scripts that automates the export of FHIR resources from FHIR Works on AWS and imports them into Amazon HealthLake. + +### What support is available? + +Customers using FHIR Works on AWS can now move their workloads to AWS HealthLake leveraging the migration tool provided by AWS. Customers will be supported for migration from FHIR Works to an AWS Service such as AWS HealthLake beyond EOL. For you prefer not to migrate to AWS HealthLake or do not have AWS HealthLake support in your region, please contact your AWS account team for alternatives. If you have any questions regarding migration support, please reach out to AWS at fwoa-migration-support@amazon.com. + ## Maintenance Notice FHIR Works on AWS has been moved to maintenance mode. While in maintenance, we will not add any new features to this solution. All security issues should be reported directly to AWS Security at [aws-security@amazon.com](mailto:security@amazon.com). If you are new to this solution, we advise you to explore using [HealthLake](https://aws.amazon.com/healthlake), which is our managed service for building FHIR based transactional and analytics applications. You can get started by contacting your AWS Account team. If you are an existing customer of FHIR Works on AWS, and have additional questions or need immediate help, please reach out to [fwoa-migration-support@amazon.com](mailto:fwoa-migration-support@amazon.com) or contact your AWS Account team. @@ -17,6 +35,8 @@ designed to be extensible. To learn more about FWoA, download the [FWoA Implementation Guide](./FHIR%20Works%20on%20AWS%20Implementation%20Guide%20-%2024-MAR-2023%20-%20v6.0.0.pdf) and see the following README files for individual FWoA packages: +and see the following README files for individual FWoA packages: + - [deployment](./solutions/deployment/README.md) - [smart-deployment](./solutions/smart-deployment/README.md) - [authz-rbac](./fwoa-core/authz-rbac/README.md) diff --git a/buildspec.yml b/buildspec.yml index 094d314d..6a70e09d 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -8,8 +8,6 @@ phases: pre_build: commands: - echo "Installing dependencies and executing unit tests - `pwd`" - - echo Update npm to latest - - npm install -g npm@latest - cd deployment && chmod +x ./run-unit-tests.sh && ./run-unit-tests.sh - echo "Installing dependencies and executing unit tests completed `date`" build: diff --git a/common/autoinstallers/commitizen/package.json b/common/autoinstallers/commitizen/package.json index e4cf473b..c4783c48 100644 --- a/common/autoinstallers/commitizen/package.json +++ b/common/autoinstallers/commitizen/package.json @@ -8,7 +8,7 @@ }, "pnpm": { "overrides": { - "word-wrap@<1.2.4": ">=1.2.4" + "word-wrap": ">=1.2.4" } } } diff --git a/common/autoinstallers/commitizen/pnpm-lock.yaml b/common/autoinstallers/commitizen/pnpm-lock.yaml index 39730721..75180326 100644 --- a/common/autoinstallers/commitizen/pnpm-lock.yaml +++ b/common/autoinstallers/commitizen/pnpm-lock.yaml @@ -1,7 +1,7 @@ lockfileVersion: 5.4 overrides: - word-wrap@<1.2.4: '>=1.2.4' + word-wrap: '>=1.2.4' specifiers: commitizen: ^4.2.6 @@ -552,7 +552,7 @@ packages: conventional-commit-types: 3.0.0 lodash.map: 4.6.0 longest: 2.0.1 - word-wrap: 1.2.3 + word-wrap: 1.2.5 optionalDependencies: '@commitlint/load': 17.4.2 transitivePeerDependencies: @@ -1571,10 +1571,10 @@ packages: isexe: 2.0.0 dev: false - /word-wrap/1.2.3: + /word-wrap/1.2.5: resolution: { - integrity: sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ== + integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA== } engines: { node: '>=0.10.0' } dev: false diff --git a/common/config/rush/browser-approved-packages.json b/common/config/rush/browser-approved-packages.json index 792ead39..0450778d 100644 --- a/common/config/rush/browser-approved-packages.json +++ b/common/config/rush/browser-approved-packages.json @@ -350,6 +350,10 @@ "name": "react-dom", "allowedCategories": ["production"] }, + { + "name": "readline", + "allowedCategories": ["tools"] + }, { "name": "sanitize-html", "allowedCategories": ["production"] diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 3426118b..985df3c9 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -544,6 +544,7 @@ importers: object-hash: ^3.0.0 prettier: ^2.4.1 qs: ^6.10.3 + readline: ^1.3.0 sort-package-json: ^1.57.0 standard-version: ^9.3.2 ts-jest: ^26.4.4 @@ -555,6 +556,7 @@ importers: axios: 0.25.0 lodash: 4.17.21 object-hash: 3.0.0 + readline: 1.3.0 devDependencies: '@aws/eslint-config-fwoa-eslint-custom': link:../core/eslint-custom '@rushstack/eslint-config': 3.1.1_4vsywjlpuriuw3tl5oq6zy5a64 @@ -13566,6 +13568,13 @@ packages: picomatch: 2.3.1 dev: true + /readline/1.3.0: + resolution: + { + integrity: sha512-k2d6ACCkiNYz222Fs/iNze30rRJ1iIicW7JuX/7/cozvih6YCkFZH+J6mAFDVgv0dRBaAyr4jDqC95R2y4IADg== + } + dev: false + /redent/3.0.0: resolution: { diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json index 54ac3d47..03a60970 100644 --- a/common/config/rush/repo-state.json +++ b/common/config/rush/repo-state.json @@ -1,5 +1,5 @@ // DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. { - "pnpmShrinkwrapHash": "797a36e72644222027160dddc6307b621f1aca06", + "pnpmShrinkwrapHash": "1e80f843db705311c2ebbb964cd20e09be460b65", "preferredVersionsHash": "bf21a9e8fbc5a3846fb05b4fa0859e0917b2202f" } diff --git a/fwoa-tools/package.json b/fwoa-tools/package.json index 91b13b14..9fa42a9b 100644 --- a/fwoa-tools/package.json +++ b/fwoa-tools/package.json @@ -43,7 +43,8 @@ "dependencies": { "axios": "0.25.0", "lodash": "^4.17.21", - "object-hash": "^3.0.0" + "object-hash": "^3.0.0", + "readline": "^1.3.0" }, "devDependencies": { "@aws/eslint-config-fwoa-eslint-custom": "workspace:*", diff --git a/fwoa-tools/src/binaryConverter.ts b/fwoa-tools/src/binaryConverter.ts index e20e9ee7..c320a0ab 100644 --- a/fwoa-tools/src/binaryConverter.ts +++ b/fwoa-tools/src/binaryConverter.ts @@ -82,6 +82,7 @@ export async function convertBinaryResource(outputFile: ExportOutput): Promise x.code === 'DELETED')) { // DELETE the resource from HealthLake @@ -303,6 +303,7 @@ export async function deleteFhirResourceFromHealthLakeIfNeeded( deleteQueue = []; } } + i++; } } if (deleteQueue.length !== 0) { @@ -383,6 +384,7 @@ async function runScript(): Promise { } } +/* istanbul ignore next */ (async () => { // don't runScript when importing code for unit tests if (!process.env.UNIT_TEST) { diff --git a/fwoa-tools/src/migrationVerify.ts b/fwoa-tools/src/migrationVerify.ts index fbc69c41..901f2e94 100644 --- a/fwoa-tools/src/migrationVerify.ts +++ b/fwoa-tools/src/migrationVerify.ts @@ -3,6 +3,8 @@ * SPDX-License-Identifier: Apache-2.0 */ import { readFileSync, WriteStream, createWriteStream } from 'fs'; +import * as readline from 'readline'; +import { Readable } from 'stream'; import { S3 } from 'aws-sdk'; import { aws4Interceptor } from 'aws4-axios'; import axios from 'axios'; @@ -101,26 +103,30 @@ export async function verifyFolderImport( // eslint-disable-next-line security/detect-object-injection const resourcePath = resourcePaths[i]; logs.write(`\n${new Date().toISOString()}: Verifying Import from ${resourcePath}...`); - const resourceFile = await s3Client - .getObject({ - Bucket: process.env.EXPORT_BUCKET_NAME!, - Key: resourcePath - }) - .promise(); - if (resourceFile.$response.error) { + let resourceFileStream: Readable; + try { + resourceFileStream = s3Client + .getObject({ + Bucket: process.env.EXPORT_BUCKET_NAME!, + Key: resourcePath + }) + .createReadStream(); + } catch (e) { if (!continueOnError) { - throw new Error(`Failed to read file ${resourceFile.$response.error}`); + throw new Error(`Failed to read file ${e}\n`); } else { completedWithErrors = true; continue; } } + const resourceFile: readline.Interface = readline.createInterface({ input: resourceFileStream! }); + let j = 0; // Each resource file can contain a number of resource objects - const allResources: string[] = resourceFile.Body!.toString().trimEnd().split('\n'); - for (let j = 0; j < allResources.length; j += 1) { + /* istanbul ignore next */ + for await (const line of resourceFile) { // eslint-disable-next-line security/detect-object-injection - const resource = JSON.parse(allResources[j]); + const resource = JSON.parse(line); // Skip any resources marked for deletion, we don't need to verify these. if (resource.meta.tag.some((x: { display: string; code: string }) => x.code === 'DELETED')) { continue; @@ -177,6 +183,7 @@ export async function verifyFolderImport( ); } } + j++; } } logs.write(`\n${new Date().toISOString()}: Successfully completed verifying Import Jobs!`); diff --git a/solutions/deployment/CHANGELOG.md b/solutions/deployment/CHANGELOG.md index fe35285e..3203c824 100644 --- a/solutions/deployment/CHANGELOG.md +++ b/solutions/deployment/CHANGELOG.md @@ -2,11 +2,17 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [6.1.4] (2023-09-20) + +### Fixes + +- fix reading of large files through stream + ## [6.1.3] (2023-08-15) ### Fixes -- fix retry logic for bundle requests in import script +- fix retry logic for bundle requests ## [6.1.2] (2023-08-03) diff --git a/solutions/deployment/lib/cdk-infra-stack.ts b/solutions/deployment/lib/cdk-infra-stack.ts index f71b12b9..5f3abd50 100644 --- a/solutions/deployment/lib/cdk-infra-stack.ts +++ b/solutions/deployment/lib/cdk-infra-stack.ts @@ -358,7 +358,7 @@ export default class FhirWorksStack extends Stack { }.amazoncognito.com/oauth2`, EXPORT_RESULTS_BUCKET: bulkExportResources.bulkExportResultsBucket.bucketName, EXPORT_RESULTS_SIGNER_ROLE_ARN: bulkExportResources.exportResultsSignerRole.roleArn, - CUSTOM_USER_AGENT: 'AwsSolution/SO0128/GH-v6.1.3', + CUSTOM_USER_AGENT: 'AwsSolution/SO0128/GH-v6.1.4', ENABLE_MULTI_TENANCY: `${props!.enableMultiTenancy}`, ENABLE_SUBSCRIPTIONS: `${props!.enableSubscriptions}`, LOG_LEVEL: props!.logLevel, diff --git a/solutions/deployment/package.json b/solutions/deployment/package.json index f2ed6095..54788736 100644 --- a/solutions/deployment/package.json +++ b/solutions/deployment/package.json @@ -1,6 +1,6 @@ { "name": "@aws/fhir-works-on-aws-deployment", - "version": "6.1.3", + "version": "6.1.4", "description": "FHIR Works on AWS deployment", "homepage": "https://github.com/aws-solutions/fhir-works-on-aws", "repository": { diff --git a/solutions/smart-deployment/CHANGELOG.md b/solutions/smart-deployment/CHANGELOG.md index 3f5969e3..07621938 100644 --- a/solutions/smart-deployment/CHANGELOG.md +++ b/solutions/smart-deployment/CHANGELOG.md @@ -2,11 +2,17 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [6.1.4] (2023-09-20) + +### Fixes + +- fix reading of large files through stream + ## [6.1.3] (2023-08-15) ### Fixes -- fix retry logic for bundle requests in import script +- fix retry logic for bundle requests ## [6.1.2] (2023-08-03) diff --git a/solutions/smart-deployment/package.json b/solutions/smart-deployment/package.json index f7035da7..fdbf1288 100644 --- a/solutions/smart-deployment/package.json +++ b/solutions/smart-deployment/package.json @@ -1,6 +1,6 @@ { "name": "@aws/fhir-works-on-aws-smart-deployment", - "version": "6.1.3-smart", + "version": "6.1.4-smart", "description": "FHIR Works on AWS deployment with SMART", "homepage": "https://github.com/aws-solutions/fhir-works-on-aws", "repository": { diff --git a/solutions/smart-deployment/src/lib/cdk-infra-stack.ts b/solutions/smart-deployment/src/lib/cdk-infra-stack.ts index b5745e95..64b1b9f7 100644 --- a/solutions/smart-deployment/src/lib/cdk-infra-stack.ts +++ b/solutions/smart-deployment/src/lib/cdk-infra-stack.ts @@ -358,7 +358,7 @@ export default class FhirWorksStack extends Stack { PATIENT_PICKER_ENDPOINT: props!.patientPickerEndpoint, EXPORT_RESULTS_BUCKET: bulkExportResources.bulkExportResultsBucket.bucketName, EXPORT_RESULTS_SIGNER_ROLE_ARN: bulkExportResources.exportResultsSignerRole.roleArn, - CUSTOM_USER_AGENT: 'AwsSolution/SO0128/GH-v6.1.3-smart', + CUSTOM_USER_AGENT: 'AwsSolution/SO0128/GH-v6.1.4-smart', ENABLE_MULTI_TENANCY: `${props!.enableMultiTenancy}`, ENABLE_SUBSCRIPTIONS: `${props!.enableSubscriptions}`, LOG_LEVEL: props!.logLevel,