Skip to content

fix(user_tools): honor AWS profile S3 endpoints#2106

Draft
WilliamK112 wants to merge 1 commit into
NVIDIA:devfrom
WilliamK112:codex/support-aws-profile-s3-endpoint
Draft

fix(user_tools): honor AWS profile S3 endpoints#2106
WilliamK112 wants to merge 1 commit into
NVIDIA:devfrom
WilliamK112:codex/support-aws-profile-s3-endpoint

Conversation

@WilliamK112

Copy link
Copy Markdown

Description

Fixes #2087.

This adds a small S3 endpoint resolver shared by the Python S3Fs handler and local job argument construction. Existing explicit/environment behavior is preserved, with profile configuration used only when no endpoint environment variable is set.

Endpoint precedence is now:

  1. explicit endpoint_override argument
  2. AWS_ENDPOINT_URL_S3
  3. AWS_ENDPOINT_URL
  4. active AWS profile config from AWS_CONFIG_FILE or ~/.aws/config

The profile lookup considers AWS_PROFILE, AWS_DEFAULT_PROFILE, and default, and supports profile-level endpoint_url plus nested/service-specific S3 endpoint config. Missing or invalid AWS config files are ignored so existing behavior is unchanged when no profile endpoint is available.

Tests

  • PYTHONPATH=src .venv/bin/python -m pytest -vv tests/spark_rapids_tools_ut/test_csppath.py
  • PYTHONPATH=src .venv/bin/python -m flake8 src/spark_rapids_tools/storagelib/s3/aws_config.py src/spark_rapids_tools/storagelib/s3/s3fs.py src/spark_rapids_pytools/cloud_api/sp_types.py tests/spark_rapids_tools_ut/test_csppath.py
  • PYTHONPATH=src .venv/bin/python -m pylint -d fixme --load-plugins pylint_pydantic --rcfile=../.pylintrc src/spark_rapids_tools/storagelib/s3/aws_config.py src/spark_rapids_tools/storagelib/s3/s3fs.py src/spark_rapids_pytools/cloud_api/sp_types.py tests/spark_rapids_tools_ut/test_csppath.py
  • git diff --check

Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
@github-actions github-actions Bot added the user_tools Scope the wrapper module running CSP, QualX, and reports (python) label Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

user_tools Scope the wrapper module running CSP, QualX, and reports (python)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support AWS profile endpoint_url for S3-compatible object stores

2 participants