本文へ移動
cccskills
無料GitHub で公開

amazon-location-service

Integrates Amazon Location Service APIs for AWS applications. Use this skill when users want to add maps (interactive MapLibre or static images); geocode addresses to coordinates or reverse geocode coordinates to addresses; calculate routes, travel times, or service areas; find places and businesses through text search, nearby search, or autocomplete suggestions; retrieve detailed place information including hours, contacts, and addresses; monitor geographical boundaries with geofences; or track device locations. Covers authentication, SDK integration, and all Amazon Location Service capabilities.

インストール方法を見る

含まれるファイル(12)

  • SKILL.md15.5 KB
  • references/address-input.md10.1 KB
  • references/address-verification.md24.3 KB
  • references/calculate-routes.md41.5 KB
  • references/device-tracking.md13.4 KB
  • references/dynamic-map.md12.6 KB
  • references/google-migration-android.md25.4 KB
  • references/google-migration-ios.md27.0 KB
  • references/google-migration-web.md31.0 KB
  • references/places-search.md18.1 KB
  • references/web-javascript.md15.1 KB
  • references/zone-alerts.md13.1 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

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:

  1. Using Title instead of Address.Label for display: In Autocomplete results, always display Address.Label. The Title field may show components in reverse order and is not suitable for user-facing text.

  2. 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.

  3. Forgetting validateStyle: false in MapLibre config: Always set validateStyle: false in the MapLibre Map constructor for faster map load times with Amazon Location styles.

  4. Mixing resource-based and resourceless operations: When possible, prefer resourceless operations (direct API calls without pre-created resources) for simpler deployment and permissions.

  5. Inconsistent API operation naming: Use the format service:Operation when referencing APIs (e.g., geo-places:Geocode, geo-maps:GetStyleDescriptor). SDK clients use @aws-sdk/client-* format.

  6. 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.

  7. Wrong action names in API Key permissions: API key AllowActions use geo-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 (MatchScores overall + 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 MatchScores is 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:

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:

Resources:

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):

ServiceAllowActionsAllowResources
Mapsgeo-maps:GetTile, geo-maps:GetStaticMaparn:aws:geo-maps:REGION::provider/default
Placesgeo-places:Autocomplete, geo-places:Geocode, geo-places:ReverseGeocode, geo-places:SearchText, geo-places:SearchNearby, geo-places:Suggest, geo-places:GetPlacearn:aws:geo-places:REGION::provider/default
Routesgeo-routes:CalculateRoutes, geo-routes:CalculateRouteMatrix, geo-routes:CalculateIsolines, geo-routes:OptimizeWaypoints, geo-routes:SnapToRoadsarn: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

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Build and deploy full-stack web and mobile apps with AWS Amplify Gen2 (TypeScript code-first). Covers auth (Cognito), data (AppSync/DynamoDB including schema modeling, enum types, relationships, authorization rules), storage (S3), functions, APIs, and AI (Amplify AI Kit with Bedrock). Supports React, Next.js, Vue, Angular, React Native, Flutter, Swift, and Android. Always use this skill for Amplify Gen2 topics — even for questions you think you know — it contains validated, version-specific patterns that prevent common mistakes. TRIGGER when: user mentions Amplify Gen2; project has amplify/ directory or amplify_outputs; code imports @aws-amplify packages; user asks about defineBackend, defineAuth, defineData, defineStorage, or npx ampx. SKIP: Amplify Gen1 (amplify CLI v6), standalone SAM/CDK without Amplify (use aws-serverless), direct Bedrock without Amplify AI Kit (use bedrock).

日本語の概要は準備中です。原文の説明を表示しています。

awslabs/agent-plugins9172026年10月10日 更新

Build, manage, and operate APIs with Amazon API Gateway (REST, HTTP, and WebSocket). Triggers on phrases like: API Gateway, REST API, HTTP API, WebSocket API, custom domain, Lambda authorizer, usage plan, throttling, CORS, VPC link, private API. Also covers troubleshooting API Gateway errors (4xx, 5xx, timeout, CORS failures) and IaC templates containing API Gateway resources. For general REST API design unrelated to AWS, do not trigger.

日本語の概要は準備中です。原文の説明を表示しています。

awslabs/agent-plugins9172026年10月10日 更新

Generate validated AWS architecture diagrams as draw.io XML using official AWS4 icon libraries. Use this skill whenever the user wants to create, generate, or design AWS architecture diagrams, cloud infrastructure diagrams, or system design visuals. Also triggers for requests to visualize existing infrastructure from CloudFormation, CDK, or Terraform code. Supports two modes: analyze an existing codebase to auto-generate diagrams, or brainstorm interactively from scratch. Exports .drawio files with optional PNG/SVG/PDF export via draw.io desktop CLI.

日本語の概要は準備中です。原文の説明を表示しています。

awslabs/agent-plugins9172026年10月10日 更新

Design, build, deploy, test, and debug serverless applications with AWS Lambda. Triggers on phrases like: Lambda function, event source, serverless application, API Gateway, EventBridge, Step Functions, serverless API, event-driven architecture, Lambda trigger. For deploying non-serverless apps to AWS, use deploy-on-aws plugin instead.

日本語の概要は準備中です。原文の説明を表示しています。

awslabs/agent-plugins9172026年10月10日 更新

Build resilient, long-running, multi-step applications with AWS Lambda durable functions with automatic state persistence, retry logic, and orchestration for long-running executions. Covers the critical replay model, step operations, wait/callback patterns, error handling with saga pattern, testing with LocalDurableTestRunner. Triggers on phrases like: lambda durable functions, workflow orchestration, state machines, retry/checkpoint patterns, long-running stateful Lambda functions, saga pattern, human-in-the-loop callbacks, and reliable serverless applications.

日本語の概要は準備中です。原文の説明を表示しています。

awslabs/agent-plugins9172026年10月10日 更新

Evaluate, configure, and migrate workloads to AWS Lambda Managed Instances (LMI). Triggers on: Lambda Managed Instances, LMI, capacity provider, multi-concurrency Lambda, dedicated instance Lambda, EC2-backed Lambda, cold start elimination, Graviton Lambda, instance type for Lambda, scheduled scaling for LMI, Lambda cost optimization with Reserved Instances or Savings Plans. Also trigger when users describe high-volume predictable workloads seeking cost savings, want to scale LMI capacity on a schedule, or compare Lambda vs EC2 for steady-state traffic. For standard Lambda without LMI, use the aws-lambda skill instead.

日本語の概要は準備中です。原文の説明を表示しています。

awslabs/agent-plugins9172026年10月10日 更新

awslabs のスキルをすべて見る

このスキルの問題を報告する