Can Images Folder Be Hosted On Amazon S3

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

Looking forward for the answer too!

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.

Looking forward for the answer too!

how to enable and configure AWS CloudFront CDN ?

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.com/4.7.x/user_guide/settings/cdn_settings.html

Best wishes,

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.

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..

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.

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.

Hello,

Next time please read the previous answer(s). Take a look http://docs.cs-cart.com/4.7.x/user_guide/settings/cdn_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.

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

https://mywebsite.com/admin.php?dispatch=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...

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...

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.

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...

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...

I also found this backend dispatch

admin.php?dispatch=storage.manage,

This functionality is not supported by CS-Cart team and we do not recommend using it in live stores.

This functionality is not supported by CS-Cart team and we do not recommend using it in live stores.

Is there any other way to integrate s3 bucket to cs-cart?

Is there any other way to integrate s3 bucket to cs-cart?

Currently not. Best is probably to use the CsCart integration and hire a dev to check it out for you.