Skip to content

Commit 2778ec2

Browse files
authored
Modify S3 config naming convention (apache#1301)
* session-name -> role-session-name * aws. -> client.
1 parent c7b55b1 commit 2778ec2

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

mkdocs/docs/configuration.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ For the FileIO there are several configuration options available:
107107
| s3.access-key-id | admin | Configure the static access key id used to access the FileIO. |
108108
| s3.secret-access-key | password | Configure the static secret access key used to access the FileIO. |
109109
| s3.session-token | AQoDYXdzEJr... | Configure the static session token used to access the FileIO. |
110-
| s3.session-name | session | An optional identifier for the assumed role session. |
110+
| s3.role-session-name | session | An optional identifier for the assumed role session. |
111111
| s3.role-arn | arn:aws:... | AWS Role ARN. If provided instead of access_key and secret_key, temporary credentials will be fetched by assuming this role. |
112112
| s3.signer | bearer | Configure the signature version of the FileIO. |
113113
| s3.signer.uri | <http://my.signer:8080/s3> | Configure the remote signing uri if it differs from the catalog uri. Remote signing is only implemented for `FsspecFileIO`. The final request is sent to `<s3.signer.uri>/<s3.signer.endpoint>`. |
@@ -440,6 +440,8 @@ configures the AWS credentials for both Glue Catalog and S3 FileIO.
440440
| client.access-key-id | admin | Configure the static access key id used to access both the Glue/DynamoDB Catalog and the S3 FileIO |
441441
| client.secret-access-key | password | Configure the static secret access key used to access both the Glue/DynamoDB Catalog and the S3 FileIO |
442442
| client.session-token | AQoDYXdzEJr... | Configure the static session token used to access both the Glue/DynamoDB Catalog and the S3 FileIO |
443+
| client.role-session-name | session | An optional identifier for the assumed role session. |
444+
| client.role-arn | arn:aws:... | AWS Role ARN. If provided instead of access_key and secret_key, temporary credentials will be fetched by assuming this role. |
443445

444446
<!-- prettier-ignore-start -->
445447

pyiceberg/io/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
AWS_ACCESS_KEY_ID = "client.access-key-id"
6161
AWS_SECRET_ACCESS_KEY = "client.secret-access-key"
6262
AWS_SESSION_TOKEN = "client.session-token"
63-
AWS_ROLE_ARN = "aws.role-arn"
64-
AWS_SESSION_NAME = "aws.session-name"
63+
AWS_ROLE_ARN = "client.role-arn"
64+
AWS_ROLE_SESSION_NAME = "client.role-session-name"
6565
S3_ENDPOINT = "s3.endpoint"
6666
S3_ACCESS_KEY_ID = "s3.access-key-id"
6767
S3_SECRET_ACCESS_KEY = "s3.secret-access-key"
@@ -73,7 +73,7 @@
7373
S3_SIGNER_ENDPOINT = "s3.signer.endpoint"
7474
S3_SIGNER_ENDPOINT_DEFAULT = "v1/aws/s3/sign"
7575
S3_ROLE_ARN = "s3.role-arn"
76-
S3_SESSION_NAME = "s3.session-name"
76+
S3_ROLE_SESSION_NAME = "s3.role-session-name"
7777
HDFS_HOST = "hdfs.host"
7878
HDFS_PORT = "hdfs.port"
7979
HDFS_USER = "hdfs.user"

pyiceberg/io/pyarrow.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@
8686
AWS_ACCESS_KEY_ID,
8787
AWS_REGION,
8888
AWS_ROLE_ARN,
89+
AWS_ROLE_SESSION_NAME,
8990
AWS_SECRET_ACCESS_KEY,
90-
AWS_SESSION_NAME,
9191
AWS_SESSION_TOKEN,
9292
GCS_DEFAULT_LOCATION,
9393
GCS_ENDPOINT,
@@ -105,8 +105,8 @@
105105
S3_PROXY_URI,
106106
S3_REGION,
107107
S3_ROLE_ARN,
108+
S3_ROLE_SESSION_NAME,
108109
S3_SECRET_ACCESS_KEY,
109-
S3_SESSION_NAME,
110110
S3_SESSION_TOKEN,
111111
FileIO,
112112
InputFile,
@@ -370,7 +370,7 @@ def _initialize_fs(self, scheme: str, netloc: Optional[str] = None) -> FileSyste
370370
if role_arn := get_first_property_value(self.properties, S3_ROLE_ARN, AWS_ROLE_ARN):
371371
client_kwargs["role_arn"] = role_arn
372372

373-
if session_name := get_first_property_value(self.properties, S3_SESSION_NAME, AWS_SESSION_NAME):
373+
if session_name := get_first_property_value(self.properties, S3_ROLE_SESSION_NAME, AWS_ROLE_SESSION_NAME):
374374
client_kwargs["session_name"] = session_name
375375

376376
return S3FileSystem(**client_kwargs)

0 commit comments

Comments
 (0)