Search code examples
phpcodeigniteramazon-s3amazon-ec2amazon-cloudfront

S3 / Cloudfront Download Restrictions


I'm using S3 and Cloudfront for an application deployed on EC2.

The permissions seem (in my limited knowledge of AWS) to be either public or private. How can I make files accessible from Cloudfront / S3 to requests from my EC2 instances, but not elsewhere?

I'm sure I'm probably just missing something in the AWS console.

Any ideas welcome!

Thanks!


Solution

  • If you are the owner and you have S3 & EC2 on the same account, then make your files Read/Write only to you. Give permission (Full Control) only to the owner.

    To understand Amazon S3 ACL - please read this article: http://docs.amazonwebservices.com/AmazonS3/latest/dev/index.html?ManageACLsUsingConsole.html