https://dagster.io/ logo
#ask-community
Title
# ask-community
p

Praveen Kumar Jha

08/03/2022, 3:54 AM
Hi, On the latest version of dagster, we are getting the below error message on running any graph. This message is coming before any of the op is triggered. Exception: Tried to load environment variable AWS_ACCESS_KEY_ID, but it was not set File "/usr/local/lib/python3.8/site-packages/dagster/_core/instance/__init__.py", line 1735, in launch_run self._run_launcher.launch_run(LaunchRunContext(pipeline_run=run, workspace=workspace)) File "/usr/local/lib/python3.8/site-packages/dagster_docker/docker_run_launcher.py", line 152, in launch_run self._launch_container_with_command(run, docker_image, command) File "/usr/local/lib/python3.8/site-packages/dagster_docker/docker_run_launcher.py", line 95, in _launch_container_with_command docker_env = dict([parse_env_var(env_var) for env_var in container_context.env_vars]) File "/usr/local/lib/python3.8/site-packages/dagster_docker/docker_run_launcher.py", line 95, in <listcomp> docker_env = dict([parse_env_var(env_var) for env_var in container_context.env_vars]) File "/usr/local/lib/python3.8/site-packages/dagster/_core/utils.py", line 93, in parse_env_var raise Exception(f"Tried to load environment variable {env_var_str}, but it was not set")
d

daniel

08/03/2022, 4:01 AM
Hey Praveen - is AWS_ACCESS_KEY_ID referenced in your dagster.yaml anywhere? I don't think there's anywhere that Dagster requires that env var to be set unless you've listed it on the run launcher config
p

Praveen Kumar Jha

08/03/2022, 4:49 AM
Hi daniel, Yes it is mentioned under run_launcher config env_vars. As it is not used any where can we remove these variables from this config? env_vars: - DAGSTER_POSTGRES_HOSTNAME - DAGSTER_POSTGRES_USER - DAGSTER_POSTGRES_PASSWORD - DAGSTER_POSTGRES_DB - HOSTNAME_etl - DAGSTER_NETWORK - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_REGION
d

daniel

08/03/2022, 4:52 AM
Yeah, you only need to include environment variables there that your code needs or that are needed to load the dagster instance
p

Praveen Kumar Jha

08/03/2022, 4:57 AM
Thanks Daniel. Will make the changes and test.