By using AWS re:Post, you agree to the AWS re:Post Terms of Use

CloudFront: The resource you requested does not exist Origins S3

0

I have the s3 link accessed ok, https://videodrama-v2.s3.us-east-1.amazonaws.com/video-cdn/m3u8.dev-1728655465501.mp4 but when I configure CloudFront with Origins as videodrama-v2.s3.us-east-1.amazonaws.com Then the CloudFront link https://doksyh7cshssx.cloudfront.net/video-cdn/m3u8.dev-1728655465501.mp4 has the following error, I don't understand why: <Error> <Code>NotFound</Code> <Message>The resource you requested does not exist</Message> <RequestId>41QG83VQFBZ9WSAS</RequestId> <HostId>iePyGBQcQJ8Z0wcLxUA7Bdhg9OE1VCKx5X1V9Q6wxSxmg0az2Z6ZTH913QYQiyRL6vHoptZu1hM=</HostId> </Error> Please help me find the cause of the error

asked a month ago49 views
1 Answer
0

The error you're encountering suggests that there might be an issue with the configuration of your CloudFront distribution or the permissions set on your S3 bucket. Here are a few potential causes and solutions to consider:

  1. Origin Access Identity (OAI) or Origin Access Control (OAC): If you've set up CloudFront to use OAI or OAC to access your S3 bucket, make sure that the bucket policy is correctly configured to allow access from CloudFront. Without proper permissions, CloudFront won't be able to retrieve objects from S3.

  2. S3 Bucket Policy: Check your S3 bucket policy to ensure it allows CloudFront to access the objects. You may need to update the bucket policy to grant the necessary permissions to your CloudFront distribution.

  3. CloudFront Distribution Settings: Verify that the origin domain name in your CloudFront distribution is correctly set to your S3 bucket's endpoint. It should be in the format: bucket-name.s3.region.amazonaws.com.

  4. Object Permissions: Ensure that the specific object (m3u8.dev-1728655465501.mp4) has the necessary permissions for CloudFront to access it.

  5. Cache Behavior: Check your CloudFront distribution's cache behavior settings. Make sure that the path pattern includes the path to your video files (/video-cdn/*).

  6. Origin Path: If your files are in a specific folder within the S3 bucket, make sure you've set the correct origin path in your CloudFront distribution settings.

  7. CloudFront Cache: If you've recently updated permissions or configurations, it might take some time for changes to propagate. You can try invalidating the CloudFront cache for the specific path.

To troubleshoot, double-check these settings in your AWS Console for both S3 and CloudFront. If the issue persists, you may want to review CloudFront logs for more detailed error information.
Sources
S3OriginConfig - Amazon CloudFront
S3Origin - Amazon CloudFront
Community | Hosting my Static Website in an AWS S3 Bucket + CloudFront— Part 2
Tutorial: Hosting on-demand streaming video with Amazon S3, Amazon CloudFront, and Amazon Route 53 - Amazon Simple Storage Service

profile picture
answered a month ago
profile picture
EXPERT
reviewed a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions