I am bit confused with setting up Amazon Cloudfront and S3 bucket.
I've got my bucket setup and using the wordpress WP Offload S3 plugin to store any images in this bucket. When checking the image URL in the media manager, all seems to work fine and URL points to the bucket.
I've got the Cloudfront distribution set up, pointed at the S3 bucket as an origin.
But now when I access my Cloudfront distribution URL directly, (xxxxxxxxx.cloudfront.net), I just get the page with the following:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>
<RequestId>XXXXXXXXXXXXXX</RequestId>
<HostId>
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
</HostId>
</Error>
If I access my Cloudfront distribution URL, I should be seeing my cached version of the website, correct?
Instead is seems that my current distribution is only working for the S3 bucket with images, but not on the actual website.
So do I need to set up an additional origin for the same distribution??
To have one origin for the actual domain example.com and the other origin for the S3 bucket?