Skip to content

Commit 5a61ffc

Browse files
authored
Add compatibility note for java php ruby boto aws sdks (#19970)
1 parent 2aab315 commit 5a61ffc

File tree

4 files changed

+51
-3
lines changed

4 files changed

+51
-3
lines changed

src/content/docs/r2/examples/aws/aws-sdk-java.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ import { Render } from "~/components";
1010

1111
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:
1212

13+
:::note[Compatibility]
14+
Client version `2.30.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
15+
16+
To mitigate, users can use `2.29.52` or add the following to their S3Config:
17+
18+
```java
19+
this.requestChecksumCalculation = "when_required",
20+
this.responseChecksumValidation = "when_required"
21+
```
22+
23+
:::
24+
1325
```java
1426
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials;
1527
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider;

src/content/docs/r2/examples/aws/aws-sdk-php.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,18 @@ import { Render } from "~/components";
1212

1313
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:
1414

15+
:::note[Compatibility]
16+
Client version `3.337.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
17+
18+
To mitigate, users can use `3.336.15` or add the following to their $options:
19+
20+
```php
21+
'request_checksum_calculation' => 'when_required',
22+
'response_checksum_validation' => 'when_required'
23+
```
24+
25+
:::
26+
1527
```php
1628
<?php
1729
require 'vendor/aws/aws-autoloader.php';

src/content/docs/r2/examples/aws/aws-sdk-ruby.mdx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
---
22
title: aws-sdk-ruby
33
pcx_content_type: example
4-
54
---
65

7-
import { Render } from "~/components"
6+
import { Render } from "~/components";
87

9-
<Render file="keys" /><br/>
8+
<Render file="keys" />
9+
<br />
1010

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

13+
:::note[Compatibility]
14+
Client version `1.178.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
15+
16+
To mitigate, users can use `1.177.0` or add the following to their s3 client instantiation:
17+
18+
```ruby
19+
request_checksum_calculation: "when_required",
20+
response_checksum_validation: "when_required"
21+
```
22+
23+
:::
24+
1325
Add the following dependency to your `Gemfile`:
1426

1527
```ruby

src/content/docs/r2/examples/aws/boto3.mdx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,18 @@ import { Render } from "~/components";
1010

1111
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:
1212

13+
:::note[Compatibility]
14+
Client version `1.36.0` introduced a modification to the default checksum behavior from the client that is currently incompatible with R2 APIs.
15+
16+
To mitigate, users can use `1.35.99` or add the following to their s3 resource config:
17+
18+
```python
19+
request_checksum_calculation = 'WHEN_REQUIRED',
20+
response_checksum_validation = 'WHEN_REQUIRED'
21+
```
22+
23+
:::
24+
1325
```python
1426
import boto3
1527

0 commit comments

Comments
 (0)