Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow usage of unsigned S3 client #195

Merged
merged 2 commits into from
Mar 28, 2024

Conversation

dnanuti
Copy link
Contributor

@dnanuti dnanuti commented Mar 27, 2024

Update S3ClientConfig to pass in the configuration for allowing unsigned requests.

Description

We no longer require credentials for accessing public data / data accessible through other mechanisms when using an unsigned client.

Additional context

  • I have updated the CHANGELOG or README if appropriate

Related items

Testing

  • Tested with the public examples bucket
  • Added integration test for that

By submitting this pull request, I confirm that my contribution is made under the terms of BSD 3-Clause License and I agree to the terms of the LICENSE.

IsaevIlya
IsaevIlya previously approved these changes Mar 27, 2024
Update S3ClientConfig to pass in the configuration
for allowing unsigned requests.
@@ -150,6 +150,9 @@ Using S3ClientConfig you can set up the following parameters for the underlying
(max number of parts per upload is 10,000, minimum upload part size is 5 MiB).
Part size must have **values between 5MiB and 5GiB.** Is set by default to **8MiB** (may change in future).

* `unsigned(bool)`: Allows the usage of unsigned clients when accessing public datasets or when other mechanisms are
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
* `unsigned(bool)`: Allows the usage of unsigned clients when accessing public datasets or when other mechanisms are
* `unsigned(bool)`: Set to true to disable signing S3 requests.

(we don't want to suggest "other mechanisms" unless you're really, really sure)

@@ -165,6 +168,9 @@ s3_map_dataset = S3MapDataset.from_prefix(DATASET_URI, region=REGION, s3client_c
s3_checkpoint = S3Checkpoint(region=REGION, s3client_config=config)
# Works similarly for Lightning checkpoints.
s3_lightning_checkpoint = S3LightningCheckpoint(region=REGION, s3client_config=config)

# Use an unsigned S3 client
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Use an unsigned S3 client
# Disable signing to make requests without AWS credentials

@dnanuti dnanuti merged commit ba35c7f into awslabs:main Mar 28, 2024
23 checks passed
@dnanuti dnanuti deleted the feature/allow-unsigned-client branch March 28, 2024 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants