Thanks a lot for the detailed instructions. If I use the FTP software to move all the media files over, is there an easy way to configure in JCE Editor, so that the articles will use the resources on S3, rather than the web server's file system?
After the content is saved, JCE does not have any control over how it is displayed in the front-end. Each article would habe to be edited to change the ulr from the local file to S3. You could use an htaccess rule to redicrect the request to S3 for existing images, eg:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/images/ [NC]
RewriteCond %{REQUEST_URI} \.(jpe?g|png|gif|webp|svg)$ [NC]
# If local file exists, do nothing
RewriteCond %{DOCUMENT_ROOT}/images/$1 -f
RewriteRule ^ - [L]
# Otherwise redirect to CDN/S3
RewriteRule ^images/(.+)$ https://cdn.example.com/images/$1 [R=302,L,NE]
Regarding S3 is slow, did you mean the upload in JCE Editor is slow, or did you mean the website's frontend page loading is slow? Or both?
Nothing to do with the front-end, only when accessing files on S3 using the JCE File Browser etc. With local files the process is:
You -> Server -> You
but with S3 it is:
You -> Server -> S3 -> Server -> You
Witih some processes, multiple requests are made between the server and S3 before the data is returned to you. There are some caching mechanisms in place to try and speed this up, but it will always be slower than just using the local server storage.
Ryan Demmer
Lead Developer / CEO / CTO
Just because you're not paranoid doesn't mean everybody isn't out to get you.