Skip to content

bbokorney/hold-my-beer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hold My Beer

Hold My Beer is a sample application for AWS CloudSearch. It's a static web app for querying a dataset of beers.

AWS Setup

CloudSearch

  1. Go to the CloudSearch Dashboard.
  2. Click Create a Domain.
  3. Give it a name (e.g. hold-my-beer).
  4. In the Access Policies, set policy to "Search and Suggester service: Allow all. Document Service: Account owner only."
  5. Wait until access policies are done processing.

Suggester

  1. Suggesters > Add Suggester
  2. Give it a name. Set "Source Field" to "name", and "Fuzzy Matching" to "high".
  3. Re-index your domain. This can take a while.

API Gateway

  1. Create a resource for /search.
  2. Create a GET for /search.
  3. Select the integration type HTTP.
  4. Specify the Endpoint URL as https://.us-east-1.cloudsearch.amazonaws.com/2013-01-01/search
  5. Method Request > URL Query String Parameters add q, q.parser, q.options.
  6. Actions > Deploy API
  7. Create new stage, give it a name.
  8. Click Deploy

Running the app

Export the url of your API gateway domain.

export REACT_APP_SEARCH_URL='https://abc123defg.execute-api.us-east-1.amazonaws.com/stage-name'

Install dependencies and start the project.

npm install
npm start

Credits

Beer stein favicon from freefavicon.com.

About

A sample application for AWS CloudSearch.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published