This package contains a reusable module that is an interactive demo showcasing Amazon Location functionality. The demo is hosted publicly here.
Instructions for building/running this demo locally can be found below.
- Run the template from 
/extra/cloudformation/unauth-resources.yamlto create AWS CloudFormation stack inus-east-1region and getRegion,ApiKey,IdentityPoolId,PinPointAppId,WebSocketUrlfrom stack output's tab.Regionvalue will be added to.envfile againstVITE_AWS_API_KEY_REGIONS.ApiKeyvalue will be added to.envfile againstVITE_AWS_API_KEYS.- In stack output's tab only the ApiKey name is visible, in order to get the ApiKey value
 - Navigate to Amazon Location Service
 - Click on "API keys" from the left navigation pane
 - Click on the ApiKey name
 - Copy the ApiKey value
 
IdentityPoolIdvalue will be added to.envfile againstVITE_AWS_COGNITO_IDENTITY_POOL_IDSandVITE_PINPOINT_IDENTITY_POOL_ID.PinPointAppIdvalue will be added to.envfile againstVITE_PINPOINT_APPLICATION_ID.WebSocketUrlvalue will be added to.envfile againstVITE_AWS_WEB_SOCKET_URLS.
Note- Pinpoint and Translate resosurces are only created in 
us-east-1which are required for the analytics feature and running translation scripts. - Make sure to run the above stack in 
eu-west-1as well to support multiple regions. - The 
Region,ApiKey,IdentityPoolId,WebSocketUrlvalues from stack output's tab can be added to.envfile against the respective keys. - The 
VITE_AWS_API_KEY_REGIONS,VITE_AWS_API_KEYS,VITE_AWS_COGNITO_IDENTITY_POOL_IDS,VITE_AWS_WEB_SOCKET_URLSkeys in.envfile should be comma separated for multiple values and must be in same order for all variables. 
 - Value for 
VITE_APPLE_APP_STORE_LINK,VITE_GOOGLE_PLAY_STORE_LINKcan be added as it is to.envfile from.env.examples. - Value for 
VITE_APP_VERSIONneeds to be populated with the correct version at the time of deployment in the following format2.1.0. - Values for 
VITE_MIGRATE_FROM_GOOGLE_MAPS_PAGE,VITE_MIGRATE_A_WEB_APP_PAGE,VITE_MIGRATE_AN_ANDROID_APP_PAGE,VITE_MIGRATE_AN_IOS_APP_PAGE,VITE_MIGRATE_A_WEB_SERVICE_PAGEandVITE_PRICING_PAGEcan either be1or0to either enable or disable the respective pages. - Values for 
VITE_SHOW_NEW_NAVIGATIONcan either be1or0to either enable or disable the new navigation, turning it off would show the current navigation instead. - Values for 
VITE_API_PLAYGROUND_PAGEcan either be1or0to either enable or disable the API playground page, turning it off would remove the API playground page. 
VITE_AWS_API_KEY_REGIONS
VITE_AWS_API_KEYS
VITE_AWS_COGNITO_IDENTITY_POOL_IDS
VITE_AWS_WEB_SOCKET_URLS
VITE_PINPOINT_IDENTITY_POOL_ID
VITE_PINPOINT_APPLICATION_ID
VITE_APPLE_APP_STORE_LINK
VITE_GOOGLE_PLAY_STORE_LINK
VITE_APP_VERSION
VITE_MIGRATE_FROM_GOOGLE_MAPS_PAGE
VITE_MIGRATE_A_WEB_APP_PAGE
VITE_MIGRATE_AN_ANDROID_APP_PAGE
VITE_MIGRATE_AN_IOS_APP_PAGE
VITE_MIGRATE_A_WEB_SERVICE_PAGE
VITE_PRICING_PAGE
VITE_SHOW_NEW_NAVIGATION
VITE_API_PLAYGROUND_PAGE
VITE_NL_BASE_URL
VITE_NL_API_KEY
git clone <REPO_URL>
cd amazon-location-features-demo-web/
npm install
npm run dev
Installs all the dependencies.
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
WEB_DOMAIN
PINPOINT_IDENTITY_POOL_ID
PINPOINT_APPLICATION_ID
If you are configuring Github actions for the E2E tests, make sure to add the below env keys to the secrets section of the repo.
- Browse to Github amazon-location-features-demo-web repo.
 - Under the repo settings → Go to Secrets & Variables → Click on Actions.
 - Now, Add/Update the values in secrets as per the output values gathered from the cloudformation.
 - Add all keys from 
.envfile to the secrets section of the repo as well from the above Requirements section. 
> WEB_DOMAIN: "http://localhost:3000"
> VITE_AWS_API_KEY_REGIONS
> VITE_AWS_API_KEYS
> VITE_AWS_COGNITO_IDENTITY_POOL_IDS
> VITE_AWS_WEB_SOCKET_URLS
> VITE_PINPOINT_IDENTITY_POOL_ID
> VITE_PINPOINT_APPLICATION_ID
> VITE_APPLE_APP_STORE_LINK
> VITE_GOOGLE_PLAY_STORE_LINK
> VITE_APP_VERSION
> VITE_MIGRATE_FROM_GOOGLE_MAPS_PAGE
> VITE_MIGRATE_A_WEB_APP_PAGE
> VITE_MIGRATE_AN_ANDROID_APP_PAGE
> VITE_MIGRATE_AN_IOS_APP_PAGE
> VITE_MIGRATE_A_WEB_SERVICE_PAGE
> VITE_PRICING_PAGE
> VITE_SHOW_NEW_NAVIGATION
> VITE_API_PLAYGROUND_PAGE
Runs Cypress tests to completion in a headed chrome browser.
VITE_PINPOINT_IDENTITY_POOL_ID
VITE_PINPOINT_APPLICATION_ID
If you are configuring Github actions for the Unit tests, make sure to add the below env keys to the secrets section of the repo. You will need to use the values from the stack that was created when setting up the app env in the very first step (These should already exist if you have setup secrets for E2E tests).
> VITE_PINPOINT_IDENTITY_POOL_ID: "XX-XXXX-X:XXXXXXXX-XXXX-1234-abcd-1234567890ab" // Same as VITE_PINPOINT_IDENTITY_POOL_ID
> VITE_PINPOINT_APPLICATION_ID: "XXXXXXXX" // Same as VITE_PINPOINT_APPLICATION_ID
Run all the test cases for all the components within the repo.
Run all the test cases for all the components within the repo and provides a coverage report.
See CONTRIBUTING for more information.
The best way to interact with our team is through GitHub. You can open an issue and choose from one of our templates for bug reports, feature requests or guidance. If you have a support plan with AWS Support, you can also create a new support case.
We welcome community contributions and pull requests. See CONTRIBUTING.md for information on how to set up a development environment and submit code.
This library is licensed under the MIT-0 License. See the LICENSE file.