@@ -78,8 +78,9 @@ will look like this:
78
78
- ${bref-extra:mongodb-php-83}
79
79
80
80
81
+
81
82
Let's use the MongoDB driver with a web page that list planets from the Atlas
82
- `sample dataset <https://www.mongodb.com/docs/atlas/ sample-data/>`__ .
83
+ :atlas: `sample dataset </ sample-data/>`.
83
84
Replace the contents of ``index.php`` with the following:
84
85
85
86
.. literalinclude:: /examples/aws-lambda/index.php
@@ -108,15 +109,14 @@ the role assigned to deployed function.
108
109
2. In :guilabel:`Configuration > Permission`, copy the "Role name"
109
110
3. Add this role to your Atlas cluster with the built-in Role: "Read and write any database"
110
111
111
- To learn how to set up unified AWS access, see `Set Up Unified AWS Access
112
- <https://www.mongodb.com/docs/atlas/security/set-up-unified-aws-access/>`__ in the
113
- MongoDB Atlas documentation.
112
+ To learn how to set up unified AWS access, see :atlas:`Set Up Unified AWS Access
113
+ </security/set-up-unified-aws-access/>` in the MongoDB Atlas documentation.
114
114
115
115
Now that the permissions have been configured, the Lambda function is allowed to access
116
116
your Atlas cluster. You can configure your application with the Atlas endpoint.
117
117
118
118
Access to Atlas clusters is also restricted by IP address. Since the range of IP that comes
119
- from AWS is very wide, you can `allow access from everywhere <https://www.mongodb.com/docs/atlas /security/ip-access-list/>`__.
119
+ from AWS is very wide, you can :atlas: `allow access from everywhere </security/ip-access-list/>`__.
120
120
121
121
.. note::
122
122
@@ -136,8 +136,8 @@ Update the ``serverless.yml`` file to pass the environment variable ``MONGODB_UR
136
136
environment:
137
137
MONGODB_URI: "mongodb+srv://cluster0.example.mongodb.net/?authSource=%24external&authMechanism=MONGODB-AWS&retryWrites=true&w=majority"
138
138
139
- Finally, deploy with the new configuration. After deployment completes, you can access the function URL
140
- and see the list of planets from your Atlas cluster.
139
+ Finally, deploy with the new configuration. After deployment completes, you can
140
+ access the function URL and see the list of planets from your Atlas cluster.
141
141
142
142
.. code-block:: none
143
143
0 commit comments