Question

Using Amazon S3 Image hosting with Digital Ocean

Posted October 22, 2015 7.1k views
Ruby on Rails Ubuntu DigitalOcean

When I use Amazon S3 Image storage, the images have their own urls instead of having urls at my website.

If I want the images to have a url on my website and use Amazon S3 at the same time with DigitalOcean. (For example myweb.com/images/image1.jpg). Is that possible?

If it isn’t possible then are there other alternatives to getting the same results?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

2 answers

In order to serve content from S3 using your domain name, you can set up a CNAME record pointing a subdomain to your S3 bucket. For instance, you could use something like:

images.myweb.com CNAME          my.bucket.name.s3.amazonaws.com.

For more info, check out the Amazon S3 docs: Customizing Amazon S3 URLs with CNAMEs

Is Digital Ocean got connectivity issue with Amazon AWS? My sites got very slow access to there.

Submit an Answer