This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add subscriptionsMatcher Lambda (#559)
Also fixed a bunch of small things on the reaper lambda Co-authored-by: zheyanyu <[email protected]>
- Loading branch information
Showing
14 changed files
with
333 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ dist | |
.idea | ||
yarn-error.log | ||
|
||
|
||
auditLogMover/.serverless | ||
auditLogMover/node_modules | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
*/ | ||
|
||
import { StreamSubscriptionMatcher } from 'fhir-works-on-aws-search-es'; | ||
|
||
import { DynamoDb, DynamoDbDataService } from 'fhir-works-on-aws-persistence-ddb'; | ||
import { fhirVersion } from '../../config'; | ||
import { loadImplementationGuides } from '../../implementationGuides/loadCompiledIGs'; | ||
|
||
const dynamoDbDataService = new DynamoDbDataService(DynamoDb); | ||
|
||
const topicArn = process.env.SUBSCRIPTIONS_TOPIC as string; | ||
|
||
const streamSubscriptionMatcher = new StreamSubscriptionMatcher(dynamoDbDataService, topicArn, { | ||
fhirVersion, | ||
compiledImplementationGuides: loadImplementationGuides('fhir-works-on-aws-search-es'), | ||
}); | ||
|
||
exports.handler = async (event: any) => { | ||
await streamSubscriptionMatcher.match(event); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import reaperHandler from './subscriptionReaper'; | ||
|
||
/** | ||
* Custom lambda handler that handles deleting expired subscriptions. | ||
*/ | ||
exports.handler = reaperHandler; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/subscriptions/allowListUtil.ts → ...criptions/restHookLambda/allowListUtil.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.