Skip to content

test(NODE-4160): add aws lambda examples #3369

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Aug 31, 2022
Merged

test(NODE-4160): add aws lambda examples #3369

merged 12 commits into from
Aug 31, 2022

Conversation

durran
Copy link
Member

@durran durran commented Aug 17, 2022

Description

Adds examples for using the Node.js driver with AWS Lambda based on the MongoDB examples in the docs here. Note that there is a slight difference in behaviour as the docs add an additional token in the auth mechanism that is not needed, and they only ask for the database name which doesn't actually do anything server side. I've changed here to just list databases in both examples.

Here are the specific tests passing on evg

What is changing?

  • Adds a new test/examples directory for the code examples.
  • Adds 2 new scripts, check:lambda and check:lambda:aws to run the former with no auth and later with AWS auth.
  • Adds 2 example handler functions, handler.js for no auth and aws_handler.js for AWS auth.
  • Updates the test readme to mention this new directory.
  • Adds 2 new evergreen tasks to run the 2 new scripts in CI
Is there new documentation needed for these changes?

None

What is the motivation for this change?

NODE-4160

Double check the following

  • Ran npm run check:lint script
  • Self-review completed using the steps outlined here
  • PR title follows the correct format: <type>(NODE-xxxx)<!>: <description>
  • Changes are covered by tests
  • New TODOs have a related JIRA ticket

@durran durran force-pushed the NODE-4160 branch 5 times, most recently from 69c6e3b to e1d2e4f Compare August 18, 2022 18:25
@durran durran marked this pull request as ready for review August 18, 2022 18:25
@durran
Copy link
Member Author

durran commented Aug 19, 2022

Function running in lambda:

Screenshot 2022-08-19 at 12 00 50

@durran durran requested a review from baileympearson August 23, 2022 20:22
@durran durran added the Primary Review In Review with primary reviewer, not yet ready for team's eyes label Aug 24, 2022
@durran durran requested a review from baileympearson August 30, 2022 14:26
@baileympearson baileympearson added Team Review Needs review from team and removed Primary Review In Review with primary reviewer, not yet ready for team's eyes labels Aug 30, 2022
baileympearson
baileympearson previously approved these changes Aug 30, 2022
Copy link
Contributor

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

LGTM

@baileympearson baileympearson merged commit d2b3ce1 into main Aug 31, 2022
@baileympearson baileympearson deleted the NODE-4160 branch August 31, 2022 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team Review Needs review from team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants