DOCSP-47690: aws lambda tutorial#207
Conversation
✅ Deploy Preview for docs-php-library ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
mcmorisi
left a comment
There was a problem hiding this comment.
Great job! Commented with some open threads and suggestions.
source/aws-lambda.txt
Outdated
| In this guide, you can learn how to use the tool `Bref | ||
| <https://bref.sh>`__ to deploy serverless PHP applications on AWS |
There was a problem hiding this comment.
S: Would suggest changing this to either the attached suggestion or just "how to use Bref"
| In this guide, you can learn how to use the tool `Bref | |
| <https://bref.sh>`__ to deploy serverless PHP applications on AWS | |
| In this guide, you can learn how to use the `Bref | |
| <https://bref.sh>`__ tool to deploy serverless PHP applications on AWS |
source/aws-lambda.txt
Outdated
|
|
||
| Bref uses `Lambda layers | ||
| <https://docs.aws.amazon.com/lambda/latest/dg/chapter-layers.html>`__ to | ||
| provide the PHP runtime. The ``bref`` layer is compiled with PHP and a |
There was a problem hiding this comment.
Just wanted to confirm that the bref layer (monospaced, lowercase) is different than Bref the tool.
There was a problem hiding this comment.
Ill reword to make this more clear
| After you initialize the project, you can add the ``mongodb`` extension. | ||
| Locate the ``Serverless config`` name in the list of extensions provided | ||
| by the :github:`bref/extra-php-extension <brefphp/extra-php-extensions>` | ||
| package. | ||
|
|
||
| Add it to the ``layers`` of the function in the ``serverless.yaml`` | ||
| file, as shown in the following code: |
There was a problem hiding this comment.
Nit: Would combine this into one paragraph since it's discussing a single process.
| After you initialize the project, you can add the ``mongodb`` extension. | |
| Locate the ``Serverless config`` name in the list of extensions provided | |
| by the :github:`bref/extra-php-extension <brefphp/extra-php-extensions>` | |
| package. | |
| Add it to the ``layers`` of the function in the ``serverless.yaml`` | |
| file, as shown in the following code: | |
| After you initialize the project, you can add the ``mongodb`` extension. | |
| Locate the ``Serverless config`` name in the list of extensions provided | |
| by the :github:`bref/extra-php-extension <brefphp/extra-php-extensions>` | |
| package. Add it to the ``layers`` of the function in the ``serverless.yaml`` | |
| file, as shown in the following code: |
source/aws-lambda.txt
Outdated
| Redeploy the application with the new ``index.php`` by running the | ||
| following command: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| serverless deploy | ||
|
|
||
| The application page displays an error message because the ``MONGODB_URI`` | ||
| environment variable is not set. The following section explains how to | ||
| set your connection string in an environment variable. |
There was a problem hiding this comment.
Conflicted on this – I think it's helpful to tell readers to redeploy using the serverless deploy command once they update their index file, but I'm also unsure of telling readers to redeploy into a situation where they'll receive an error. You do have a section at the end that instructs readers to redeploy, so I think I lean towards cutting this part out. Let me know what you think!
There was a problem hiding this comment.
agreed- can remove
source/aws-lambda.txt
Outdated
| cluster: | ||
|
|
||
| 1. Open the Lambda function in the AWS console. | ||
| #. Enter :guilabel:`Configuration > Permission`, then copy the :guilabel:`Role name`. |
There was a problem hiding this comment.
Q: When you say "Enter" is there a text entry field, or does Configuration > Permission refer to a page? If so, should this be "Navigate to Configuration > Permission"?
There was a problem hiding this comment.
Navigate is probs more appropriate
source/aws-lambda.txt
Outdated
| Using VPC Peering is recommended to isolate your Atlas | ||
| cluster from the internet. This requires the Lambda function to be | ||
| deployed in this AWS VPC. |
There was a problem hiding this comment.
Suggestion (also do you know what "this VPC" refers to?)
| Using VPC Peering is recommended to isolate your Atlas | |
| cluster from the internet. This requires the Lambda function to be | |
| deployed in this AWS VPC. | |
| We recommend using VPC Peering to isolate your Atlas | |
| cluster from the internet. You must deploy Lambda function to this AWS VPC | |
| to use VPC Peering. |
There was a problem hiding this comment.
added some context
source/aws-lambda.txt
Outdated
| Update the ``serverless.yml`` file in your project to set the | ||
| environment variable ``MONGODB_URI`` to your connection string: |
There was a problem hiding this comment.
| Update the ``serverless.yml`` file in your project to set the | |
| environment variable ``MONGODB_URI`` to your connection string: | |
| Update the ``serverless.yml`` file in your project to set the ``MONGODB_URI`` environment variable to your connection string: |
mcmorisi
left a comment
There was a problem hiding this comment.
LGTM with one callout!
source/aws-lambda.txt
Outdated
| Redeploy the application with the new ``index.php`` by running the | ||
| following command: | ||
|
|
||
| .. code-block:: bash | ||
|
|
||
| serverless deploy | ||
|
|
||
| The application page displays an error message because the ``MONGODB_URI`` | ||
| environment variable is not set. The following section explains how to | ||
| set your connection string in an environment variable. |
There was a problem hiding this comment.
This part got left in, just checking you didn't mean to delete it instead.
There was a problem hiding this comment.
Weird , yes meant to delete
|
LGTM, the only suggestion I have is to add "Bref" in the title of the page for SEO, since this tutorial (PHPLIB-1163) was focused towards Bref. |
* DOCSP-47690: aws lambda tutorial * fixes * fixes * fixes * MM PR fixes 1 * remove section * RB small fix (cherry picked from commit 8ed8dde)
* DOCSP-47690: aws lambda tutorial * fixes * fixes * fixes * MM PR fixes 1 * remove section * RB small fix (cherry picked from commit 8ed8dde)
* use sharedincludes in compat page * add source constants for versions * delete files for old build system (cherry picked from commit 55daa82) * adds more info to v1.20 whats new (cherry picked from commit 302bcd5) * Fix compatibility table (cherry picked from commit 4fba22f) * (DOCSP-44298) Removed EOL'd v1.16 and earlier. (#165) (#166) * DOCSP-44903 Shorten TOC Labels (#176) * DOCSP-44903 Shorten TOC Labels * rest of pages * angle brackets * fixes * internal review * updates based on Mike's PR * review comments and consistency (cherry picked from commit b9fda16) * PHPLIB-1278: FAQ entry on connection persistence * Address vale lint checks on word usage * Docs edits * Merge pull request #181 from mcmorisi/DRIVERS-2658-hint DOCSP-45139: Add Hint option for Distinct operation * (DOCSP-45749) Denests last phase 1 nested components (#182) * (DOCSP-45749) Denests last phase 1 nested components * Update build * DOCSP-45100: Delete and rename by name (#187) * DOCSP-45100: Delete and rename by name * edits * JM feedback (cherry picked from commit 343f339) * bring master changes into v1.21 * DOCSP-44644: db/coll accessor methods * fix spacing * vale action dependency * vale action dependency * DOCSP-45100: GridFS methods api docs (#196) * DOCSP-45100: GridFS methods api docs * edits * RR feedback * JT feedback * DOCSP-45100: GridFS methods api docs (#196) * DOCSP-45100: GridFS methods api docs * edits * RR feedback * JT feedback (cherry picked from commit 1442347) * DOCSP-43365: type specification for createSearchIndex(es) * indentation fix * indentation fix * add whats new entry * indentation fix * SA PR fixes 1 * DOCSP-43365: type specification for createSearchIndex(es) (cherry picked from commit e09b124) * indentation fix (cherry picked from commit cd6a586) * indentation fix (cherry picked from commit 3b3ec37) * add whats new entry (cherry picked from commit f821030) * SA PR fixes 1 (cherry picked from commit 7d9bfe8) * DOCSP-43457: builderEncoder option (#200) * DOCSP-43457: builderEncoder option * fix * fix type * go back * codec * JT feedback * DOCSP-43457: builderEncoder option (#200) * DOCSP-43457: builderEncoder option * fix * fix type * go back * codec * JT feedback (cherry picked from commit e1ed056) * DOCSP-44237 flags Option deprecation on v2.21 (#201) * DOCSP-44237 flags Option deprecation on v2.21 * add what's new note * Rea review comments * DOCSP-45770: atlas search queries (#197) * DOCSP-45770: atlas search queries * fix indentation * fix indentation * fix indentation * fix indentation * snooty landing page * snooty landing page * indentation fix * netlify trigger * whats new * RM PR fixes 1 * comments * small fix * JT tech review 1 * indentation fix * fix * small fixes * small fixes * remov Pipeline type * DOCSP-45878: Transactions parallelism note (#204) * DOCSP-45878: Transactions parallelism note (#204) (cherry picked from commit ba91a37) * DOCSP-43919: aggregation builder (#203) * DOCSP-43919: aggregation builder * indentation fix * remov Pipeline type * LM PR fixes 1 * fp fixes * todo fixes * small fixes * JM tech review 1 * DOCSP-46127: Update manual link (#205) * DOCSP-46127: Update manual link * MW feedback * DOCSP-46127: Update manual link (#205) * DOCSP-46127: Update manual link * MW feedback (cherry picked from commit bf6ac8a) * DOCSP-47690: aws lambda tutorial (#207) * DOCSP-47690: aws lambda tutorial * fixes * fixes * fixes * MM PR fixes 1 * remove section * RB small fix * DOCSP-47690: aws lambda tutorial (#207) * DOCSP-47690: aws lambda tutorial * fixes * fixes * fixes * MM PR fixes 1 * remove section * RB small fix (cherry picked from commit 8ed8dde) * add redirect for aws lambda page * change title to avoid duplicate * change toc * change url and add redirects * add back old ref based on rea's feedback * change redirect * fix merge issues * use regular includes on master * DOCSP-47970: v1.21 release (#212) * DOCSP-47970: v1.21 release * JM combine v's * JT small fix (#209) * DOCSP-43464: operations with builders (#206) * DOCSP-43464: operations with builders * fix desc * shared include fix? * shared include fix? * revert * netlify trigger * small fix * LM PR fixes 1 * LM PR fixes 2 * link fix * reformat comments * JT tech review 2 * fix code example * JT tech review comments --------- Co-authored-by: Jordan Smith <jordan.smith@mongodb.com> Co-authored-by: Elyse Foreman <elyse.foreman@mongodb.com> Co-authored-by: lindseymoore <71525840+lindseymoore@users.noreply.github.com> Co-authored-by: Jeremy Mikola <jmikola@gmail.com> Co-authored-by: Michael Morisi <michael.morisi@mongodb.com> Co-authored-by: Sarah Simpers <82042374+sarahsimpers@users.noreply.github.com> Co-authored-by: Nora Reidy <nora.reidy@mongodb.com> Co-authored-by: Angela <angelashu103@gmail.com> Co-authored-by: shuangela <angela.shu@mongodb.com>
Pull Request Info
PR Reviewing Guidelines
JIRA - https://jira.mongodb.org/browse/DOCSP-47690
Staging - https://deploy-preview-207--docs-php-library.netlify.app/aws-lambda/
Self-Review Checklist