question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AWS related environment values get replaced

See original GitHub issue

I have a .env file, with custom values for

AWS_ACCESS_KEY_ID = "somekey"
AWS_SECRET_ACCESS_KEY = "somevalue"

These values get replaced by the default values defined on https://github.com/freshollie/jest-dynalite/blob/master/src/setup.ts, no matter what I do.

imagen

Only when I have removed the preset: "jest-dynalite" preset from the jest.config file, my values remain as defined.

Do you know could be going wrong? thanks

PS: I would suggest to just remove those default values.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
fresholliecommented, Aug 3, 2021

Ah. Looks like jest-dynalite is setting these variables, and dotenv won’t overwrite variable which are already set (I didn’t know this): https://github.com/motdotla/dotenv/blob/master/lib/main.js#L104

0reactions
holylandercommented, Aug 3, 2021

Ah. Looks like jest-dynalite is setting these variables, and dotenv won’t overwrite variable which are already set (I didn’t know this): https://github.com/motdotla/dotenv/blob/master/lib/main.js#L104

didnt know either, thanks for sharing 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Environment variables to configure the AWS CLI
Environment variables provide another way to specify configuration options and credentials, and can be useful for scripting or temporarily setting a named ...
Read more >
Variables - Serverless Framework
Variables. Variables allow users to dynamically replace config values in serverless.yml config. They are especially useful when providing secrets for your ...
Read more >
Environment Variables From Secret Manager Not Correctly ...
If I run this locally in IntelliJ using the AWS Toolkit Plugin the environment variables are not replaced and the code fails.
Read more >
Configuration — Boto3 Docs 1.26.37 documentation
aws /config file when looking for configuration values. You can change the location of this file by setting the AWS_CONFIG_FILE environment variable. This...
Read more >
How do you pass custom environment variable on Amazon ...
Later you can go to the AWS admin panel (Environment Details -> Edit Configuration -> Container) and update the values there. In my...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found