Skip to content

Commit bc9b76d

Browse files
scuffiscuffi
andauthored
Reference R2 credentials over AWS in mounting docs (#29046)
Co-authored-by: scuffi <aferguson@cloudflare.com>
1 parent af8f394 commit bc9b76d

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

src/content/docs/sandbox/guides/mount-buckets.mdx

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,14 @@ Mounted buckets are visible across all sessions since they share the filesystem.
6060
Set credentials as Worker secrets and the SDK automatically detects them:
6161

6262
```sh
63-
npx wrangler secret put AWS_ACCESS_KEY_ID
64-
npx wrangler secret put AWS_SECRET_ACCESS_KEY
63+
npx wrangler secret put R2_ACCESS_KEY_ID
64+
npx wrangler secret put R2_SECRET_ACCESS_KEY
6565
```
6666

67+
:::note[R2 credentials]
68+
We also automatically detect `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` for compatibility with other S3-compatible providers.
69+
:::
70+
6771
<TypeScriptExample>
6872
```typescript
6973
// Credentials automatically detected from environment
@@ -307,6 +311,13 @@ For provider-specific configuration, see the [s3fs-fuse wiki](https://github.com
307311

308312
**Solution**: Set credentials as Worker secrets:
309313

314+
```sh
315+
npx wrangler secret put R2_ACCESS_KEY_ID
316+
npx wrangler secret put R2_SECRET_ACCESS_KEY
317+
```
318+
319+
or
320+
310321
```sh
311322
npx wrangler secret put AWS_ACCESS_KEY_ID
312323
npx wrangler secret put AWS_SECRET_ACCESS_KEY

0 commit comments

Comments
 (0)