How do I identify which file was responsible for generating an HTTP 4XX error?

0

I've been getting a lot of 4xx errors in CloudFront. By analyzing your documentation, I have identified that this behavior may be related to Origin's caching configuration and/or the inclusion of cache control metadata.

In the cache statistics, represented in the attached images, I show the volume of errors received in the last 24 hours, in just one Origin, as an example of the error. The "server access logging" setting is disabled in the bucket configured as the distribution's Origin. Is there any way I can retrieve this information, considering that it is not possible for me to enable this feature?

My problem is: I have almost 1 TB of data in my Origin, how can I identify which file was responsible for generating this error, in response to the client's request?

HTTP status codes - Daily HTTP status codes - Hourly Server Access Logging

asked 2 months ago106 views
1 Answer
2
Accepted Answer

Hi Fernando -

You will need to enable access logs if you have not already. In those access logs, you should be able to find where those 4xx errors are coming from. If you need some help querying the logs, Athena is a good choice.

If you don't have the ability to turn on the logging, you may have to work with whoever owns IAM policies in your account or whoever owns the distribution.

profile pictureAWS
answered 2 months ago
profile picture
EXPERT
reviewed a month ago
profile pictureAWS
EXPERT
reviewed 2 months 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