title: AWS - Cloudfront / S3 - Access Denied
body: <p><a href="https://i.stack.imgur.com/k6MxI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/k6MxI.png" alt="enter image description here"></a></p>
  
  <p>My website is on AWS EC2 instance. It has Cloudfront &amp; S3 bucket.</p>
  
  <p>When I am trying to access my website. I am keep getting <strong>Access Denied</strong> error.</p>
  
  <p>I am not sure what configuration I am missing.</p>
  
  <p>Below is my bucket policy.</p>
  
  <pre><code>{
      "Version": "2008-10-17",
      "Id": "PolicyForCloudFrontPrivateContent",
      "Statement": [
          {
              "Sid": "MakePublic",
              "Effect": "Allow",
              "Principal": "*",
              "Action": "s3:*",
              "Resource": "arn:aws:s3:::domain-cdn/*"
          }
      ]
  }
  </code></pre>
  
  <p>Already followed <a href="https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-access-to-amazon-s3/" rel="nofollow noreferrer">https://aws.amazon.com/premiumsupport/knowledge-center/cloudfront-access-to-amazon-s3/</a></p>
  
  <p>I am using Cloudfront &amp; it is point to S3 bucket.</p>