-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Geo] amplify add geo
doesn't set region of Amazon Location Service in aws-exports.js
using cli v.6.3.1
#8538
Comments
Hi @DominicBortmes. Thank you for creating this issue. I followed the steps you mentioned with Amplify CLI
After a bit of investigation, I was able to reproduce a similar behavior in an Amplify project with some Geo resources added using CLI |
This has been fixed with amplify CLI |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Before opening, please confirm:
How did you install the Amplify CLI?
npm install -g @aws-amplify
If applicable, what version of Node.js are you using?
v16.11.1
Amplify CLI Version
6.3.1
What operating system are you using?
Amazon Linux 2 (Cloud9)
Amplify Categories
Not applicable
Amplify Commands
add
Describe the bug
amplify add geo
created anaws-exports.js
that does not include the project region into the geo settings of the amplify project. This breaks the rendering of any map (unless the map is explictly instantianted with the region parameter set) since API requests are sent against an in-existing regionhttps://maps.geo.undefined.amazonaws.com/maps/v0/maps/
.The
geo
section lacks the documented region to be used of Amazon Location Services. Note that the region is setup correctly, since other configuration sections like auth take over the region correctly.Note that there seem to be related bugs open that interfere with this issue. Issue-8405 of the amplify cli reports that the JSON keys of the
geo
settings section seem to be inconsistent across different versions, increasing the risk of unsuccessful config parsing.Issue-57 of maplibre-gl-js-amplify points out that a missing default region for Amazon Location Service (in
aws-exports.js
's geo section) can break rendering of Maps. (When aws-exports.js does export a default AND devs don't set the region expliclty for every map initialized in JS.)Expected behavior
amplify add geo
should create a config that contains the project region and looks below. I verfied with an older version of amplify cli (6.2.1) that the region used to be passed through successfully.The text was updated successfully, but these errors were encountered: