Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

Can Images Folder Be Hosted On Amazon S3 Rate Topic   - - - - -

 
  • technoob
  • Senior Member
  • Trial users
  • Join Date: 08-Jun 15
  • 309 posts

Posted 18 April 2017 - 11:15 AM #1

if the setup is installed on amazon aws can we host the images folder only on amazon s3 so that they are accessible as images.domain.com/image1.jpg

 

whereas the website runs as www.domain.com 



 
  • iamau5
  • Newbie
  • Trial users
  • Join Date: 31-Mar 17
  • 7 posts

Posted 21 April 2017 - 06:30 AM #2

Looking forward for the answer too!



 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 553 posts

Posted 04 December 2017 - 06:23 AM #3

if the setup is installed on amazon aws can we host the images folder only on amazon s3 so that they are accessible as images.domain.com/image1.jpg

 

whereas the website runs as www.domain.com 

 

Yes this is called 'CDN'. This is supported by default in CS-Cart.


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • alssafeer
  • Advanced Member
  • Members
  • Join Date: 03-Dec 11
  • 61 posts

Posted 13 January 2018 - 11:26 PM #4

Looking forward for the answer too!

 

how to enable and configure AWS CloudFront CDN ?


 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 553 posts

Posted 14 January 2018 - 10:35 AM #5

 

Looking forward for the answer too!

 

how to enable and configure AWS CloudFront CDN ?

 

 

Hello,

 

Next time please read the previous answer(s). Take a look http://docs.cs-cart....n_settings.html

 

Best wishes,


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • Flow
  • Super Duper and Amazingly Sexy Senior
  • Members
  • Join Date: 13-Oct 10
  • 2307 posts

Posted 14 January 2018 - 05:48 PM #6

Wooooww, posted on april 18 and no one answer. CS-cart really don't likes support, just likes to sell, and one of the reason makes me thinking deep and find all answers for my questions before to buy it.

 

This is a users forum. Even though cs-cart answers many questions as well. Support can be reached in other ways. 

2nd of all, it gets tired when people keep asking questions that can simply be answered by looking in the docs. Even a quick google search will get you this answer. 


When life hands you lemons, bring on the Tequila baby!


 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 199 posts

Posted 15 July 2019 - 10:57 PM #7

Yes, but the documentation is not clear how image uploads via CS-CART backend are handled depending on the type of origin that you have connected to your cloud front instance... 

 

If you use a webserver origin with your cloudfront instance, new image uploads are still sent to your cs-cart file system (I believe) and cloudfront would retrieve them from your webserver on first request.   

 

Are the images automatically synced (and therefore don't need to be saved on the server) to your S3 origin when cloudfront to use an S3 origin?  There are plenty of good reasons why all file uploads should be moved away from the CS-CART installation, so it would be good to know how this is handled in S3 situations.. 



 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 553 posts

Posted 22 July 2019 - 09:40 AM #8

Yes, but the documentation is not clear how image uploads via CS-CART backend are handled depending on the type of origin that you have connected to your cloud front instance... 

 

If you use a webserver origin with your cloudfront instance, new image uploads are still sent to your cs-cart file system (I believe) and cloudfront would retrieve them from your webserver on first request.   

 

Are the images automatically synced (and therefore don't need to be saved on the server) to your S3 origin when cloudfront to use an S3 origin?  There are plenty of good reasons why all file uploads should be moved away from the CS-CART installation, so it would be good to know how this is handled in S3 situations.. 

 

You can create a new storage adapter class and handle uploads that way. The only thing you have to do is register it to the correct namespace.


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 199 posts

Posted 26 July 2019 - 12:26 AM #9

Ok, thanks - I thought it was worth clarifying because even though we can enable CDN to cache our assets (as only web server origin is supported), it does not mean that any new uploads are sent to cloudfront.. they are still initially saved to your server hard disk. 

 

What I would like is a way to move all images to an S3 bucket to make deployments easier, but there appears no way to do this without writing custom code.. 

 

I guess it makes sense to keep the images on the server hard disk as we need to generate thumbnails - how have other people tackled this? 

 

I am currently using aws codedeploy to deploy updates to cscart and the images are the last stumbling block for me.  If I run with a blue/green setup, then any new image uploads would be lost when the new instance starts up.



 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 199 posts

Posted 26 July 2019 - 03:49 AM #10

Hello,

 

Next time please read the previous answer(s). Take a look http://docs.cs-cart....n_settings.html

 

Best wishes,

 

Correct me if I am wrong, but the docs have nothing to do with S3, they enable cloudfront using your API keys to setup cloudfront with your webserver as the origin, not an S3 origin... I don't believe by enabling cloudfront that your images become hosted in an s3 bucket.



 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 199 posts

Posted 26 July 2019 - 05:52 AM #11

While I still believe my comments above are correct regarding the CDN, after grepping the PHP files, I found this route.. 

 

https://mywebsite.co...=storage.manage

 

Which gives you the option of using an S3 bucket for storage, BUT, I don't see anywhere in admin menus to access this route - which explains why I didn't think it was possible... 

 

Am I missing something obvious?

 

Under Administration > Storage, I only have CDN settings, clear thumbnails, regenerate thumbnails... 



 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 553 posts

Posted 26 July 2019 - 06:39 AM #12

Correct me if I am wrong, but the docs have nothing to do with S3, they enable cloudfront using your API keys to setup cloudfront with your webserver as the origin, not an S3 origin... I don't believe by enabling cloudfront that your images become hosted in an s3 bucket.

 

Cloudfront = S3 with caching on Edge Locations...


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • poppedweb
  • Authorized Reseller
  • Members
  • Join Date: 02-Aug 16
  • 553 posts

Posted 26 July 2019 - 06:41 AM #13

Ok, thanks - I thought it was worth clarifying because even though we can enable CDN to cache our assets (as only web server origin is supported), it does not mean that any new uploads are sent to cloudfront.. they are still initially saved to your server hard disk. 

 

What I would like is a way to move all images to an S3 bucket to make deployments easier, but there appears no way to do this without writing custom code.. 

 

I guess it makes sense to keep the images on the server hard disk as we need to generate thumbnails - how have other people tackled this? 

 

I am currently using aws codedeploy to deploy updates to cscart and the images are the last stumbling block for me.  If I run with a blue/green setup, then any new image uploads would be lost when the new instance starts up.

 

We solved this by implementing Lambda scripts that pre generate all thumbnails. The main advantage is that Lamda scales in itself and hence gets load balanced very well. Which means that there is no additional load on your server.

 

Also, you can couple this with 'triggers' in S3 so that images automatically get resized.


PoppedWeb | sales@poppedweb.com | https://poppedweb.com
TurnKey Website Design | Add-Ons | Performance Audits | Dedicated Server Management
24/7 Support | Response within an hour (during working hours).

 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 199 posts

Posted 26 July 2019 - 06:41 AM #14

I believe that was the case in the past, but cloudfront can also cache content from a webserver now (originally just s3) and revert back to the original web server (not s3) if it isn't in cloudfront, which I am pretty sure CS-CART does... 



 
  • natewallis
  • Senior Member
  • Members
  • Join Date: 11-Jan 13
  • 199 posts

Posted 26 July 2019 - 06:59 AM #15

I also found this backend dispatch

 

admin.php?dispatch=storage.manage,

 

Which I remember see in the early days of CS-CART, but it doesn't appear to be a menu option anymore.... S3 storage class is already built in, which I think means that the thumbnail generation would work... assuming the s3 storage can be configured propertly. 

 

Inputting my access keys, creates a bucket for me, but breaks all the css...