-
Notifications
You must be signed in to change notification settings - Fork 822
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
Fully populate mock function environment variables #6551
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6551 +/- ##
==========================================
- Coverage 56.93% 56.92% -0.02%
==========================================
Files 484 484
Lines 21904 22014 +110
Branches 4373 4401 +28
==========================================
+ Hits 12472 12531 +59
- Misses 8551 8604 +53
+ Partials 881 879 -2
Continue to review full report at Codecov.
|
This pull request introduces 1 alert and fixes 2 when merging 008e389 into 8647486 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 2 when merging d8b399e into a16e8b8 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request introduces 1 alert and fixes 3 when merging baf49f4 into a16e8b8 - view on LGTM.com new alerts:
fixed alerts:
|
This pull request fixes 3 alerts when merging 3d9fe6c into a66bd14 - view on LGTM.com fixed alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This pull request fixes 3 alerts when merging 3fe813c into b866ccc - view on LGTM.com fixed alerts:
|
b19684e
to
3e01644
Compare
This pull request fixes 3 alerts when merging 3e01644 into 31eb8eb - view on LGTM.com fixed alerts:
|
3e01644
to
c163cdc
Compare
This pull request fixes 3 alerts when merging f909b2b into 2977c6a - view on LGTM.com fixed alerts:
|
This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Issue #, if available:
#4635, #4234, #6548, #6533, #3124, #1378, #691
Description of changes:
Populates environment variables when running
amplify mock function
by:1. Not leaking any system environment variables into the mock lambda execution
2. Providing reasonable defaults for common lambda env vars specified here (https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html#configuration-envvars-runtime)
3. Loading aws access keys from the profile that the CLI is currently configured to use
3. Resolving parameters specified in team-provider-info.json
4. Resolving parameters specified in parameters.json
5. Resolving parameters from other resources in the project (eg. API names, table names)
6. Override GraphQL API endpoint env var to local mock endpoint when mock api is running
7. Load “mock only” env vars from a .env file in the function’s directory
1-6 should provide reasonable defaults for most customers and 7 provides a simple mechanism for customers to override / add environment variables only in the context of mock
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.