Amazon Location Service
AWS LabsOfficialCreated by aws-geospatialDistributed by AWS Labs
- Skill
- Tool integration
- Cloud and DevOps
- Apache-2.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
Amazon Location Service provides a suite of geospatial APIs for web and mobile applications. This skill covers the integration of maps, geocoding, routing, places search, geofencing, and device tracking. It emphasizes the use of the bundled JavaScript client for web development and promotes resourceless API operations to simplify deployment. The skill also provides guidance on authentication via IAM or API keys, and distinguishes between interactive address input and bulk postal address validation using the Jobs API.
What it does
- Provides interactive maps using MapLibre and static map images.
- Converts addresses to coordinates (geocoding) and coordinates to addresses (reverse geocoding).
- Calculates routes, travel times, and service areas with traffic estimation.
- Searches for places, businesses, and points of interest with autocomplete functionality.
- Monitors geographical boundaries with geofences and tracks device locations.
- Validates and standardizes addresses in bulk against authoritative postal data.
When to use it
- When building location-aware web or mobile applications on AWS.
- When you need to implement maps, routing, or place search functionality.
- When you need to verify and standardize large datasets of addresses in the US, CA, UK, or AU.
- When you need to track device locations or monitor entry/exit from geofenced areas.
- When migrating from other mapping providers to Amazon Location Service.
Advantages
- Supports resourceless API operations to reduce infrastructure management.
- Provides a bundled JavaScript client for simplified web integration.
- Offers flexible authentication options including API keys for public applications.
- Includes specialized APIs for bulk address validation and postal standardization.
- Integrates seamlessly with other AWS services and SDKs.
Usage examples
- “How do I implement an address autocomplete field in my React app using Amazon Location Service?”
- The agent provides a guide on using the Autocomplete API, emphasizing the use of Address.Label for display and GetPlace for retrieving full details upon selection.
- “I need to validate a large database of customer addresses in the UK. How should I do this?”
- The agent explains the use of the asynchronous Jobs API (StartJob with ValidateAddress) for bulk processing, noting that it provides postal-authority verdicts.
- “How do I initialize a map in my web application?”
- The agent provides instructions on using MapLibre with a direct URL to the map style descriptor and setting validateStyle to false for performance.
- “What are the best practices for securing my map implementation on a public website?”
- The agent recommends using API Keys with restricted AllowActions and AllowResources, rather than exposing IAM credentials.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/awslabs/amazon-location-service/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip amazon-location-service.zip -d .agents/skills
Documentation by aws-geospatial
Overview
Amazon Location Service provides geospatial APIs for maps, geocoding, routing, places search, geofencing, and tracking. Prefer the bundled JavaScript client (@aws/amazon-location-client) for web development and use resourceless API operations to avoid managing AWS resources.
When to Use This Skill
Use this skill when:
Building location-aware web or mobile applications
Working with Amazon Location Service projects
Implementing maps, geocoding, routing, or places search
Adding geofencing or device tracking functionality
Integrating geospatial features into AWS applications
Do NOT use this skill for:
Google Maps, Mapbox, or Leaflet-with-OSM projects (unless migrating to Amazon Location)
Generic GIS operations without AWS context
Non-AWS geospatial services
Amazon Location Service API Overview
Places (SDK: geo-places, JS: @aws-sdk/client-geo-places)
Geocode (Forward/Reverse): Convert addresses to coordinates and vice versa
Search (Text/Nearby): Find points of interest with contact and hours info
Autocomplete: Predict addresses based on user input
Suggest: Predict places and points of interest based on partial or misspelled user input
Get Place: Retrieve place details by place ID
Jobs (SDK: location, JS: @aws-sdk/client-location)
Address Validation: Verify and standardize addresses in bulk with the asynchronous Jobs API (StartJob with Action
ValidateAddress, then GetJob/ListJobs/CancelJob). It adds what Geocode lacks — a postal-authority verdict (ValidationGranularity, Mailable/Locatable, per-component StatusDetail), not just coordinates. Coverage is US, CA, UK, and AU only; for other countries use Geocode.
Maps (SDK: geo-maps, JS: @aws-sdk/client-geo-maps)
Dynamic Maps: Interactive maps using tiles with MapLibre rendering
Static Maps: Pre-rendered, non-interactive map images, good for including an image into a web page, or for thumbnail images
Routes (SDK: geo-routes, JS: @aws-sdk/client-geo-routes)
Route calculation with traffic and distance estimation
Service area/isoline creation
Matrix calculations for multiple origins/destinations
GPS trace alignment to road segments
Route optimization (traveling salesman problem)
Geofences & Trackers (SDK: location, JS: @aws-sdk/client-location)
Geofences: Detect entry/exit from geographical boundaries
Trackers: Current and historical device location tracking
API Keys (SDK: location, JS: @aws-sdk/client-location)
API Keys: Grant access to public applications without exposing AWS credentials
Common Mistakes
Avoid these frequent errors:
Using
Titleinstead ofAddress.Labelfor display: In Autocomplete results, always displayAddress.Label. TheTitlefield may show components in reverse order and is not suitable for user-facing text.Using GetStyleDescriptor API for map initialization: MUST use direct URL passing to MapLibre (
https://maps.geo.{region}.amazonaws.com/v2/styles/Standard/descriptor?key={apiKey}) instead of making GetStyleDescriptor API calls. The direct URL method is required for proper map rendering.Forgetting
validateStyle: falsein MapLibre config: Always setvalidateStyle: falsein the MapLibre Map constructor for faster map load times with Amazon Location styles.Mixing resource-based and resourceless operations: When possible, prefer resourceless operations (direct API calls without pre-created resources) for simpler deployment and permissions.
Inconsistent API operation naming: Use the format
service:Operationwhen referencing APIs (e.g.,geo-places:Geocode,geo-maps:GetStyleDescriptor). SDK clients use@aws-sdk/client-*format.Not handling nested Address objects correctly: The Address object from GetPlace contains nested objects (
Region.Code,Region.Name,Country.Code2, etc.), not flat strings. Access nested properties correctly.Wrong action names in API Key permissions: API key
AllowActionsusegeo-maps:,geo-places:,geo-routes:prefixes (e.g.,geo-places:Geocode,geo-routes:CalculateRoutes). Do NOT use SDK client names (@aws-sdk/client-geo-places) or IAM-style actions. See the Authentication and Permissions section for the complete list.
Defaults
Use these default choices unless the user explicitly requests otherwise:
JavaScript SDK: Bundled client (CDN) for browser-only apps; npm modular SDKs (@aws-sdk/client-geo-*) for React and build tool apps
API operations: Resourceless for Maps/Places/Routes (Geofencing/Tracking always require pre-created resources)
Authentication: API Key for Maps/Places/Routes; Cognito for Geofencing/Tracking
Map style: Standard
Coordinate format: [longitude, latitude] (GeoJSON order)
Override: User can specify "use Cognito for Maps/Places/Routes" or "use bundled client for React".
API Selection Guidance
Choose the right API for your use case:
Address Input (interactive forms)
Autocomplete → Type-ahead in address forms (partial input: "123 Main")
GetPlace → Get full details after user selects autocomplete result (by PlaceId)
Geocode → Resolve a complete user-typed address to coordinates. Returns coordinates, a matched label, and match quality (
MatchScoresoverall + per-component,AddressNumberCorrected) synchronously in one call — but no postal-deliverability verdict or standardized output.
Address Validation (verify & standardize)
StartJob (Action
ValidateAddress) → Verify and standardize addresses in bulk against authoritative postal data; async Jobs API with Parquet input/output in Amazon S3. Coverage: US, CA, UK, AU only; for other countries use Geocode.GetJob / ListJobs / CancelJob → Track, enumerate, and cancel validation jobs
Choose the Jobs API when you need a postal-authority verdict (ValidationGranularity, Mailable/Locatable, per-component StatusDetail) or bulk throughput. For a single ad-hoc check of whether one address resolves and how well it matched, the synchronous Geocode
MatchScoresis the right tool — do not stand up a job. See the address-verification reference.
Finding Locations
SearchText → General text search ("pizza near Seattle")
SearchNearby → Find places near a coordinate (restaurants within 5km)
Suggest → Predict places/POIs from partial or misspelled input
Autocomplete → Address-specific predictions (not for general POI search)
Geocoding
Geocode (Forward) → Address string → Coordinates
ReverseGeocode → Coordinates → Address
Maps
Dynamic Maps (tiles + MapLibre) → Interactive maps requiring pan, zoom, markers
Static Maps (image) → Non-interactive map images for thumbnails or email
Routing
CalculateRoutes → Single route between origin and destination
CalculateRouteMatrix → Multiple origins/destinations travel times
CalculateIsolines → Service areas (all locations reachable within time/distance)
LLM Context Files
When you need detailed API parameter specifications or service capabilities not covered in the reference files, fetch these llms.txt resources:
Developer Guide: https://docs.aws.amazon.com/location/latest/developerguide/llms.txt
API Reference: https://docs.aws.amazon.com/location/latest/APIReference/llms.txt
Key Guidance for Better Recommendations
Prefer the Bundled JavaScript Client for Web Development
For convenient web application development, Amazon Location Service provides a bundled JavaScript client that simplifies integration and provides optimized functionality without custom bundling. This bundled client includes all libraries required to build client side web applications with Amazon Location Service.
Features included in the bundled client:
Enables direct pre-bundled dependency inclusion without custom bundle / build
Simplified authentication and API integration
TypeScript support with comprehensive type definitions
Support for all Amazon Location SDKs
Included SDKs and Libraries:
@aws-sdk/client-geo-maps
@aws-sdk/client-geo-places
@aws-sdk/client-geo-routes
@aws-sdk/client-location
@aws-sdk/credential-providers
https://github.com/aws-geospatial/amazon-location-utilities-auth-helper-js
Resources:
NPM Package: @aws/amazon-location-client
GitHub Repository: aws-geospatial/amazon-location-client-js
Prefer Resourceless Operations
Amazon Location Places, Maps and Routes services offer both resource-based and resourceless API operations. Resourceless operations are often simpler and more appropriate for many use cases.
Resource-based operations require you to:
Create and configure Amazon Location Service resources (maps, place indexes, route calculators)
Manage resource lifecycle and permissions
Handle resource naming and organization
Resourceless operations allow you to:
Make API calls directly without pre-creating resources
Reduce deployment complexity
Simplify IAM permissions and API Key permissions
Authentication and Permissions
When discussing permissions for Amazon Location Places, Maps and Routes services, always include both IAM permissions and API Key permissions in your guidance. If the type of application being developed is clear, recommend the appropriate authorization tool as described below:
IAM Permissions - Recommended for server-side applications and AWS SDK usage:
Used with AWS credentials (access keys, roles, etc.)
Provide fine-grained access control
Required for resource management operations
API Key Permissions - Alternative authentication method, especially useful for client-side applications or applications deployed to unauthenticated (public) users:
Simplified authentication without exposing AWS credentials
Can be configured with specific allowed operations
Useful for web and mobile applications
Supports both resource-based and resourceless operations
Enables faster subsequent map loads through CDN caching
API Key Action Names - API keys use their own action naming convention. Do NOT use SDK client names or IAM action names — they will be rejected.
Resourceless API key actions (recommended):
| Service | AllowActions | AllowResources |
|---|---|---|
| Maps | geo-maps:GetTile, geo-maps:GetStaticMap | arn:aws:geo-maps:REGION::provider/default |
| Places | geo-places:Autocomplete, geo-places:Geocode, geo-places:ReverseGeocode, geo-places:SearchText, geo-places:SearchNearby, geo-places:Suggest, geo-places:GetPlace | arn:aws:geo-places:REGION::provider/default |
| Routes | geo-routes:CalculateRoutes, geo-routes:CalculateRouteMatrix, geo-routes:CalculateIsolines, geo-routes:OptimizeWaypoints, geo-routes:SnapToRoads | arn:aws:geo-routes:REGION::provider/default |
Do NOT use legacy geo: prefixed actions (e.g., geo:GetMap*, geo:CalculateRoute) — these are for pre-created resources only and will not work with resourceless APIs.
LocationClient Setup
Geofencing and Tracking use LocationClient (@aws-sdk/client-location). These are resource-based operations — you MUST create resources (trackers, geofence collections) before using them.
import { LocationClient } from "@aws-sdk/client-location";
// Server-side: uses IAM credentials from environment/role
const client = new LocationClient({ region: "us-east-1" });// Client-side: uses Amazon Cognito
import { LocationClient } from "@aws-sdk/client-location";
import { fromCognitoIdentityPool } from "@aws-sdk/credential-providers";
const client = new LocationClient({
region: "us-east-1",
credentials: fromCognitoIdentityPool({
identityPoolId: "us-east-1:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
clientConfig: { region: "us-east-1" },
}),
});MCP Server Integration
Integrates with the AWS MCP Server (Apache-2.0 license) which provides access to AWS documentation, API references, and direct API interactions. See the Getting Started Guide for setup and credential configuration. To use a non-default region, add "--metadata", "AWS_REGION=<your-region>" to your MCP config args.
Additional Resources
Reference Files
Load these resources as needed for specific implementation guidance:
Address Input - Create effective address input forms for users with address type ahead completion improving input speed and accuracy
Address Verification - Verify and standardize addresses in bulk against authoritative postal data using the asynchronous Jobs API (StartJob with Action ValidateAddress), before persisting to databases or taking downstream actions
Calculate Routes - Calculate routes between locations with customizable travel options and display them on maps
Device Tracking - Track device locations in real time and query position history
Dynamic Map Rendering - Render dynamic maps with MapLibre
Google Maps Migration (Android) - Migrate Android application from Google Maps SDK for Android to Amazon Location Service
Google Maps Migration (iOS) - Migrate iOS application from Google Maps SDK for iOS to Amazon Location Service
Google Maps Migration (JavaScript) - Migrate JavaScript web application from Google Maps API to Amazon Location Service
Places Search - Search for places or points of interest
Web JavaScript - Integrate Amazon Location services into web browser applications
Zone Alerts - Monitor device positions against geographic boundaries and react to zone entry or exit
Files
- ATTRIBUTION.mdAdded by AutoGineer1.0 KiB
- LICENSELicence file added by AutoGineer9.9 KiB
- NOTICELicence file added by AutoGineer89 B
- SKILL.md15.5 KiB
- references/address-input.md10.1 KiB
- references/address-verification.md24.3 KiB
- references/calculate-routes.md41.5 KiB
- references/device-tracking.md13.4 KiB
- references/dynamic-map.md12.6 KiB
- references/google-migration-android.md25.4 KiB
- references/google-migration-ios.md27.0 KiB
- references/google-migration-web.md31.0 KiB
- references/places-search.md18.1 KiB
- references/web-javascript.md15.1 KiB
- references/zone-alerts.md13.1 KiB
references/zone-alerts.md
Zone Alerts
Audience Note: Keywords MUST, SHOULD, MAY in this document indicate requirements for agent recommendations to users, following RFC 2119.
Detect when devices enter or exit geographic zones and trigger automated actions. This is the core geofencing pattern — applicable to delivery arrival notifications, fleet compliance monitoring, asset tracking, and any scenario where crossing a boundary should trigger a response.
The workflow is: define zones → evaluate positions → react to events.
Language note: Code examples below use JavaScript (
@aws-sdk/client-location). When the user's project uses a different language, translate the API calls to the equivalent AWS SDK — the operation names, parameters, and response shapes are identical across SDKs.
Table of Contents
Step 1: Create a Geofence Collection
Step 2: Define Zones
Step 3: Evaluate Device Positions
Step 4: React to Events via EventBridge
Forecast Geofence Events
Error Handling
Cost Considerations
Best Practices
Step 1: Create a Geofence Collection
A geofence collection groups zones together. A collection holds up to 50,000 geofences.
import { CreateGeofenceCollectionCommand } from "@aws-sdk/client-location";
const response = await client.send(
new CreateGeofenceCollectionCommand({
CollectionName: "my-delivery-zones",
Description: "Warehouse and customer delivery zones",
Tags: { Environment: "Production" },
}),
);
// response.CollectionArn → "arn:aws:geo:us-east-1:123456789012:geofence-collection/my-delivery-zones"Step 2: Define Zones
Use PutGeofence (single) or BatchPutGeofence (bulk) to add geofences to the collection.
Four geometry types:
Circle — center point
[lng, lat]withRadiusin meters. Simplest option, use when "within X meters of a point" is sufficient.Polygon — outer ring required, optional interior rings for exclusion holes. Use for irregular zone shapes. Maximum 1,000 vertices.
MultiPolygon — multiple polygons as one geofence. Use when a single logical zone spans disconnected areas.
Geobuf — base64-encoded binary for GeoJSON Polygon or MultiPolygon. Supports up to 100,000 vertices (vs 1,000 for plain Polygon). Use for complex boundaries like detailed coastlines or city limits.
Attach GeofenceProperties (key-value metadata, max 3 properties, key max 20 chars, value max 40 chars) to zones for downstream filtering in EventBridge rules.
import {
PutGeofenceCommand,
BatchPutGeofenceCommand,
} from "@aws-sdk/client-location";
// Circle geofence — "within 500m of warehouse"
await client.send(
new PutGeofenceCommand({
CollectionName: "my-delivery-zones",
GeofenceId: "warehouse-zone-1",
GeofenceProperties: { Type: "Warehouse", Priority: "High" },
Geometry: {
Circle: {
Center: [-122.3394, 47.6159], // [longitude, latitude]
Radius: 500, // meters
},
},
}),
);
// Polygon geofence — irregular boundary
await client.send(
new PutGeofenceCommand({
CollectionName: "my-delivery-zones",
GeofenceId: "restricted-area-1",
GeofenceProperties: { Type: "RestrictedArea" },
Geometry: {
Polygon: [
[
[-122.34, 47.62],
[-122.34, 47.61],
[-122.33, 47.61],
[-122.33, 47.62],
[-122.34, 47.62], // first and last point MUST match to close the ring
],
],
},
}),
);
// Bulk add — up to 10 geofences per batch
await client.send(
new BatchPutGeofenceCommand({
CollectionName: "my-delivery-zones",
Entries: [
{
GeofenceId: "customer-zone-1",
GeofenceProperties: { Type: "CustomerSite" },
Geometry: { Circle: { Center: [-122.35, 47.62], Radius: 200 } },
},
{
GeofenceId: "customer-zone-2",
GeofenceProperties: { Type: "CustomerSite" },
Geometry: { Circle: { Center: [-122.3, 47.6], Radius: 150 } },
},
],
}),
);Step 3: Evaluate Device Positions
Choose one of two approaches:
Option A: Link a Tracker (recommended for most cases)
SHOULD be used when you need location history, map display, or continuous monitoring. Position updates sent to the tracker are automatically evaluated against all linked geofence collections. Trackers accept updates via AWS SDKs or MQTT (for IoT devices).
import {
CreateTrackerCommand,
AssociateTrackerConsumerCommand,
BatchUpdateDevicePositionCommand,
} from "@aws-sdk/client-location";
// 1. Create a tracker
await client.send(
new CreateTrackerCommand({
TrackerName: "my-fleet-tracker",
PositionFiltering: "AccuracyBased", // or "DistanceBased" | "TimeBased"
}),
);
// 2. Link tracker to geofence collection (max 5 collections per tracker)
await client.send(
new AssociateTrackerConsumerCommand({
TrackerName: "my-fleet-tracker",
ConsumerArn:
"arn:aws:geo:us-east-1:123456789012:geofence-collection/my-delivery-zones",
}),
);
// 3. Send position updates — automatically evaluated against linked geofences
await client.send(
new BatchUpdateDevicePositionCommand({
TrackerName: "my-fleet-tracker",
Updates: [
{
DeviceId: "truck-01",
Position: [-122.3394, 47.6159], // [longitude, latitude]
SampleTime: new Date().toISOString(),
Accuracy: { Horizontal: 10.0 },
PositionProperties: { VehicleType: "Truck" },
},
],
}),
);Note: Tracker and geofence collection MUST be in the same AWS account — cross-account associations are not supported.
Tracker Position Filtering
Filtering mode controls cost and GPS jitter. See Position Filtering Modes in the device-tracking reference for the full comparison table (AccuracyBased, DistanceBased, TimeBased).
Option B: Direct BatchEvaluateGeofences Call
SHOULD be used when you only need event detection without storing positions, or when you want to selectively evaluate (not every update). Maximum 10 device position updates per call.
import { BatchEvaluateGeofencesCommand } from "@aws-sdk/client-location";
await client.send(
new BatchEvaluateGeofencesCommand({
CollectionName: "my-delivery-zones",
DevicePositionUpdates: [
{
DeviceId: "truck-01",
Position: [-122.3394, 47.6159], // [longitude, latitude]
SampleTime: new Date().toISOString(),
Accuracy: { Horizontal: 10.0 },
PositionProperties: { VehicleType: "Truck" },
},
],
}),
);
// Returns 200 with an Errors array for per-entry failures; events are emitted asynchronously to EventBridgeBoth approaches emit ENTER and EXIT events to Amazon EventBridge when positions cross zone boundaries.
Event Behavior Gotchas
IMPORTANT: Understand how events are generated to avoid surprises:
First evaluation DOES fire ENTER if inside a geofence: The first position update for a new DeviceId generates an
ENTERevent immediately if the device is inside a geofence — there is no "warm-up" period. If outside all geofences, no event is generated and the position becomes the baseline. Subsequent updates generate events on boundary crossings. If you expect an ENTER event but don't see it processed, check the downstream target (Lambda, SQS) for errors before assuming the event wasn't generated.30-day state retention: Amazon Location maintains previous position state for 30 days per device. After 30 days of inactivity, the next update is treated as a fresh baseline (same rules as first evaluation).
Events fire on boundary crossings, not every update: You will NOT receive an event for every position update — only when a device transitions between inside and outside a geofence.
Step 4: React to Events via EventBridge
Create EventBridge rules to route geofence events to targets like Lambda, SNS (notifications), or SQS (queues).
Match all geofence events
{
"source": ["aws.geo"],
"detail-type": ["Location Geofence Event"]
}Match only ENTER events with property filter
{
"source": ["aws.geo"],
"detail-type": ["Location Geofence Event"],
"detail": {
"EventType": ["ENTER"],
"GeofenceProperties": { "Type": ["Warehouse"] },
"PositionProperties": { "VehicleType": ["Truck"] }
}
}Event payload structure
{
"detail-type": "Location Geofence Event",
"source": "aws.geo",
"detail": {
"EventType": "ENTER",
"GeofenceId": "warehouse-zone-1",
"DeviceId": "truck-01",
"SampleTime": "2024-01-15T12:00:00Z",
"Position": [-122.3394, 47.6159],
"Accuracy": { "Horizontal": 10.0 },
"GeofenceProperties": { "Type": "Warehouse", "Priority": "High" },
"PositionProperties": { "VehicleType": "Truck" }
}
}Forecast Geofence Events
Use ForecastGeofenceEvents to predict upcoming boundary crossings based on a device's current position and speed. Returns forecasted ENTER, EXIT, or IDLE events within a time horizon. This API is synchronous — forecasted events are returned directly in the response. Use this when you need immediate results. For asynchronous evaluation that publishes events to Amazon EventBridge, use BatchEvaluateGeofences (see Option B above).
import { ForecastGeofenceEventsCommand } from "@aws-sdk/client-location";
const response = await client.send(
new ForecastGeofenceEventsCommand({
CollectionName: "my-delivery-zones",
DeviceState: {
Position: [-122.3394, 47.6159],
Speed: 50,
},
TimeHorizonMinutes: 30,
SpeedUnit: "KilometersPerHour",
DistanceUnit: "Kilometers",
}),
);
response.ForecastedEvents.forEach((event) => {
console.log(
`${event.EventType} ${event.GeofenceId} — ` +
`breach in ${event.ForecastedBreachTime}, ` +
`distance: ${event.NearestDistance} ${response.DistanceUnit}`,
);
});
// EventType: "ENTER" | "EXIT" | "IDLE"
// IDLE means device is inside the geofence and will remain inside through the time horizonNote: Heading direction is not considered — the API takes a conservative approach and includes events for any heading. Omit TimeHorizonMinutes to perform a containment check only (which geofences is the device currently inside?).
Error Handling
Common Errors
| Error | HTTP Status | Cause |
|---|---|---|
ResourceNotFoundException | 404 | Collection or tracker name doesn't exist |
ValidationException | 400 | Invalid geometry, coordinate order wrong, or parameter constraints violated |
ConflictException | 409 | Collection name already exists, or tracker already linked to this collection |
ThrottlingException | 429 | Request rate exceeded — implement exponential backoff |
AccessDeniedException | 403 | IAM or Cognito permissions missing for the operation |
ServiceQuotaExceededException | 402 | Account limit reached (e.g., max geofence collections) |
Batch Operation Errors
BatchPutGeofence and BatchEvaluateGeofences return partial success — some entries MAY succeed while others fail. Always check the Errors array in the response:
const response = await client.send(new BatchPutGeofenceCommand({/* ... */}));
if (response.Errors?.length > 0) {
response.Errors.forEach((error) => {
console.error(
`Failed geofence ${error.GeofenceId}: ${error.Error.Message}`,
);
});
}Geometry Validation Errors
Polygon first and last coordinates MUST be identical (ring must close)
Maximum 1,000 vertices per polygon/multipolygon (use Geobuf for up to 100,000)
Only one geometry type per geofence (Circle OR Polygon OR MultiPolygon)
Circle radius MUST be greater than 0
Cost Considerations
Billed per location update received + per geofence collection evaluation per update
Combine related zones into fewer collections to reduce evaluation costs
Use position filtering (AccuracyBased or DistanceBased) to reduce unnecessary updates and lower costs
See the device-tracking reference for detailed cost examples by filtering mode and update frequency
Best Practices
Use
GeofencePropertiesandPositionPropertiesas metadata for fine-grained EventBridge filteringDe-duplicate events using the EventBridge event
idfieldSet
Accuracy.Horizontalwhen available to improve boundary crossing precision and enable accuracy-based filteringFor high-frequency position updates, prefer tracker linking (Option A) over direct API calls
Use
ForecastGeofenceEventsto predict upcoming boundary crossings based on device trajectoryTo also query device positions and history, see the device-tracking reference
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Needs an MCP server, Needs an API key
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Created by
- aws-geospatial
- Publisher
- AWS Labs (Official)
- Distributed by
- AWS Labs
- Source
- awslabs/agent-plugins · plugins/amazon-location-service/skills/amazon-location-service · commit fbefb37
- Licence
- Apache License 2.0 (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- NOTICE (added by AutoGineer from NOTICE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by aws-geospatial or AWS Labs.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download amazon-location-service.zip