Cloudfront + S3 = InvalidRequest. Requests using x-amz-source-account or x-amz-source-arn must be made over HTTPS and AWS Signature Version 4
0
Hi, I'm trying to deploy an angular application to Amazon S3 Bucket and access it via AWS Cloud Front. For CI/CD I'm using AWS Code Pipeline with Code Build and everything is ok with the process that's finished pushing angular build artifacts to my S3 bucket.
Trying to access the Cloudfront distribution DNS, I get an error:
<Error>
<Code>InvalidRequest</Code>
<Message>Requests using x-amz-source-account or x-amz-source-arn must be made over HTTPS and AWS Signature Version 4</Message>
<RequestId>VJJPFAY50QM6B1XA</RequestId>
<HostId>J4YvHSv1j1r/CktRahi6ZKrbodp9BO0yIj6m2eSsu2bmc7I4DoTlZCQT8cDfBy2Y9MGd0H0pidA=</HostId>
</Error>
Cloudfront is configured with OAC control and Bucket policy was updated correctly. I've tryed a lot of configurations with no success. Can you help me?
Hi Gary! My origin is defined as S3 Bucket and behaviour is "Redirect HTTP to HTTPS" on Viewer protocol policy.