<#10037 feature: `.env` values not visible to in-p...
# meltano-repo-activity
g
#10037 feature: `.env` values not visible to in-process SDK clients (e.g. `AWS_PROFILE` for S3 state backend) Issue created by edgarrmondragon Feature scope CLI / State backend Description Setting environment variables like
AWS_PROFILE
in a project's
.env
file has no effect when running state operations backed by cloud storage (S3, Azure, GCS). The variable must be set directly in the terminal: AWS_PROFILE=my-prod-profile meltano state get my-tap-to-my-target Root cause: Meltano reads
.env
via
dotenv_values()
into an internal dict. That dict is passed explicitly to plugin subprocesses, but the Meltano process itself never sets those values in
os.environ
. Cloud SDK clients (boto3, azure-storage-blob, google-cloud-storage) read credentials and config — including
AWS_PROFILE
,
AZURE_TENANT_ID
,
GOOGLE_APPLICATION_CREDENTIALS
, etc. — directly from
os.environ
, so they never see
.env
values. Expected behaviour: Any environment variable in
.env
should be available to in-process SDK clients the same way it would be if set in the terminal, without overriding variables already present in the shell environment. meltano/meltano