Skip to content

Commit

Permalink
Merge pull request #2 from hazelcast-guides/HZC-5768-Fraud-deletectio…
Browse files Browse the repository at this point in the history
…n-demo-updates

HZC-5768 fraud detection demo updates and cloud rename changes.
  • Loading branch information
kthope authored Feb 21, 2024
2 parents 259703b + cc45870 commit 75a0960
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
4 changes: 0 additions & 4 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@ let createClientConfig = () => {
...
sslOptions: {
...
// Otherwise the client will throw an error
// because the cluster's hostname doesn't match the one
// in the self-signed TLS certificate.
checkServerIdentity: () => null
}
}
},
Expand Down
3 changes: 2 additions & 1 deletion code/hazelcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ let createClientConfig = () => {
ca: [fs.readFileSync(path.resolve(path.join(__dirname, 'ca.pem')))],
cert: [fs.readFileSync(path.resolve(path.join(__dirname, 'cert.pem')))],
key: [fs.readFileSync(path.resolve(path.join(__dirname, 'key.pem')))],
passphrase: process.env.KEYSTORE_PASSWORD
passphrase: process.env.KEYSTORE_PASSWORD,
checkServerIdentity: () => null
}
}
},
Expand Down
8 changes: 4 additions & 4 deletions docs/modules/ROOT/pages/serverless-fraud-detection.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ cd serverless-fraud-detection/code
npm i
```

. Open the {hazelcast-cloud} console. Next to *Connect Client*, select any client and download the keystore files from the *Advanced Setup* tab.
. Open the {hazelcast-cloud} console. Next to *Connect Client*, select *Advanced* and download the keystore files using the *Download keystore file* link.

. Save your files to the `code/` directory.

Expand Down Expand Up @@ -281,7 +281,7 @@ aws lambda add-permission --function-name ImportAirportsFn --action lambda:Invok
aws s3api put-bucket-notification-configuration --bucket $S3_BUCKET_NAME --notification-configuration file://aws/s3_notification.json --region us-west-2
```

. Open the {hazelcast-cloud} console. Next to *Connect Client*, select any client and go to the *Advanced setup* tab. Leave this window open. You'll need some of these details in the next step.
. Open the {hazelcast-cloud} console. Next to *Connect Client*, select *Advanced* to view cluster token and certificate password. Leave this window open. You'll need some of these details in the next step.

. Configure the `ImportAirportsFn` function with the environment variables that the Hazelcast client needs to connect to your cluster.
+
Expand Down Expand Up @@ -478,9 +478,9 @@ image:serverless-fraud-detection:new-api.png[Form for creating a new API]
. Create a new resource:

- *Resource Name*: `ValidateTransactions`
- *Resource Path*: `/validate`
- *Resource Path*: `/`

. Create a POST method for the */validate* resource:
. Create a POST method for the */ValidateTransactions* resource:

- *Lambda Function*: `ValidateFn`
+
Expand Down
Binary file modified docs/modules/serverless-fraud-detection/images/new-api.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ workspace "Serverless fraud detection application" {
s3Bucket = container "S3 Bucket" "Stores the source of truth for the airport data in the airports.json file"
lambdaFunctionValidate = container "ValidateFn" ""
lambdaFunctionImport = container "ImportAirportsFn" ""
hazelcast = container "Hazelcast Viridian Cluster" "Caches the airport data for fast reads" "" "Hazelcast"
hazelcast = container "Hazelcast Cloud Cluster" "Caches the airport data for fast reads" "" "Hazelcast"
}

# relationships
Expand Down Expand Up @@ -88,4 +88,4 @@ workspace "Serverless fraud detection application" {
}
themes https://static.structurizr.com/themes/amazon-web-services-2022.04.30/theme.json
}
}
}

0 comments on commit 75a0960

Please sign in to comment.