Skip to content

Commit 175cf75

Browse files
Redact s3 api creds (#21205)
* Redact s3 api creds * Fix bucket URLs
1 parent f981074 commit 175cf75

File tree

3 files changed

+15
-21
lines changed

3 files changed

+15
-21
lines changed

src/content/docs/r2/buckets/cors.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ The example below shows how to generate a presigned `PutObject` URL using the [`
4343
import { PutObjectCommand, S3Client } from "@aws-sdk/client-s3";
4444
import { getSignedUrl } from "@aws-sdk/s3-request-presigner";
4545
const S3 = new S3Client({
46-
endpoint: "https://4893d737c0b9e484dfc37ec392b5fa8a.r2.cloudflarestorage.com",
46+
endpoint: "https://<account_id>.r2.cloudflarestorage.com",
4747
credentials: {
48-
accessKeyId: "7dc27c125a22ad808cd01df8ec309d41",
49-
secretAccessKey:
50-
"1aa5c5b0c43defdb88f567487c071d17e234126133444770a706ae09336c57a4",
48+
accessKeyId: "<access_key_id>",
49+
secretAccessKey: "<access_key_secret>",
5150
},
5251
region: "auto",
5352
});

src/content/docs/r2/buckets/object-lifecycles.mdx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,10 @@ Below is an example of configuring a lifecycle configuration (a collection of li
5959

6060
```js title="Configure the S3 client to interact with R2"
6161
const client = new S3({
62-
endpoint: "https://4893d737c0b9e484dfc37ec392b5fa8a.r2.cloudflarestorage.com",
62+
endpoint: "https://<account_id>.r2.cloudflarestorage.com",
6363
credentials: {
64-
accessKeyId: "7dc27c125a22ad808cd01df8ec309d41",
65-
secretAccessKey:
66-
"1aa5c5b0c43defdb88f567487c071d17e234126133444770a706ae09336c57a4",
64+
accessKeyId: "<access_key_id>",
65+
secretAccessKey: "<access_key_secret>",
6766
},
6867
region: "auto",
6968
});
@@ -155,11 +154,10 @@ import S3 from "aws-sdk/clients/s3.js";
155154

156155
// Configure the S3 client to talk to R2.
157156
const client = new S3({
158-
endpoint: "https://4893d737c0b9e484dfc37ec392b5fa8a.r2.cloudflarestorage.com",
157+
endpoint: "https://<account_id>.r2.cloudflarestorage.com",
159158
credentials: {
160-
accessKeyId: "7dc27c125a22ad808cd01df8ec309d41",
161-
secretAccessKey:
162-
"1aa5c5b0c43defdb88f567487c071d17e234126133444770a706ae09336c57a4",
159+
accessKeyId: "<access_key_id>",
160+
secretAccessKey: "<access_key_secret>",
163161
},
164162
region: "auto",
165163
});
@@ -199,11 +197,10 @@ import S3 from "aws-sdk/clients/s3.js";
199197

200198
// Configure the S3 client to talk to R2.
201199
const client = new S3({
202-
endpoint: "https://4893d737c0b9e484dfc37ec392b5fa8a.r2.cloudflarestorage.com",
200+
endpoint: "https://<account_id>.r2.cloudflarestorage.com",
203201
credentials: {
204-
accessKeyId: "7dc27c125a22ad808cd01df8ec309d41",
205-
secretAccessKey:
206-
"1aa5c5b0c43defdb88f567487c071d17e234126133444770a706ae09336c57a4",
202+
accessKeyId: "<access_key_id>",
203+
secretAccessKey: "<access_key_secret>",
207204
},
208205
region: "auto",
209206
});

src/content/docs/r2/reference/data-location.mdx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,10 @@ The example below shows how to create an R2 bucket in the `eu` jurisdiction usin
107107
```js
108108
import { S3Client, CreateBucketCommand } from "@aws-sdk/client-s3";
109109
const S3 = new S3Client({
110-
endpoint:
111-
"https://4893d737c0b9e484dfc37ec392b5fa8a.eu.r2.cloudflarestorage.com",
110+
endpoint: "https://<account_id>.eu.r2.cloudflarestorage.com",
112111
credentials: {
113-
accessKeyId: "7dc27c125a22ad808cd01df8ec309d41",
114-
secretAccessKey:
115-
"1aa5c5b0c43defdb88f567487c071d17e234126133444770a706ae09336c57a4",
112+
accessKeyId: "<access_key_id",
113+
secretAccessKey: "<access_key_secret>",
116114
},
117115
region: "auto",
118116
});

0 commit comments

Comments
 (0)