AWS Security ChangesHomeSearch

AWS documentdb documentation change

Service: documentdb · 2026-03-28 · Documentation low

File: documentdb/latest/developerguide/maxDistance.md

Summary

Entire documentation page for the $maxDistance operator has been removed, including all examples, code samples, and explanatory content about geospatial queries in Amazon DocumentDB.

Security assessment

This change removes documentation about a geospatial query operator ($maxDistance) but shows no evidence of addressing a security vulnerability, weakness, or incident. The removal appears to be part of documentation restructuring or deprecation of content, not security-related. There are no security warnings, vulnerability disclosures, or security feature additions in the removed content.

Diff

diff --git a/documentdb/latest/developerguide/maxDistance.md b/documentdb/latest/developerguide/maxDistance.md
index 21a44c197..8b1378917 100644
--- a//documentdb/latest/developerguide/maxDistance.md
+++ b//documentdb/latest/developerguide/maxDistance.md
@@ -1 +0,0 @@
-[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#maxDistance "Open PDF")
@@ -3,133 +1,0 @@
-[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html)
-
-Example (MongoDB Shell)Code examples
-
-# $maxDistance
-
-The `$maxDistance` operator in Amazon DocumentDB is used to specify the maximum distance (in meters) from a GeoJSON point that documents must be within to be included in the query results. This operator is used in conjunction with the `$nearSphere` operator to perform geospatial queries.
-
-**Parameters**
-
-  * `$maxDistance`: The maximum distance (in meters) from the reference point that documents must be within to be included in the query results.
-
-
-
-
-## Example (MongoDB Shell)
-
-The following example demonstrates how to use the `$maxDistance` operator in Amazon DocumentDB to find all state capitals within 100 kilometers of Boston.
-
-**Create sample documents**
-    
-    
-    db.capitals.insert([
-      { state: "Massachusetts", city: "Boston", location: { type: "Point", coordinates: [-71.0589, 42.3601] } },
-      { state: "Rhode Island", city: "Providence", location: { type: "Point", coordinates: [-71.4128, 41.8239] } },
-      { state: "New Hampshire", city: "Concord", location: { type: "Point", coordinates: [-71.5383, 43.2067] } },
-      { state: "Vermont", city: "Montpelier", location: { type: "Point", coordinates: [-72.5751, 44.2604] } }
-    ]);
-
-**Query example**
-    
-    
-    db.capitals.find(
-      {
-        location: {
-          $nearSphere: {
-            $geometry: { type: "Point", coordinates: [-71.0589, 42.3601] },
-            $maxDistance: 100000
-          }
-        }
-      },
-      { state: 1, city: 1, _id: 0 }
-    );
-
-**Output**
-    
-    
-    [
-      { "state": "Rhode Island", "city": "Providence" },
-      { "state": "New Hampshire", "city": "Concord" }
-    ]
-
-## Code examples
-
-To view a code example for using the `$maxDistance` command, choose the tab for the language that you want to use:
-
-Node.js
-    
-    
-    
-    const { MongoClient } = require('mongodb');
-    
-    async function findCapitalsNearBoston() {
-      const client = await MongoClient.connect('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false');
-      const db = client.db('test');
-      const capitals = db.collection('capitals');
-    
-      const result = await capitals.find({
-        location: {
-          $nearSphere: {
-            $geometry: { type: "Point", coordinates: [-71.0589, 42.3601] },
-            $maxDistance: 100000
-          }
-        }
-      }, {
-        projection: { state: 1, city: 1, _id: 0 }
-      }).toArray();
-    
-      console.log(result);
-      await client.close();
-    }
-    
-    findCapitalsNearBoston();
-
-Python
-    
-    
-    
-    from pymongo import MongoClient
-    
-    def find_capitals_near_boston():
-        client = MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false')
-        db = client.test
-        capitals = db.capitals
-    
-        result = list(capitals.find(
-            {
-                "location": {
-                    "$nearSphere": {
-                        "$geometry": { "type": "Point", "coordinates": [-71.0589, 42.3601] },
-                        "$maxDistance": 100000
-                    }
-                }
-            },
-            {"state": 1, "city": 1, "_id": 0}
-        ))
-    
-        print(result)
-        client.close()
-    
-    find_capitals_near_boston()
-
-![Warning](https://d1ge0kk1l5kms0.cloudfront.net/images/G/01/webservices/console/warning.png) **Javascript is disabled or is unavailable in your browser.**
-
-To use the Amazon Web Services Documentation, Javascript must be enabled. Please refer to your browser's Help pages for instructions.
-
-[Document Conventions](/general/latest/gr/docconventions.html)
-
-$geoWithin
-
-$minDistance
-
-Did this page help you? - Yes
-
-Thanks for letting us know we're doing a good job!
-
-If you've got a moment, please tell us what we did right so we can do more of it.
-
-Did this page help you? - No
-
-Thanks for letting us know this page needs work. We're sorry we let you down.
-
-If you've got a moment, please tell us how we can make the documentation better.