@@ -1286,9 +1286,9 @@ impl PySessionContext {
12861286 /// explicitly. Supported schemes:
12871287 ///
12881288 /// * `http` / `https` – registers an [`HttpStore`] for the URL origin.
1289- /// * `s3` – registers an [`AmazonS3`] store seeded from environment variables .
1290- /// When `AWS_SKIP_SIGNATURE=true` is set a credential-free builder is used
1291- /// so that no EC2 IMDS discovery is attempted (public-bucket anonymous access) .
1289+ /// * `s3` – registers an anonymous [`AmazonS3`] store (no credentials / signature) .
1290+ /// Users requiring authenticated access should pass an explicit store via the
1291+ /// `object_store` parameter instead .
12921292 /// * `gs` / `gcs` – registers a [`GoogleCloudStorage`] store seeded from
12931293 /// environment variables.
12941294 /// * `az` / `abfss` – registers a [`MicrosoftAzure`] store seeded from
@@ -1322,26 +1322,11 @@ impl PySessionContext {
13221322 } ,
13231323 "s3" => {
13241324 let bucket = url. host_str ( ) . unwrap_or_default ( ) ;
1325- // When the caller has set AWS_SKIP_SIGNATURE=true (anonymous /
1326- // public-bucket access) avoid from_env() so that the default
1327- // credential chain – which includes EC2 IMDS – is never started.
1328- let skip_signature = std:: env:: var ( "AWS_SKIP_SIGNATURE" )
1329- . map ( |v| matches ! ( v. to_lowercase( ) . as_str( ) , "true" | "1" ) )
1330- . unwrap_or ( false ) ;
1331- let builder = if skip_signature {
1332- let mut b = AmazonS3Builder :: new ( )
1333- . with_bucket_name ( bucket)
1334- . with_skip_signature ( true ) ;
1335- if let Ok ( region) =
1336- std:: env:: var ( "AWS_DEFAULT_REGION" ) . or_else ( |_| std:: env:: var ( "AWS_REGION" ) )
1337- {
1338- b = b. with_region ( region) ;
1339- }
1340- b
1341- } else {
1342- AmazonS3Builder :: from_env ( ) . with_bucket_name ( bucket)
1343- } ;
1344- match builder. build ( ) {
1325+ match AmazonS3Builder :: new ( )
1326+ . with_bucket_name ( bucket)
1327+ . with_skip_signature ( true )
1328+ . build ( )
1329+ {
13451330 Ok ( s) => Arc :: new ( s) ,
13461331 Err ( _) => return ,
13471332 }
0 commit comments