Amazon S3 Images addon allows a store admin to move all the category and product images over to the “cloud” storage services offered by Amazon that will reduce the overall website’s bandwidth and allow to not exceed the limit set by a hosting provider. The addon also allows using an Amazon CloudFront CDN account to get the site images loaded by customers’ browsers really fast.
To start using the Amazon S3 Images addon, you need to make sure it is installed and enabled as described in Installing Addons from the X-Cart App Store.
To be able to use the Amazon S3 Images addon you need to have an active Amazon AWS account that you can sign up here.
Creating Bucket in Amazon AWS Account
Start with creating a new bucket and getting the AWS access key and AWS secret key in your Amazon AWS account as you will need this data to configure the Amazon S3 Images addon in your store Admin area.
First, sign up to Amazon AWS if you have not done so yet. For this purpose fill in the sign-up form at https://aws.amazon.com/console/:
If you already have an Amazon AWS account, sign in and locate the Amazon S3 section. There you’ll need to create a new bucket where the category and product images will be uploaded to. For this purpose click on the Create bucket button:
You will need to complete the 4 basic steps where it will be necessary to specify the bucket name and select the region where the bucket should be located (it is recommended to choose the region that is geographically close to you), specify bucket properties and set public access permissions (if public access is blocked for all of the options, the migration of images will fail).
More info on bucket creation and management you can find here.
Once a bucket is created you need to find your AWS access key and AWS secret key or create new in the Your Security Credentials section:
If you decide to use an Amazon Cloudfront domain name for a faster images uploading you will need to create a distribution for your bucket in the Cloudfront section of your Amazon AWS account as described here.
The Amazon Cloudfront domain mane you will find by clicking the distribution ID. It reveals the distribution properties, the domain name being one of them:
Configuring Amazon S3 Images addon
Once the Amazon S3 Images addon has been installed and enabled, you will see an active Settings link in the My addons section of your store Admin area, that you should use to access the settings page to configure the addon:
Click on the Settings link to be redirected to the Amazon S3 images settings page where it will be necessary to specify your Amazon AWS account data to configure the addon:
The settings that you need to define are as follows:
- AWS access key: Specify your Amazon AWS account access key here.
- AWS secret key: Specify your Amazon AWS account secret key here.
- S3 bucket name: Specify your Amazon S3 bucket name here.
- Amazon CloudFront domain name: Specify your Amazon Cloudfront domain name here.
- Viewer protocol policy: This setting determines the protocol used by X-Cart to form the image upload URL. If “HTTP or HTTPS” is selected in the Viewer protocol policy setting on the Amazon CloudFront end (which corresponds to using the protocol currently used for the page opened in the viewer’s browser), please enable the same option here; otherwise (if you prefer to use HTTPS at all times) enable the option “HTTPS only”.
- Save origin images on the store server: If the setting is set to NO all images will be removed from your store file system after the images’ migration to Amazon is complete.
Submit the settings to make them active.
Once the addon has been configured the Migrate to Amazon S3 button becomes available at the bottom of the settings page:
Click this button to start the migration of images. The process may take a while.
When a migration is complete, a notification on a successful images migration will be displayed: