-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
257 changed files
with
17,090 additions
and
6,026 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,52 @@ | ||
# Welcome to Momento <-> Eventbridge Integration Example Project | ||
|
||
The project demonstrates a write-through cache pattern for DynamoDB using DynamoDB Streams, AWS EventBridge and Momento. | ||
The app can be used to create, update and delete items in a DynamoDB table and the changes will be reflected in the cache/topic in real-time. | ||
|
||
### **Prerequisites:** | ||
|
||
- Momento Cache: momento-eventbridge-cache. If cache does not exists, can create one using the [momento console](https://console.gomomento.com/) . | ||
- Momento API Key, can be created using [momento console](https://console.gomomento.com/) if you haven’t already created one | ||
- HTTP API endpoint the same region as Momento API Key. You can copy the endpoint from the console after creating the API Key or refer to the [Regions Section here in the documentation](https://docs.momentohq.com/topics/develop/api-reference/http-api#regions) | ||
- AWS Account AccessId, Aws Secret Key (and AWS Session Token if you are using temporary credentials) | ||
|
||
### **Deploying the Demo App:** | ||
|
||
The source code for the CDK application lives in the `infrastructure` directory. To build and deploy it you will first need to install the dependencies: | ||
|
||
```bash | ||
cd infrastructure | ||
npm install | ||
``` | ||
|
||
To deploy the CDK app you will need to have [configured your AWS credentials](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-authentication.html#cli-chap-authentication-precedence). | ||
|
||
You will also need a superuser API key generated from the [Momento Console](https://console.gomomento.com/), and the HTTP API endpoint URL for the region you are deploying to. | ||
|
||
|
||
Then run: | ||
|
||
```tsx | ||
npm run deploy -- --parameters MomentoApiKey=<YOUR_MOMENTO_API_KEY> --parameters MomentoApiEndpoint=<YOUR_MOMENTO_API_ENDPOINT> | ||
``` | ||
|
||
## **Running the Demo:** | ||
|
||
First, edit the `.env.development` file with your token vending machine url and your cache name: | ||
|
||
```bash | ||
VITE_AWS_ACCESS_KEY_ID=<AWS_ACCESS_KEY_ID> | ||
VITE_AWS_SECRET_ACCESS_KEY=<AWS_SECRET_ACCESS_KEY> | ||
VITE_AWS_SESSION_TOKEN=<AWS_SESSION_TOKEN> (if you are using temporary credentials) | ||
VITE_MOMENTO_API_KEY=<YOUR_MOMENTO_API_KEY> | ||
``` | ||
|
||
Then, install all dependencies and run the development server: | ||
|
||
```bash | ||
cd webapp | ||
npm install | ||
npm run dev | ||
``` | ||
|
||
Open [http://localhost:5173](http://localhost:5173/) with your browser to explore the demo app. |
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,8 @@ | ||
*.js | ||
!jest.config.js | ||
*.d.ts | ||
node_modules | ||
|
||
# CDK asset staging directory | ||
.cdk.staging | ||
cdk.out |
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 @@ | ||
*.ts | ||
!*.d.ts | ||
|
||
# CDK asset staging directory | ||
.cdk.staging | ||
cdk.out |
7 changes: 7 additions & 0 deletions
7
examples/nodejs/aws/eventbridge/infrastructure/bin/eventbridge.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env node | ||
import 'source-map-support/register'; | ||
import * as cdk from 'aws-cdk-lib'; | ||
import { EventbridgeStack } from '../lib/eventbridge-stack'; | ||
|
||
const app = new cdk.App(); | ||
new EventbridgeStack(app, 'eventbridge-stack', {}); |
Oops, something went wrong.