Skip to content

Add warning when S3 config lacks both endpoint_url and region_code #1932

@coderabbitai

Description

@coderabbitai

Context

When neither endpoint_url nor region_code is specified in the S3 configuration, the code constructs a region-less S3 endpoint (e.g., https://{bucket}.s3.amazonaws.com). This behavior is non-standard for AWS S3 and may not work for all buckets, as AWS typically requires a region to be specified.

This behavior was implemented to maintain consistency with generate_s3_url in s3_utils.py.

Task

Add warning log messages in the following two locations when neither endpoint_url nor region_code is provided:

  1. Presto init script: tools/deployment/presto-clp/scripts/init.py in the _resolve_s3_endpoint_url function
  2. Package startup script: Where S3 configuration is processed during CLP package startup

Suggested warning message

Neither 'endpoint_url' nor 'region_code' specified in S3 config. Using region-less S3 endpoint which may not work for all buckets.

References

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions