Yago Azedias
Yago Azedias

Reputation: 4878

How can I see the resources from cloudfront that are returning 4XX error to the viewer

While using Cloudwatch I am able to see the number of errors 4XX and 5XX returned from the Cloudfront to my viewer, but is there a way to see which resources are returning that status code (Ex: /index.html, /not_found.html ...)?

I am getting a increasing amount of 4XX errors and I would like to know which resources are facing this issue to help debugging. The strange behavior is that I have 0% for errors: 401, 403, 404.

I have already checked the FAQ for cloudfront and cloudwatch but no question seems to answer me. I also have activated the additional metrics, but I am only able to see the percentage of 401, 403, 404 errors.

Upvotes: 0

Views: 1163

Answers (1)

NSS
NSS

Reputation: 213

You should look at the Athena(https://aws.amazon.com/athena/?whats-new-cards.sort-by=item.additionalFields.postDateTime&whats-new-cards.sort-order=desc), which allows to query Cloudfront logs.With Athena query you can query by status column and see which urls are giving 404,500 error. Before using Athena you need to setup few things , you can find the details here https://docs.aws.amazon.com/athena/latest/ug/cloudfront-logs.html

Upvotes: 3

Related Questions