AWS Security ChangesHomeSearch

AWS documentdb documentation change

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

File: documentdb/latest/developerguide/let.md

Summary

Entire documentation file for the $let operator in Amazon DocumentDB has been removed, including all examples, code samples, and usage instructions.

Security assessment

This change removes documentation content entirely but does not indicate any security vulnerability, weakness, or incident. The removed content was purely educational about the $let operator functionality with no security context. The removal could be part of documentation reorganization or deprecation of the operator, but there's no evidence of security implications in the diff.

Diff

diff --git a/documentdb/latest/developerguide/let.md b/documentdb/latest/developerguide/let.md
index e926b6bac..8b1378917 100644
--- a//documentdb/latest/developerguide/let.md
+++ b//documentdb/latest/developerguide/let.md
@@ -1 +0,0 @@
-[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#let "Open PDF")
@@ -3,169 +1,0 @@
-[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html)
-
-Example (MongoDB Shell)Code examples
-
-# $let
-
-The `$let` operator in Amazon DocumentDB is used to bind variables to values and use those variables in the expression. It allows you to define local variables that can be used in subsequent expressions within the same stage of the aggregation pipeline.
-
-**Parameters**
-
-  * `vars`: An object that defines the variables to be used in the expression.
-
-  * `in`: The expression in which the variables defined in the vars parameter are used.
-
-
-
-
-## Example (MongoDB Shell)
-
-This example demonstrates the usage of the `$let` operator to calculate the area of a rectangle.
-
-**Create sample documents**
-    
-    
-    db.shapes.insertMany([
-      { name: "Rectangle 1", length: 5, width: 3 },
-      { name: "Rectangle 2", length: 7, width: 4 },
-      { name: "Rectangle 3", length: 6, width: 2 }
-    ]);
-
-**Query example**
-    
-    
-    db.shapes.aggregate([
-      {
-        $project: {
-          name: 1,
-          area: {
-            $let: {
-              vars: {
-                length: "$length",
-                width: "$width"
-              },
-              in: {
-                $multiply: ["$$length", "$$width"]
-              }
-            }
-          }
-        }
-      }
-    ])
-
-**Output**
-    
-    
-    [
-      {
-        "_id": ObjectId("6161e5b1a3eba3c7f2960d03"),
-        "name": "Rectangle 1",
-        "area": 15
-      },
-      {
-        "_id": ObjectId("6161e5b1a3eba3c7f2960d04"),
-        "name": "Rectangle 2",
-        "area": 28
-      },
-      {
-        "_id": ObjectId("6161e5b1a3eba3c7f2960d05"),
-        "name": "Rectangle 3",
-        "area": 12
-      }
-    ]
-
-## Code examples
-
-To view a code example for using the `$let` command, choose the tab for the language that you want to use:
-
-Node.js
-    
-    
-    
-    const { MongoClient } = require('mongodb');
-    
-    async function calculateRectangleAreas() {
-      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('shapes');
-    
-      const result = await shapes.aggregate([
-        {
-          $project: {
-            name: 1,
-            area: {
-              $let: {
-                vars: {
-                  length: '$length',
-                  width: '$width'
-                },
-                in: {
-                  $multiply: ['$$length', '$$width']
-                }
-              }
-            }
-          }
-        }
-      ]).toArray();
-    
-      console.log(result);
-      client.close();
-    }
-    
-    calculateRectangleAreas();
-
-Python
-    
-    
-    
-    from pymongo import MongoClient
-    
-    def calculate_rectangle_areas():
-        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.shapes
-    
-        result = list(shapes.aggregate([
-            {
-                '$project': {
-                    'name': 1,
-                    'area': {
-                        '$let': {
-                            'vars': {
-                                'length': '$length',
-                                'width': '$width'
-                            },
-                            'in': {
-                                '$multiply': ['$$length', '$$width']
-                            }
-                        }
-                    }
-                }
-            }
-        ]))
-    
-        print(result)
-        client.close()
-    
-    calculate_rectangle_areas()
-
-![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)
-
-$last
-
-$limit
-
-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.