diff --git a/crates/iceberg/src/io/storage_s3.rs b/crates/iceberg/src/io/storage_s3.rs index 969903b5d7..47893a2a95 100644 --- a/crates/iceberg/src/io/storage_s3.rs +++ b/crates/iceberg/src/io/storage_s3.rs @@ -58,11 +58,17 @@ pub const S3_ASSUME_ROLE_ARN: &str = "client.assume-role.arn"; pub const S3_ASSUME_ROLE_EXTERNAL_ID: &str = "client.assume-role.external-id"; /// Optional session name used to assume an IAM role. pub const S3_ASSUME_ROLE_SESSION_NAME: &str = "client.assume-role.session-name"; -/// Option to skip signing request (e.g. for public buckets/folders) +/// Option to skip signing requests (e.g. for public buckets/folders). pub const S3_ALLOW_ANONYMOUS: &str = "s3.allow-anonymous"; /// Option to skip loading the credential from EC2 metadata (typically used in conjunction with -/// `S3_ALLOW_ANONYMOUS`) +/// `S3_ALLOW_ANONYMOUS`). pub const S3_DISABLE_EC2_METADATA: &str = "s3.disable-ec2-metadata"; +/// Option to skip loading configuration from config file and the env. +pub const S3_DISABLE_CONFIG_LOAD: &str = "s3.disable-config-load"; + +fn is_truthy(value: &str) -> bool { + ["true", "t", "1", "on"].contains(&value) +} /// Parse iceberg props to s3 config. pub(crate) fn s3_config_parse(mut m: HashMap) -> Result { @@ -86,7 +92,7 @@ pub(crate) fn s3_config_parse(mut m: HashMap) -> Result) -> Result