AWS Security ChangesHomeSearch

AWS documentdb documentation change

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

File: documentdb/latest/developerguide/position.md

Summary

Entire documentation page for the $position modifier in Amazon DocumentDB has been removed, including all examples, code snippets, and explanations

Security assessment

This change removes documentation about the $position modifier functionality in DocumentDB. There is no evidence in the diff that this removal is related to a security vulnerability or incident. The change appears to be routine documentation maintenance, possibly removing outdated content or consolidating documentation elsewhere. The examples in the removed content included 'Security audit' as a sample task name, but this was purely illustrative and not indicative of a security issue.

Diff

diff --git a/documentdb/latest/developerguide/position.md b/documentdb/latest/developerguide/position.md
index c1ecb6595..8b1378917 100644
--- a//documentdb/latest/developerguide/position.md
+++ b//documentdb/latest/developerguide/position.md
@@ -1 +0,0 @@
-[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#position "Open PDF")
@@ -3,156 +1,0 @@
-[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html)
-
-Example (MongoDB Shell)Code examples
-
-# $position
-
-The `$position` modifier in Amazon DocumentDB specifies the location in the array at which the `$push` operator inserts elements. Without the `$position` modifier, the `$push` operator inserts elements to the end of the array.
-
-**Parameters**
-
-  * `field`: The array field to update.
-
-  * `num`: The position in the array where elements should be inserted, based on zero-based indexing.
-
-
-
-
-**Note** : To use the `$position` modifier, it must appear with the `$each` modifier.
-
-## Example (MongoDB Shell)
-
-The following example demonstrates how to use the `$position` operator to insert tasks at specific positions in a project management system.
-
-**Create sample documents**
-    
-    
-    db.projects.insertOne({ "_id": 1, "name": "Website Redesign", "tasks": ["Design mockups"] })
-
-**Query example 1 - Add urgent tasks at the beginning**
-    
-    
-    db.projects.updateOne(
-       { _id: 1 },
-       {
-         $push: {
-            tasks: {
-               $each: ["Security audit", "Performance review"],
-               $position: 0
-            }
-         }
-       }
-    )
-
-**Output 1**
-    
-    
-    { "_id": 1, "name": "Website Redesign", "tasks": ["Security audit", "Performance review", "Design mockups"] }
-
-**Query example 2 - Add tasks at specific position**
-    
-    
-    db.projects.insertOne({ "_id": 2, "name": "Mobile App", "tasks": ["Setup project", "Create wireframes", "Deploy to store"] })
-    
-    db.projects.updateOne(
-       { _id: 2 },
-       {
-         $push: {
-            tasks: {
-               $each: ["Code review", "Testing phase"],
-               $position: 2
-            }
-         }
-       }
-    )
-
-**Output 2**
-    
-    
-    { "_id": 2, "name": "Mobile App", "tasks": ["Setup project", "Create wireframes", "Code review", "Testing phase", "Deploy to store"] }
-
-## Code examples
-
-To view a code example for using the `$position` command, choose the tab for the language that you want to use:
-
-Node.js
-    
-    
-    
-    const { MongoClient } = require('mongodb');
-    
-    async function insertTasksAtPosition() {
-      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 collection = db.collection('projects');
-    
-      await collection.updateOne(
-        { _id: 1 },
-        {
-          $push: {
-            tasks: {
-              $each: ["Security audit", "Performance review"],
-              $position: 0
-            }
-          }
-        }
-      );
-    
-      const updatedProject = await collection.findOne({ _id: 1 });
-      console.log(updatedProject);
-    
-      await client.close();
-    }
-    
-    insertTasksAtPosition();
-
-Python
-    
-    
-    
-    from pymongo import MongoClient
-    
-    def insert_tasks_at_position():
-        client = MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false')
-        db = client['test']
-        collection = db['projects']
-    
-        result = collection.update_one(
-            {'_id': 1},
-            {
-                '$push': {
-                    'tasks': {
-                        '$each': ['Security audit', 'Performance review'],
-                        '$position': 0
-                    }
-                }
-            }
-        )
-    
-        updated_project = collection.find_one({'_id': 1})
-        print(updated_project)
-    
-        client.close()
-    
-    insert_tasks_at_position()
-
-![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)
-
-$pop
-
-$pull
-
-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.