REST API is for displaying data received from the third party datasource. If you need to upload your files to Amazon S3 implement AfterAdd/AfterEdit event where you can move the file to Amazon S3. Here is the sample code to upload files to Amazon S3: