Hold My Beer is a sample application for AWS CloudSearch. It's a static web app for querying a dataset of beers.
- Go to the CloudSearch Dashboard.
- Click Create a Domain.
- Give it a name (e.g. hold-my-beer).
- In the Access Policies, set policy to "Search and Suggester service: Allow all. Document Service: Account owner only."
- Wait until access policies are done processing.
- Suggesters > Add Suggester
- Give it a name. Set "Source Field" to "name", and "Fuzzy Matching" to "high".
- Re-index your domain. This can take a while.
- Create a resource for
/search
. - Create a
GET
for/search
. - Select the integration type HTTP.
- Specify the Endpoint URL as https://.us-east-1.cloudsearch.amazonaws.com/2013-01-01/search
- Method Request > URL Query String Parameters add
q
,q.parser
,q.options
. - Actions > Deploy API
- Create new stage, give it a name.
- Click Deploy
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
Beer stein favicon from freefavicon.com.