You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when I run sam local start-api -t ./cdk.out/Stack.template.json --log-file logfile.txt, i see a warning
* Tip: There are .env or .flaskenv files present. Do "pip install python-dotenv" to use them.
So I want sam to load my environment variables from .env
Steps to reproduce:
run pip install python-dotenv
run sam local start-api -t ./cdk.out/Stack.template.json --log-file logfile.txt
do a sample request to this API.
Observed result:
.env environment variables are not loaded
Expected result:
.env environment variables are loaded
Additional environment details (Ex: Windows, Mac, Amazon Linux etc)
You can now browse to the above endpoints to invoke your functions. You do not need to restart/reload SAM CLI while working on your functions, changes will be reflected instantly/automatically. If you
used sam build before running local commands, you will need to re-run sam build for the changes to be picked up. You only need to restart SAM CLI if you update your AWS SAM template
* Tip: There are .env or .flaskenv files present. Do "pip install python-dotenv" to use them.
2023-09-30 15:58:14 WARNING: This is a development server. Do not use it in a production deployment. Use a production WSGI server instead.
* Running on http://127.0.0.1:3000
2023-09-30 15:58:14 Press CTRL+C to quit
Invoking index.botInstalled (nodejs18.x)
Local image is up-to-date
Using local image: public.ecr.aws/lambda/nodejs:18-rapid-x86_64.
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
@jfuss thanks for the response. As an end-user, I only know this sentence comes from aws-sam-cli. You should suppress this message when your internal lib/package prints it.
Description:
when I run sam local start-api -t ./cdk.out/Stack.template.json --log-file logfile.txt, i see a warning
So I want sam to load my environment variables from .env
Steps to reproduce:
run
pip install python-dotenv
run sam local start-api -t ./cdk.out/Stack.template.json --log-file logfile.txt
do a sample request to this API.
Observed result:
.env
environment variables are not loadedExpected result:
.env
environment variables are loadedAdditional environment details (Ex: Windows, Mac, Amazon Linux etc)
sam --version
: SAM CLI, version 1.97.0Add --debug flag to command you are running
The text was updated successfully, but these errors were encountered: