Custom application looks for new files in particular folders an S3 bucket and indexes the data in ElasticSearch
Clone this repository
$ git clone {url}
or download directly from GitHub.
Change into the application directory
Download node and npm and use the install
command to read the dependencies JSON file
$ npm install
- Install AWS Commandline tools
- https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html I reccomend using pip.
- Create an AWS user in IAM console. Give it appropriate permissions. Copy the key and secret for this user to use in the CLI.
- Configure the commandline tools - https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-files.html
- Make sure you add -- key/secret -- region
- Use the AWS Console to create an ElasticSearch instance - https://console.aws.amazon.com/es/home
- Deployment Type - Development and testing
- Version - 6.4
- instance name - elastic-search-index-test
- type instance - t2.small.elasticsearch
- number of instances - 1
- take the rest of the default settings
- Note this will not configure Kibana access!
- Use the AWS Console to create a bucket. Note your bucket name!!!
- Create folder circEvents/
- Add a sample csv file of WMS Circulation events.
- Create folder items/
- Add a sample txt file of item data.
-
Alter s3_event.json to point to your bucket and your sample txt file.
-
Use serverless to test locally
serverless invoke local --function indexItemCSV --path s3_event.json
-
Alter s3_circfile_event.json to point to your bucket and your sample csv file.
-
Use serverless to test locally
serverless invoke local --function indexCircEvent --path s3_circfile_event.json
- Download and setup the application, see Installing locally
- Deploy the code using serverless
$ serverless deploy