Skip to content

docs: update readme for AWS source code change#5

Open
Taylorwutianyi wants to merge 3 commits intoACC-HelloWorld:mainfrom
Taylorwutianyi:main
Open

docs: update readme for AWS source code change#5
Taylorwutianyi wants to merge 3 commits intoACC-HelloWorld:mainfrom
Taylorwutianyi:main

Conversation

@Taylorwutianyi
Copy link
Copy Markdown

update the readme to explain how to modify the AWS lambda source code to use the environment variable ATLAS_URI

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.py to use ATLAS_URI from 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.


![AWS Lambda Function Environment Variables](./readme-images/atlas-uri-env-var.png)

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")`:
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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")`:

Copilot uses AI. Check for mistakes.

![AWS Lambda Function Environment Variables](./readme-images/atlas-uri-env-var.png)

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")`:
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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")`:

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants