
Pokhara Ready: Build a Map Guide to Your Hometown with Amazon Location Service, S3 and CloudFront
How I turned real OpenStreetMap data into a searchable, filterable map with walking and driving directions for visitors to Pokhara, Nepal. Includes the data pipeline, a restricted Amazon Location API key, a private S3 bucket behind CloudFront, and the steps to rebuild it for your own city.
AWS Community Builder
Explore. Find. Get there.
I know Pokhara as my hometown. I know its familiar places, its streets, and the areas people usually visit. But knowing a city and arriving in it for the first time are two very different experiences.
I once noticed a tourist becoming genuinely anxious because they could not locate a local place they were trying to reach. It was not a famous landmark or a remote destination. It was an ordinary place that someone familiar with Pokhara might find without much difficulty. But for someone unfamiliar with the area, finding it was not that simple.
That moment stayed with me.
It made me think about how much we take local knowledge for granted. A visitor might know the name of a place but still have no idea where exactly it is, what kind of places the city has, or how to get there.
So I decided to build something around that problem.
Pokhara Ready is an interactive map application that brings useful places across Pokhara, Nepal, into one place. It helps visitors and residents discover local attractions, healthcare facilities, safety-related locations, transport points, restaurants, accommodation, and ATMs. Users can explore these locations on a map and request walking or driving directions.
I wanted to build more than another map of tourist attractions. I wanted to create a practical guide to the city, something that could help a person unfamiliar with Pokhara navigate it with a little more confidence.
- Live application: https://dqqiwivnw0mga.cloudfront.net/
- GitHub repository: https://github.com/Aaishaa1/Pokhara-mapping-guide

Try it in 30 seconds
- Type airport in the search box. Both airports appear. Press Enter and the map flies to one and opens its card.
- Click Health in the sidebar to see the healthcare places on their own.
- Open any place, choose Directions, set your start, and switch between Drive and Walk to see the route and the time change.
1. The Idea: A Map That Answers Practical Questions
Most maps answer one basic question: Where is this place?
Pokhara Ready is designed around a few more practical questions:
- Where can I find a hospital, healthcare facility, or ATM?
- What kinds of places does the city have, and where are they?
- Where are the transport points?
- How far away is a place?
- Can I walk or drive there?
Instead of making users search through separate websites or browse a long directory, the application brings these locations together on an interactive map.
The map is the primary interface. Users can search for a place, filter locations by category, select markers to inspect details, and request walking or driving directions.
I chose to focus on ordinary local places because those are often the places visitors need most when they are actually in a city. A tourist attraction might be the reason someone visits Pokhara. A nearby ATM, pharmacy, restaurant, or transport point might be what they need next.
2. What You Can Do on the Map
- Search by name, category, type or address. Arrow keys, Enter and Esc all work, so you never need the mouse. If a result is hidden by your current filter, the map switches back to All so a search never finds nothing by mistake.
- Filter by category: Attractions, Health, Safety, Transport, Food, Accommodation and ATMs. Each shows how many places it holds.
- Open a place card with its type, address and coordinates, plus a phone number and website when the data has them.
- Get directions, driving or walking. Start from your own location, click a spot on the map, or type a place name. The route is drawn with its distance and travel time, and the map zooms to fit it.
- Use it on a phone. The categories become scrolling chips and the place card slides up from the bottom, because most visitors will open this while standing in the street.



3. Technology Stack
I kept the implementation lightweight and chose tools that fit the requirements of a browser-based mapping application.
Technology / Service | Role in the Project |
|---|---|
HTML | Application structure |
CSS | Layout, styling, and responsive interface |
JavaScript | Search, filtering, map interactions, and application logic |
MapLibre GL JS | Interactive map rendering and map layers |
Python | Geographic data preparation and processing |
OpenStreetMap | Source of geographic and point-of-interest data |
Overpass API | Querying OpenStreetMap data |
GeoJSON | Standard format for storing and displaying geographic features |
Amazon Location Service – Maps | Managed map capabilities |
Amazon Location Service – Routes | Walking and driving route calculations |
Amazon S3 | Private storage for static application assets and geographic data |
Amazon CloudFront | Content delivery for the web application |
The goal was not to use as many technologies as possible. It was to keep the architecture understandable, maintainable, and appropriate for the problem.
4. Collecting and Preparing Real Geographic Data
The project starts with geographic data rather than manually created sample coordinates.
I used OpenStreetMap (OSM) as the source for public geographic information about Pokhara. Through Overpass queries, I extracted relevant points of interest and organized them into seven categories. The prepared dataset contains 267 locations:
Category | Places |
|---|---|
Attractions | 30 |
Health | 55 |
Safety | 25 |
Transport | 27 |
Food | 50 |
Accommodation | 50 |
ATMs | 30 |
Turning Raw Data into GeoJSON
Raw geographic data is not immediately ready for an application. It needs to be cleaned, organized, and converted into a format that the frontend can consume.
I used a Python script to process the extracted Overpass JSON data and generate a GeoJSON FeatureCollection. The process includes:
- Mapping relevant OpenStreetMap tags to application categories.
- Handling different OSM element types and their geographic coordinates.
- Skipping records without usable names or coordinates.
- Keeping available metadata such as addresses, phone numbers, websites, and opening hours.
- Removing nearby duplicate records using name, category, and geographic distance checks.
A simplified GeoJSON feature looks like this:
{ "type": "Feature", "geometry": { "type": "Point", "coordinates": [83.9856, 28.2096] }, "properties": { "name": "Example Location", "category": "health", "source": "OpenStreetMap" }}One important detail is that GeoJSON stores coordinates in longitude, latitude order. Getting this wrong can cause locations to appear in completely incorrect places.
A valid coordinate does not automatically mean that a business is still operating or that every detail is accurate, so the app depends on the quality of the underlying OpenStreetMap data.
5. How AWS Powers Pokhara Ready
Amazon S3: Storing the Application and Geographic Data
I use Amazon S3 to store the static frontend assets and the prepared GeoJSON dataset. The bucket is private, with public access blocked. No database server is needed for this first version.
This keeps the architecture simple and lets the dataset be updated independently of the application. If geographic information changes, I can prepare and validate a new GeoJSON file and upload it without redesigning the app.
Amazon CloudFront: Delivering the Application
Amazon CloudFront is the only way the public reaches the app. It reads the private bucket through origin access control and serves everything over HTTPS, so nobody can open the bucket directly and I don't have to run a web server.
Amazon Location Service: Maps and Routes
Maps: Amazon Location Service provides the base map. The GeoJSON places are drawn on top of it, so users can explore them in their real-world context.
Routes: When a user selects a destination and asks for directions, the app sends a route request to Amazon Location Service Routes and draws the result on the map.
An honest limit: Amazon Location routing supports car, truck, walking and scooter, but not public transit. I chose not to draw bus routes that would only look real. A wrong bus route can send a tired traveler to the wrong stop, which is worse than no route. So the app offers Drive and Walk only and says so openly.
The two data sources have different jobs:
- OpenStreetMap provides the public places users can explore.
- Amazon Location Service provides the base map and supported route calculations.
- Pokhara Ready connects them into one experience.
6. Architecture Overview
The application is serverless: static hosting plus managed location services, with nothing running between visits.

OpenStreetMap | vOverpass API --> Python processing --> GeoJSON dataset | v Amazon S3 (private bucket) | origin access control v Amazon CloudFront (HTTPS) | v Browser-based application | | v v Amazon Location Maps Amazon Location RoutesComponent | Responsibility |
|---|---|
OpenStreetMap and Overpass API | Provide geographic source data |
Python processing script | Cleans, organizes, and converts the data |
GeoJSON | Provides structured location data |
Amazon S3 | Stores the app files and dataset in a private bucket |
Amazon CloudFront | Delivers the application over HTTPS |
Browser application | Handles search, filtering, markers and interactions |
Amazon Location Maps | Provides the map experience |
Amazon Location Routes | Calculates walking and driving routes |
Search and filtering run in the browser, so ordinary interactions make no cloud requests and cost nothing. Only route calculation calls Amazon Location Service.
I did not want to add a database, application server, or extra infrastructure just to make the architecture look more complicated. For a small set of public geographic data and a static frontend, these services do everything this version needs.
How to Build It Yourself
Here is the path I followed, in the order I would repeat it.
Step 1: Get the places from OpenStreetMap
Overpass lets you query OpenStreetMap by area and tag. For example, this query returns hospitals and ATMs inside a bounding box (south, west, north, east):
[out:json][timeout:60];( nwr["amenity"="hospital"](28.10,83.85,28.33,84.10); nwr["amenity"="atm"](28.10,83.85,28.33,84.10););out center tags;Add one line per tag you need (pharmacy, bus_station, restaurant, hotel and so on). Save the result as
export.json .Step 2: Turn it into GeoJSON
A short Python script walks through the elements and does four things: it maps OSM tags to your categories, takes coordinates from
lat/lon or from center for ways and relations, skips records with no name, and removes nearby duplicates using the Haversine distance. It writes a FeatureCollection with [longitude, latitude] coordinates and the properties id , name , category , subcategory and, where present, address , phone and website .Step 3: Create a restricted Amazon Location API key
In the Amazon Location console, create an API key that allows only the map actions and
geo-routes:CalculateRoutes , and set Allowed referers to your site's domain (plus http://localhost:* while developing). The key is safe to use in the browser only because of these restrictions.Step 4: Show the base map and your data
const styleUrl = `https://maps.geo.${region}.amazonaws.com/v2/styles/${mapStyle}/descriptor?key=${apiKey}`;
const map = new maplibregl.Map({ container: "map", style: styleUrl, center: [83.9856, 28.2096], zoom: 12});
map.on("load", async () => { const data = await (await fetch("data/pokhara-places.geojson")).json(); map.addSource("places", { type: "geojson", data }); map.addLayer({ id: "places-circle", type: "circle", source: "places", paint: { "circle-radius": 6, "circle-color": ["match", ["get", "category"], "health", "#b5473f", "transport", "#3f7d5a", "#555555"], "circle-stroke-width": 1.5, "circle-stroke-color": "#ffffff" } });});Category filtering is then one line:
map.setFilter("places-circle", ["==", ["get", "category"], id]) .Step 5: Add routing
const res = await fetch(`https://routes.geo.${region}.amazonaws.com/v2/routes?key=${apiKey}`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ Origin: [originLon, originLat], Destination: [destLon, destLat], TravelMode: "Pedestrian", // or "Car" LegGeometryFormat: "Simple" })});const route = (await res.json()).Routes[0];const line = route.Legs.flatMap((l) => l.Geometry.LineString);Put
line into a GeoJSON source and draw it with a line layer. Read the distance and duration from the route summary. Remember to cache results, to reject starting points outside your area before calling the API, and to ignore an old response if a newer request has replaced it.Step 6: Deploy with S3 and CloudFront
- Create an S3 bucket and keep Block all public access on.
- Upload
index.html,styles.css,app.js,config.jsanddata/pokhara-places.geojson.
- Create a CloudFront distribution with the bucket as the origin and origin access control, and let CloudFront update the bucket policy.
- Set the default root object to
index.html.
- If your files sit inside a folder in the bucket, set the origin path to that folder, or you will get Access Denied.
- Add your CloudFront domain to the API key's allowed referers, then test in an incognito window.
7. Challenges I Faced and How I Addressed Them
Building Pokhara Ready involved more than displaying locations on a map. The hardest parts were working with real data and connecting the frontend to AWS.
1. Inconsistent geographic data
Not every OpenStreetMap record has the same information. Some have addresses, phone numbers or websites, while others have only a name and coordinates. A Python script categorizes records, handles the different element types, skips incomplete entries, and produces one consistent GeoJSON structure.
2. Duplicate locations
The extracted data could contain several records for the same or a nearby place, which clutters the map. The script uses names, categories and the Haversine distance to find and remove nearby duplicates.
3. Getting coordinates right
GeoJSON uses longitude then latitude, and the wrong order puts markers in the wrong place. I validated coordinates and the feature structure before using them on the map.
4. Connecting to Amazon Location Service
I had to handle configuration, API requests and responses correctly, load the map, send route requests, and draw the returned route. I also handled failed or unusable responses.
5. Route requests and user behavior
Users can pick the same start and destination, change their destination while a request is still running, or hit a failed request. I added checks for places that are too close together, a boundary check that rejects starting points outside Pokhara before any API call, request tokens so a stale answer never overwrites a newer one, and caching so the same route is not requested twice.
6. Deployment: Access Denied
After building everything locally, my first CloudFront link greeted me with a plain Access Denied. The cause was simple: my files were inside a folder in the bucket, and CloudFront was looking for
index.html at the top level. Setting the origin path fixed it. As a QA engineer, I had to smile. The bug wasn't in the code I had tested. It was in the delivery, which is a good reminder to test the live link and not just localhost.8. What I Focused on as a QA Engineer
My background is in software quality assurance, and that shaped how I built this. A map can look correct while giving users wrong information: a marker at the wrong coordinates, a filter hiding valid results, or a route that doesn't match the destination.
So I checked:
Area | What I checked |
|---|---|
Geographic accuracy | Coordinate order and marker placement |
Search and filters | That users find the right places and that categories show what they should |
Place details | That the card matches the selected marker |
Routing | Route requests, results and drawing, for both Drive and Walk |
Responsive layout | Desktop, tablet and mobile screens |
Failure cases | Empty search results and unavailable routes |
Data quality | Missing names, incomplete fields and possibly outdated records |
I also kept the interface simple. The map should help people find information, not compete with extra controls.
9. Security Considerations
The app calls Amazon Location Service from the browser, so its configuration needs care.
- The S3 bucket is private, and only CloudFront can read it.
- The browser uses a restricted Amazon Location API key, limited to the map and route actions and to my site's domain through allowed referrers.
- No secret keys appear in the article or the public repository. The real
config.jsis not committed, and the repo includes aconfig.example.jswith placeholders.
window.APP_CONFIG = { region: "YOUR_AWS_REGION", apiKey: "YOUR_RESTRICTED_LOCATION_API_KEY", mapStyle: "YOUR_MAP_STYLE"};A browser-side API key should not be treated as a secret. It should be restricted to what the app needs.
10. What I Would Build Next
- Nearby: from any point on the map, show the closest bus stations, hospitals or ATMs.
- Verified public transport data: add real routes, stops and schedules once reliable local data exists.
- Data freshness: a repeatable process to refresh the data and flag outdated records.
- Accessibility information: verified details about accessible entrances and facilities.
- Better local coverage: more complete public places across Pokhara. If you live here, you can help by adding missing places to OpenStreetMap.
- Other cities: the same architecture could work for any destination with a local dataset.
11. What I Learned
This project reinforced something I find important about cloud architecture: using more services does not necessarily make a solution better. The challenge was to work out what the application actually needed and choose services for exactly those jobs.
I worked with real geographic data, prepared and validated GeoJSON, and connected it to managed mapping and routing. I also thought harder about the difference between showing a location and giving a reliable way to reach it, which is why the app says plainly what it cannot do.
But the most important lesson was not technical.
A place that feels familiar to one person can feel completely unfamiliar to another. Sometimes a small amount of useful information can make a big difference to someone's experience of a city.
I started Pokhara Ready with one tourist struggling to find a local place in my hometown. I wanted to turn that observation into something practical.
Pokhara is a city I know. Pokhara Ready is my attempt to help someone else get to know it, one location at a time.
Try Pokhara Ready
Project: Pokhara Ready
Tagline: Explore. Find. Get there.
- Live application: https://dqqiwivnw0mga.cloudfront.net/
- GitHub repository: https://github.com/Aaishaa1/Pokhara-mapping-guide
Data attribution: © OpenStreetMap contributors. OpenStreetMap data is available under the Open Database License (ODbL). Data completeness and accuracy may vary.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article