Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/content/docs/r2/examples/aws/aws-sdk-java.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ import { Render } from "~/components";

This example uses version 2 of the [aws-sdk-java](https://github.com/aws/aws-sdk-java-v2/#using-the-sdk) package. You must pass in the R2 configuration credentials when instantiating your `S3` service client:

:::note[Compatibility]
Client version `2.30.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.

To mitigate, users can use `2.29.52` or add the following to their S3Config:

```java
this.requestChecksumCalculation = "when_required",
this.responseChecksumValidation = "when_required"
```

:::

```java
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;
Expand Down
12 changes: 12 additions & 0 deletions src/content/docs/r2/examples/aws/aws-sdk-php.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ import { Render } from "~/components";

This example uses version 3 of the [aws-sdk-php](https://packagist.org/packages/aws/aws-sdk-php) package. You must pass in the R2 configuration credentials when instantiating your `S3` service client:

:::note[Compatibility]
Client version `3.337.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.

To mitigate, users can use `3.336.15` or add the following to their $options:

```php
'request_checksum_calculation' => 'when_required',
'response_checksum_validation' => 'when_required'
```

:::

```php
<?php
require 'vendor/aws/aws-autoloader.php';
Expand Down
18 changes: 15 additions & 3 deletions src/content/docs/r2/examples/aws/aws-sdk-ruby.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
---
title: aws-sdk-ruby
pcx_content_type: example

---

import { Render } from "~/components"
import { Render } from "~/components";

<Render file="keys" /><br/>
<Render file="keys" />
<br />

Many Ruby projects also store these credentials in environment variables instead.

:::note[Compatibility]
Client version `1.178.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.

To mitigate, users can use `1.177.0` or add the following to their s3 client instantiation:

```ruby
request_checksum_calculation: "when_required",
response_checksum_validation: "when_required"
```

:::

Add the following dependency to your `Gemfile`:

```ruby
Expand Down
12 changes: 12 additions & 0 deletions src/content/docs/r2/examples/aws/boto3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ import { Render } from "~/components";

You must configure [`boto3`](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html) to use a preconstructed `endpoint_url` value. This can be done through any `boto3` usage that accepts connection arguments; for example:

:::note[Compatibility]
Client version `1.36.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.

To mitigate, users can use `1.35.99` or add the following to their s3 resource config:

```python
request_checksum_calculation = 'WHEN_REQUIRED',
response_checksum_validation = 'WHEN_REQUIRED'
```

:::

```python
import boto3

Expand Down
Loading