Skip to content

feat(amazon-location-service): Updated Amazon Location Service plugin to v1.1.0 - #250

Merged
scottschreckengaust merged 11 commits into
awslabs:mainfrom
conniescl:update-amazon-location-v1.1.0
Sep 9, 2026
Merged

scottschreckengaust merged 11 commits into
awslabs:mainfrom
conniescl:update-amazon-location-v1.1.0

Conversation

@conniescl

@conniescl conniescl commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

feat: Update amazon-location-service plugin to v1.1.0

Expands the Amazon Location Service plugin with new reference guides and corrects API/SDK inaccuracies across the existing content.

What changed

New reference guides

  • Google Maps migration — added Web (JavaScript), iOS, and Android migration guides covering the Migration SDK and native Amazon Location APIs, with API mappings and known limitations.
  • Device tracking — position updates, PositionProperties metadata, and tracking workflows.
  • Dynamic maps — MapLibre integration, source/layer handling, and load/idle event guidance.
  • Zone alerts — geofence entry/exit alerting workflows.

Address validation rewrite

  • Rewrote the Address Verification reference to use the asynchronous Jobs API (StartJob with Action ValidateAddress, plus GetJob/ListJobs/CancelJob) instead of Geocode: bulk Parquet S3 I/O, ExecutionRoleArn, and an IAM trust policy for geo.amazonaws.com.
  • Geocode relabeled as "resolve to coordinates" — no longer conflated with postal validation. Acknowledged Geocode's MatchScores for single-address ad-hoc checks.
  • Split API selection guidance into separate "Address Input" and "Address Validation" sections.
  • Added country coverage caveat (US, CA, UK, AU only) and IAM setup requirements.

API/SDK corrections

  • Android — MapLibre resolves via Maven Central (no token-gated Mapbox repo); authenticate with AuthHelper.withApiKey instead of static credentials.
  • iOS — Amazon Location Swift packages are SPM-only (not CocoaPods); remove Google's GMSServices.provideAPIKey setup from AppDelegate.
  • WebTRANSIT is a supported travel mode (only BICYCLING is unsupported); use QueryRadius for SearchNearby; corrected supported travel mode names.
  • Routes — clarified Simple vs FlexiblePolyline geometry format trade-offs.
  • Version-pinned MapLibre source links; updated the samples repository link.

Version bump

  • amazon-location-service bumped to 1.1.0 in .claude-plugin/plugin.json, .codex-plugin/plugin.json, and .claude-plugin/marketplace.json.

Testing

Ran mise run build locally — all lint, format, and security checks passed.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the project license.

@conniescl
conniescl requested review from a team as code owners August 6, 2026 21:06

@laithalsaadoon laithalsaadoon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: content verified against the published service models, AWS docs, and third-party sources

We checked every Amazon Location operation, field, and enum in this PR against the machine-readable service models in aws/api-models-aws (geo-places / geo-routes / geo-maps / location), the AWS API Reference & Developer Guide, and the relevant third-party sources (Google Maps SDK docs, MapLibre docs/source, CocoaPods trunk, Maven Central, npm).

The core change is solid. The address-verification rewrite around the Jobs API (StartJob + ValidateAddress) verified clean end-to-end: operations, job statuses, Parquet limits, the geo.amazonaws.com trust policy, S3 permissions + bucket versioning, output column names, enums, and country coverage all match the model and docs. Same for the SKILL.md restructure and the Geocode-vs-Jobs framing. Nice work on that.

The three new Google-migration guides are where the problems are. The Amazon-side concepts are right, but the installation, auth, imports, and "Before" Google code don't match the current SDKs, and several samples won't compile, won't authenticate, or return wrong data. Details are in the inline comments; the headline items:

  • iOS: CocoaPods instructions reference pods that don't exist (SPM is the only distribution channel for the Swift SDK and auth SDK); import Mapbox fails on the pinned MapLibre 6.x; GMSGeocoder.geocodeAddressString / GMSDirectionsService / GMSDistanceMatrixService don't exist in Google's iOS SDK; every multi-argument Swift init passes labels in the wrong order (generated inits are alphabetical); two nonexistent type names.
  • Android: API key passed as a SigV4 access key (fails auth — the supported path is AuthHelper.withApiKey from software.amazon.location:auth); Mapbox's private Maven repo instructed where Maven Central suffices; missing annotation-plugin dependency and missing mandatory MapLibre.getInstance(); a dependency-removal instruction the file's own later code contradicts.
  • Both mobile guides: a hand-rolled Google-Polyline5 decoder presented for route geometry that Amazon Location returns as FlexiblePolyline by default — aws-geospatial/polyline is the official codec and should replace it.
  • Web: MaxDistanceQueryRadius; WalkingPedestrian; TRANSIT is supported by the Migration SDK's DirectionsService; MigrationEncoding/MigrationPoly aren't importable from the published package; "Simple (the default)" — FlexiblePolyline is the observed default.
  • Smaller files: category filter applied to SearchText where the API only supports it on SearchNearby; a response-structure example with TravelSteps at the wrong nesting level and a v1-only RouteBBox field; an EventBridge pattern that PutRule rejects; a VerifyDevicePosition sample missing two required fields; a samples link that 404s.

Items flagged as author's-discretion / not fully verified

  • LegGeometryFormat default: the current API Reference doesn't print an explicit "Default value" line for CalculateRoutes (it does for the isoline and snap-to-roads equivalents, both FlexiblePolyline). Our evidence is behavioral: the developer guide's own example omits the parameter and gets FlexiblePolyline back. If you have confirmation that Simple is the default anywhere, we'd take the pointer — but the docs as published point the other way, and this PR's calculate-routes.md defaults table agrees with us.
  • Category ID casing in the iOS includeCategories: ["Restaurant"] sample — docs list lowercase IDs; not runtime-verified.
  • GMSPlacesClient.findAutocompletePredictions → Autocomplete mapping: Amazon Suggest is arguably the closer equivalent for POI/query predictions (Autocomplete is address-oriented). Judgment call, not flagged inline.
  • dynamic-map.md's MapLibre main-branch line-number links: behavior verified correct, anchors already drifted; pinning to a tag is a style choice.
  • plugin.json vs marketplace.json version sync: two other plugins also mismatch, so possibly intentional — flagged, not asserted.
  • Pre-existing, not introduced here (fix optional): address-input.md L137 reads item.Place?.PlaceId, but Autocomplete result items carry PlaceId at the top level, so the suggestion click handler stores undefined.

Happy to re-review quickly once the migration guides are updated — the fixes are mechanical (correct install/auth/import blocks from the aws-geospatial READMEs plus the one-line API corrections above), not a rewrite.

Comment thread plugins/amazon-location-service/skills/amazon-location-service/SKILL.md Outdated
Comment thread plugins/amazon-location-service/.claude-plugin/plugin.json
laithalsaadoon
laithalsaadoon previously approved these changes Aug 31, 2026

@laithalsaadoon laithalsaadoon left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

isadeks
isadeks previously approved these changes Aug 31, 2026

@scottschreckengaust scottschreckengaust left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Request changes

Thanks for the substantial expansion here — the three new Google-migration guides, the LocationClient sections, and the FlexiblePolyline guidance are genuinely useful additions, and the v1.1.0 bump is applied consistently across the manifests. The reference docs are also unusually well-sourced; most of what follows is in the sample code rather than the prose.

That said, several code samples in these references won't compile, won't parse, or are silently wrong — and because this plugin's whole purpose is to be copied verbatim by an agent into a user's project, a broken sample is a shipped bug rather than a typo. I've left 15 inline comments; the ones I'd consider blocking:

Won't compile / won't parse

  • google-migration-web.md:496 — three JS blocks each declare the same const twice (encoded, contains, distanceMeters). All three geometry examples are SyntaxError on load.
  • google-migration-android.md:177Credentials is used with no import (it's aws.smithy.kotlin.runtime.auth.awscredentials.Credentials).
  • google-migration-ios.md:552AutocompleteResultItem needs the GeoPlacesClientTypes. prefix.

Silently wrong at runtime

  • address-verification.md:309 — falsy-zero on Output_Position_Longitude discards the geocode for every address on the prime meridian.
  • google-migration-web.md:511 — the geometry mapping table equates meters with kilometers for computeDistanceBetween / computeOffset, so a "within 500m" check silently becomes 500km.
  • google-migration-android.md:642routePoints is undefined and the lat/lng order is inverted relative to what CalculateRoutes returns.
  • device-tracking.md:195 — the live-tracking poll drops all but the first page of devices, contradicting line 138.

Security

  • device-tracking.md:181Popup.setHTML() with a client-supplied DeviceId is HTML injection in the canonical fleet-dashboard sample.

Android lifecycle

  • google-migration-android.md:381 — no mapView.onCreate() and no lifecycle forwarding, a regression versus the MapFragment code it replaces.

Self-contradictions within a single file

  • zone-alerts.md:189 says BatchEvaluateGeofences returns an empty body; line 296 says always check its Errors array.
  • address-verification.md:351 hard-rejects Unconfirmed address numbers; line 325 says route those to review.
  • google-migration-ios.md:812 says to check CocoaPods config; line 65 says the packages are SPM-only.

Rendering / tooling

  • calculate-routes.md:305 — converting ##### 1.##### 6. headings to list items without indenting the code fences makes all 11 criteria render as "1.".
  • plugins/amazon-location-service/.codex-plugin/plugin.json:4 — generated manifest is stale; the PR drops a trailing period from .claude-plugin/plugin.json only, leaving a three-way description mismatch.

Verification

I checked that none of this is caught by CI, so nothing here will surface on its own: mise run lint:md (0 errors) and mise run fmt:check both pass on 8049da4. python3 tools/generate_codex_manifests.py does rewrite the codex manifest on this branch, confirming the drift, and tools/validate-cross-refs.cjs never compares descriptions.

Non-blocking nits

  • google-migration-android.md:64-70 — Gradle dynamic versions (1.8.+) on five AWS SDK artifacts make builds non-reproducible; pin them.
  • google-migration-ios.md:747 — the CLLocationCoordinate2D extension is duplicated from line 509, so a reader following both sections hits "invalid redeclaration". Cross-reference the first copy instead.
  • Table-of-contents omissions in all three new guides: Android misses Best Practices / Troubleshooting (674, 716); iOS misses 721, 790; web misses Common Migration Patterns / Best Practices / Troubleshooting (627, 778, 813).
  • dynamic-map.md:266 describes map.once("idle", cb) as re-firing "whenever everything is loaded and stable" — once fires exactly once.
  • dynamic-map.md:271 warns about custom-element marker drag "in MapLibre v5" while the links at 245 and 266 pin v6.4.1.
  • device-tracking.md:153 uses EndTimeExclusive: new Date("2024-01-15T23:59:59Z") as an end-of-day bound, which drops positions in the final second. Use T00:00:00Z of the next day.
  • SKILL.md:229 introduces @aws-sdk/credential-providers in the new LocationClient section without adding it to the package list near line 160.

Happy to re-review as soon as the sample code is fixed — the structure and coverage of these guides is the right shape.

Reviewed with Claude Code

Comment thread plugins/amazon-location-service/.codex-plugin/plugin.json
@scottschreckengaust

Copy link
Copy Markdown
Member

Follow-up to scope my review: on a second pass I'm narrowing the blocking set to six items
and explicitly releasing the rest as non-blocking. Sorry for presenting all fifteen at equal
weight; that read harsher than intended.

Blocking (sample code an agent copies verbatim that fails or is silently wrong):

  • google-migration-web.md:496 duplicate const declarations (SyntaxError)
  • google-migration-web.md:511 meters/kilometers in the geometry mapping table
  • address-verification.md:309 falsy-zero on longitude 0
  • device-tracking.md:181 setHTML() with client-supplied DeviceId
  • google-migration-android.md:177 missing Credentials import
  • google-migration-ios.md:552 missing GeoPlacesClientTypes. prefix

Everything else in my inline comments is non-blocking; I've marked those threads
individually. I'll approve as soon as the six above are addressed, and I'm happy to
re-review same-day.

@laithalsaadoon

Copy link
Copy Markdown
Contributor

Pushed c2ca646 to this branch (edits-from-maintainers is on) so this can land. Applies the fixes from the open review threads: scottschreckengaust's six, the four remaining from mine, and QueryRadius at places-search.md:218 (MaxDistance is not a SearchNearby member; JS drops it silently). Doc-only, 9 files, +44/-41. dprint, markdownlint, manifest schemas clean locally. Revert anything you disagree with.

@laithalsaadoon
laithalsaadoon dismissed stale reviews from isadeks and themself via c2ca646 September 2, 2026 18:46
auto-merge was automatically disabled September 2, 2026 18:46

Head branch was pushed to by a user without write access

@laithalsaadoon

Copy link
Copy Markdown
Contributor

Thread cleanup at c2ca646. Approval stands.

Resolved, fixed in c3168cd: ios L317/L386/L586, android L371, web L483/L474, places-search L163, device-tracking L302.

Resolved, fixed in c2ca646: android L45 (play-services-location kept, FusedLocationProviderClient needs it), calculate-routes L857/L876/L1153, web-javascript L321/L330/L331, zone-alerts L223-224, places-search L218 (MaxDistance -> QueryRadius, no thread).

Released as non-blocking, resolved: ios L817, ios L824 (withdrawn, link redirects fine), zone-alerts L189/L271, device-tracking L161. Optional one-liners left in each thread.

@conniescl

conniescl commented Sep 2, 2026

Copy link
Copy Markdown
Contributor Author

Thank you @theagenticguy for the commit, looks good to me. We usually make changes in our repo(https://github.com/aws-geospatial/amazon-location-agent-context) first, I will match your change on our end later

Thread cleanup at c2ca646. Approval stands.

Resolved, fixed in c3168cd: ios L317/L386/L586, android L371, web L483/L474, places-search L163, device-tracking L302.

Resolved, fixed in c2ca646: android L45 (play-services-location kept, FusedLocationProviderClient needs it), calculate-routes L857/L876/L1153, web-javascript L321/L330/L331, zone-alerts L223-224, places-search L218 (MaxDistance -> QueryRadius, no thread).

Released as non-blocking, resolved: ios L817, ios L824 (withdrawn, link redirects fine), zone-alerts L189/L271, device-tracking L161. Optional one-liners left in each thread.

@scottschreckengaust scottschreckengaust left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cgalvan
cgalvan previously approved these changes Sep 2, 2026

@cgalvan cgalvan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback @theagenticguy and @scottschreckengaust . I've reviewed all the changes and am aligned :)

auto-merge was automatically disabled September 3, 2026 15:05

Head branch was pushed to by a user without write access

@scottschreckengaust scottschreckengaust left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@scottschreckengaust
scottschreckengaust added this pull request to the merge queue Sep 9, 2026
Merged via the queue into awslabs:main with commit a1ed627 Sep 9, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants