neu_vol.aws¶
AWS credential bootstrap for S3 access.
Workaround for tensorstore 0.1.84: its S3 profile credential provider fails to
resolve ~/.aws/credentials (ignores AWS_SHARED_CREDENTIALS_FILE too), but
its environment provider works. So when opening an S3 store we load the desired
profile ourselves and export AWS_* env vars (only if not already set). Secrets
stay in-process — never logged. The credentials file lives on shared home, so this
also works on SLURM workers (each bootstraps itself) without putting secrets into
job scripts or propagating them across the cluster.
Functions¶
|
Populate AWS_* env from a credentials file profile if not already set. |
Module Contents¶
- neu_vol.aws.ensure_aws_credentials(profile: str | None = None, credentials_file: str | None = None) bool¶
Populate AWS_* env from a credentials file profile if not already set.
No-op (returns False) when
AWS_ACCESS_KEY_IDis already in the environment or the file/profile is unavailable. Returns True if it set credentials.