5
5
[ ![ Coverage] ( https://img.shields.io/codecov/c/github/parse-community/parse-server-s3-adapter/master.svg )] ( https://codecov.io/github/parse-community/parse-server-s3-adapter?branch=master )
6
6
[ ![ auto-release] ( https://img.shields.io/badge/%F0%9F%9A%80-auto--release-9e34eb.svg )] ( https://github.com/parse-community/parse-server-s3-adapter/releases )
7
7
8
+ [](https://github.com/parse-community/parse-server/releases)
9
+ [ ![ Node Version] ( https://img.shields.io/badge/nodejs-18,_20,_22-green.svg?logo=node.js&style=flat )] ( https://nodejs.org )
10
+
8
11
[ ![ npm latest version] ( https://img.shields.io/npm/v/@parse/s3-files-adapter.svg )] ( https://www.npmjs.com/package/@parse/s3-files-adapter )
9
12
10
13
---
@@ -28,6 +31,9 @@ The official AWS S3 file storage adapter for Parse Server. See [Parse Server S3
28
31
- [ Adding Metadata and Tags] ( #adding-metadata-and-tags )
29
32
- [ Compatibility with other Storage Providers] ( #compatibility-with-other-storage-providers )
30
33
- [ Digital Ocean Spaces] ( #digital-ocean-spaces )
34
+ - [ Breaking Changes From v2 to v3] ( #breaking-changes-from-v2-to-v3 )
35
+ - [ Best Practices] ( #best-practices )
36
+ - [ Why the Change] ( #why-the-change )
31
37
32
38
33
39
# Getting Started
@@ -40,21 +46,24 @@ The official AWS S3 file storage adapter for Parse Server. See [Parse Server S3
40
46
41
47
### Parse Server
42
48
43
- | Version | End-of-Life | Compatible |
44
- | ---------| ---------------| ------------|
45
- | <=5 | December 2023 | ✅ Yes |
46
- | 6 | December 2024 | ✅ Yes |
47
- | 7 | December 2025 | ✅ Yes |
49
+ Parse Server S3 Adapter is compatible with the following versions of Parse Server.
50
+
51
+ | Parse Server Version | End-of-Life | Compatible |
52
+ | ----------------------| ---------------| ------------|
53
+ | <=5 | December 2023 | ❌ No |
54
+ | 6 | December 2024 | ❌ No |
55
+ | <7.3.0 | December 2025 | ❌ No |
56
+ | >=7.3.0 | December 2025 | ✅ Yes |
48
57
49
58
### Node.js
50
59
51
- This product is continuously tested with the most recent releases of Node.js to ensure compatibility. We follow the [ Node.js Long Term Support plan] ( https://github.com/nodejs/Release ) and only test against versions that are officially supported and have not reached their end-of-life date.
60
+ Parse Server S3 Adapter is continuously tested with the most recent releases of Node.js to ensure compatibility. We follow the [ Node.js Long Term Support plan] ( https://github.com/nodejs/Release ) and only test against versions that are officially supported and have not reached their end-of-life date.
52
61
53
- | Version | Latest Version | End-of-Life | Compatible |
54
- | ------------| ----------- -----| -------------| ------------|
55
- | Node.js 18 | 18.20.4 | April 2025 | ✅ Yes |
56
- | Node.js 20 | 20.15.1 | April 2026 | ✅ Yes |
57
- | Node.js 22 | 22.4.1 | April 2027 | ✅ Yes |
62
+ | Node.js Version | End-of-Life | Compatible |
63
+ | -----------------| -------------| ------------|
64
+ | 18 | April 2025 | ✅ Yes |
65
+ | 20 | April 2026 | ✅ Yes |
66
+ | 22 | April 2027 | ✅ Yes |
58
67
59
68
## AWS Credentials
60
69
@@ -277,7 +286,6 @@ var S3Adapter = require("@parse/s3-files-adapter");
277
286
var AWS = require (" aws-sdk" );
278
287
279
288
// Configure Digital Ocean Spaces EndPoint
280
- const spacesEndpoint = new AWS.Endpoint (process .env .SPACES_ENDPOINT );
281
289
var s3Options = {
282
290
bucket: process .env .SPACES_BUCKET_NAME ,
283
291
baseUrl: process .env .SPACES_BASE_URL ,
@@ -290,7 +298,7 @@ var s3Options = {
290
298
s3overrides: {
291
299
accessKeyId: process .env .SPACES_ACCESS_KEY ,
292
300
secretAccessKey: process .env .SPACES_SECRET_KEY ,
293
- endpoint: spacesEndpoint
301
+ endpoint: process . env . SPACES_ENDPOINT
294
302
}
295
303
};
296
304
@@ -307,3 +315,78 @@ var api = new ParseServer({
307
315
filesAdapter: s3Adapter
308
316
});
309
317
```
318
+
319
+
320
+ # Breaking Changes from v2 to v3
321
+
322
+ 1 . ** Old Method (No Longer Supported)** :
323
+ ``` javascript
324
+ const options = {
325
+ bucket: ' bucket-1' ,
326
+ s3overrides: {
327
+ accessKeyId: ' access-key' ,
328
+ secretAccessKey: ' secret-key'
329
+ }
330
+ };
331
+ ```
332
+
333
+ 2 . ** New Methods (Required)** :
334
+ Credentials must now be passed either:
335
+
336
+ - ** Inside the ` s3overrides.credentials ` key** :
337
+ ``` javascript
338
+ const options = {
339
+ bucket: ' bucket-1' ,
340
+ s3overrides: {
341
+ credentials: {
342
+ accessKeyId: ' access-key' ,
343
+ secretAccessKey: ' secret-key'
344
+ }
345
+ }
346
+ };
347
+ ```
348
+
349
+ - ** Directly in the root object** :
350
+ ` ` ` javascript
351
+ const options = {
352
+ bucket: 'bucket-1',
353
+ credentials: {
354
+ accessKeyId: 'access-key',
355
+ secretAccessKey: 'secret-key'
356
+ }
357
+ };
358
+ ` ` `
359
+
360
+ ## Best Practices
361
+
362
+ 1. ** Use Environment Variables for Credentials** :
363
+ Storing credentials directly in code can be insecure . Instead , use environment variables with the AWS SDK ' s built-in support for credential resolution:
364
+ ```javascript
365
+ const options = {
366
+ bucket: ' bucket- 1 ' ,
367
+ s3overrides: {
368
+ // The SDK will automatically load credentials from the environment
369
+ }
370
+ };
371
+ ```
372
+
373
+ 2. **Prefer AWS IAM Roles (for EC2, ECS, or Lambda)**:
374
+ If running in AWS-managed environments, use IAM roles to automatically provide temporary credentials:
375
+ - No need to pass `credentials` manually; the SDK resolves them automatically.
376
+
377
+ 3. **Use the AWS Credential Provider Chain**:
378
+ Leverage the SDK' s support for multiple credential sources:
379
+ ` ` ` javascript
380
+ import { fromIni } from '` aws- sdk/ credential- providers' ;
381
+
382
+ const options = {
383
+ bucket: ' bucket- 1 ' ,
384
+ s3overrides: {
385
+ credentials: fromIni({ profile: ' your- profile- name' })
386
+ }
387
+ };
388
+ ```
389
+
390
+ ## Why the Change
391
+
392
+ The updated approach adheres to AWS SDK v3' s modular and secure design, improving compatibility with advanced credential management techniques and security best practices.
0 commit comments