Amazon S3 permission

Make Amazon S3 Bucket public

To make an Amazon S3 bucket public, go to

Amazon Console > S3 > Bucket > Permission

Amazon S3 permission

Click on Permissions

Amazon S3 Bucket Policy

Click “Bucket policy”

Amazon S3 Policy editor

You get a blank editor. To make the bucket public, paste following code

Replace with your actual S3 Bucket name.

See Amazon S3

WordPress CDN Setup W3 Total Cache

Enable Amazon Cloudfront CDN in WordPress

I was setting up a wordpress web site to use Amazon S3 + Cloudfront as CDN. I used w3 total cache plugin for this. w3 total cache plugin have option to auto create Amazon S3 bucket and cloudfront distribution, for for this, you need to give Amazon AWS API keys.

WordPress CDN Setup W3 Total Cache

Clicking the button “Create as new bucket with distribution” will auto create s3 bucket and cloudfront for you.

if you site have images already uploaded, you need to upload them to Amazon S3. This can be done with W3 Total Cache.

Upload WordPress media to CDN

If you have lot of files, upload may fail. You may need to use Amazon AWS CLI tool to do the upload.

If needed, you can upload themes and plugins folder too

aws s3 cp command

aws

AWS Price calculator

To backup a folder to Amazon S3 bucket, run

Example

aws s3 cp command

To sync (download) a s3 bucket to your local computer, run

To list all s3 buckets, run

Example