docs: update readme for AWS source code change#5
docs: update readme for AWS source code change#5Taylorwutianyi wants to merge 3 commits intoACC-HelloWorld:mainfrom
Conversation
add picture for aws lambda code source modification
There was a problem hiding this comment.
Pull request overview
Updates the documentation to describe how to modify an AWS Lambda function’s source code to read the MongoDB Atlas connection string from the ATLAS_URI environment variable.
Changes:
- Add README guidance for updating
lambda_function.pyto useATLAS_URIfrom Lambda environment variables. - Add a new screenshot illustrating the AWS Console “Code” changes.
Reviewed changes
Copilot reviewed 1 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
README.md |
Adds step-by-step instructions and a screenshot reference for switching to ATLAS_URI via environment variables. |
readme-images/aws_code_source_modification.png |
New image used by the README to illustrate the code modifications in the AWS Console. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
|  | ||
|
|
||
| Navigate to **Code** tab, modify the code source to remove (or comment out) the rows for the definitions of `username` `password` and `atlas_uri`, then assign `ATLAS_URI` to `atlas_uri` using `atlas_uri = os.environ.get("ATLAS_URI")`: |
There was a problem hiding this comment.
The instructions suggest using os.environ.get("ATLAS_URI"), but they don’t mention ensuring os is imported in lambda_function.py. Consider adding a short note to import os (if it isn’t already) to avoid a runtime NameError.
| Navigate to **Code** tab, modify the code source to remove (or comment out) the rows for the definitions of `username` `password` and `atlas_uri`, then assign `ATLAS_URI` to `atlas_uri` using `atlas_uri = os.environ.get("ATLAS_URI")`: | |
| Navigate to **Code** tab, modify the code source to remove (or comment out) the rows for the definitions of `username` `password` and `atlas_uri`. Ensure that `os` is imported at the top of `lambda_function.py` (add `import os` if it is not already there), then assign `ATLAS_URI` to `atlas_uri` using `atlas_uri = os.environ.get("ATLAS_URI")`: |
|
|
||
|  | ||
|
|
||
| Navigate to **Code** tab, modify the code source to remove (or comment out) the rows for the definitions of `username` `password` and `atlas_uri`, then assign `ATLAS_URI` to `atlas_uri` using `atlas_uri = os.environ.get("ATLAS_URI")`: |
There was a problem hiding this comment.
This sentence is a bit unclear/grammatically off: consider using “lines” (instead of “rows”), and add commas between the inline identifiers (e.g., username, password, and atlas_uri) to improve readability.
| Navigate to **Code** tab, modify the code source to remove (or comment out) the rows for the definitions of `username` `password` and `atlas_uri`, then assign `ATLAS_URI` to `atlas_uri` using `atlas_uri = os.environ.get("ATLAS_URI")`: | |
| Navigate to the **Code** tab and modify the code source to remove (or comment out) the lines defining `username`, `password`, and `atlas_uri`, then assign `ATLAS_URI` to `atlas_uri` using `atlas_uri = os.environ.get("ATLAS_URI")`: |
update the readme to explain how to modify the AWS lambda source code to use the environment variable ATLAS_URI