Set S3 as File adapter, but uploaded file still goes to MongDB
Seems I'm not alone: http://stackoverflow.com/questions/35824461/store-parse-files-to-amazon-s3-using-ios-swift-xcode
This is the tutorial that I followed: https://github.com/ParsePlatform/parse-server/wiki/Configuring-File-Adapters#configuring-s3adapter
Here is my configuration:

@wandonye If you're using Node.js/Express you will have to write it directly in thee index.js file instead of the elastic beanstalk options. Also make sure you versions are up to date. once changes are made you have to restart app servers
@wandonye were you able to solve this ?
@jdzorz I'm not using Express, or I don't know what it is. I used the "deploy to AWS" button on one of the wiki page. Can I assume that is an up-to-date version?
@poojanjhaveri Not yet...
The deploy to aws button is using express. If you launhed it recently that yes it should be the most up to date version. So what you have to do is edit the index.js file and add this:
var S3Adapter = require('parse-server').S3Adapter;
var api = new ParseServer({ databaseURI: databaseUri || 'mongodb://localhost:27017/dev', appId: process.env.APP_ID || 'APPLICATION_ID', masterKey: process.env.MASTER_KEY || 'MASTER_KEY', ... filesAdapter: new S3Adapter( "S3_ACCESS_KEY", "S3_SECRET_KEY", "S3_BUCKET", {directAccess: true} ), ...
then restart your app
Thanks for pointing out the right direction. I unzipped "parse-server-example.zip", added the codes into index.js, zipped the folder, uploaded and deployed it. But now I get the following error:
The configuration file __MACOSX/parse-server-example-3/.ebextensions/._app.config in application version parse-server-s3 contains invalid YAML or JSON. YAML exception: unacceptable character '' (0x0) special characters are not allowed in "
", position 0, JSON exception: Unexpected character () at position 0.. Update the configuration file.
I think I got it. Mac creates some secret folder itself...
Still running into all kinds of problems. I removed _MACOSX folders and deployed, got 520 Error. I thought it might be not right to compress the folder "parse-server-example-3", so I went into the folder and compressed everything inside. Now when deploy it, I get:
[Instance: i-0182be514af666540] Command failed on instance. Return code: 1 Output: (TRUNCATED)...yfile('%s/npm-debug.log' % app_path, '/var/log/nodejs/npm-debug.log') File "/usr/lib64/python2.7/shutil.py", line 82, in copyfile with open(src, 'rb') as fsrc: IOError: [Errno 2] No such file or directory: '/tmp/deployment/application/npm-debug.log'. Hook /opt/elasticbeanstalk/hooks/appdeploy/pre/50npm.sh failed. For more detail, check /var/log/eb-activity.log using console or EB CLI.
Here is the changed index.js:
I apparently underestimated the complexity of this task.
Can you add a comma after the
{directAccess: true, region: 'us-west-2'}
),
});
looks like thats whats missing.