Skip to content

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

Open
WilliamK112 wants to merge 2 commits into
NVIDIA:devfrom
WilliamK112:codex/support-aws-profile-s3-endpoint
Open

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

Conversation

@WilliamK112

@WilliamK112 WilliamK112 commented Jun 23, 2026

Copy link
Copy Markdown

Description

Add a shared S3 endpoint resolver used by both the Python S3Fs handler and local Hadoop job argument construction. Existing explicit and environment behavior is preserved, with AWS profile configuration consulted only when no endpoint environment variable is set.

Endpoint precedence is:

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

Profile lookup considers AWS_PROFILE, AWS_DEFAULT_PROFILE, and default. It supports profile-level endpoint_url, service-section S3 endpoints, and nested S3 endpoint configuration. Missing or invalid config files are ignored, and AWS config values are parsed without Python percent interpolation so percent-encoded URLs remain intact.

For local Java jobs, a resolved custom endpoint is also passed as the Hadoop S3A endpoint with path-style access enabled.

Fixes #2087.

Validation

  • PYTHONPATH=src python -m pytest -q tests/spark_rapids_tools_ut/test_csppath.py (19 passed)
  • PYTHONPATH=src python -m pytest -q tests/spark_rapids_tools_ut/test_cluster.py tests/spark_rapids_tools_ut/tools/eventlog_detector/test_detector.py tests/spark_rapids_tools_ut/tools/eventlog_detector/test_resolver.py tests/spark_rapids_tools_ut/tools/eventlog_detector/test_scanner.py tests/spark_rapids_tools_ut/tools/eventlog_detector/test_stream.py (48 passed)
  • 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 (10.00/10)
  • 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
  • python -m py_compile 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 upstream/dev...HEAD

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
…ofile-s3-endpoint

Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
@WilliamK112
WilliamK112 marked this pull request as ready for review August 22, 2026 19:01
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