How do I prevent CloudFront from caching for a specific User Agent? (Zabbix web monitoring)

0

I configured Zabbix web scenarios for monitoring WordPress sites. The problem is that CloudFront caches it and returns HTTP code 200 without reffering to the origin. To solve this, I came up with an idea that I might be able to disable caching for a specific User Agent by using Lambda@Edge or CloudFront functions or something, but I'm not sure about it. Is there any common solution or best practice in the case like this?

preguntada hace 7 meses284 visualizaciones
1 Respuesta
0

Hi,

There is a simpler solution to your problem, I believe: do not query the URL served by CloudFront from Zabbix but rather directly query the DNS name of the origin that you refer to in the CloudFront distribution.

You can of course continue polling the CloudFront URL in parallel to monitor the health of CloudFront itself.

Best,

Didier

profile pictureAWS
EXPERTO
respondido hace 7 meses
  • Thanks, but unfortunately I need to use actual domain names because the origin (ALB + EC2) uses name-based virtualhost settings to host multiple websites. I need to come up with some workaround for this.

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas