Spammy log with 404 errors in ECS Fargate with ALB

0

After creating the service and configuring load balancing, I am seeing weird GET requests that are super spammy (100+ per minute) resulting in 404 error. I initially thought this was from healthcheck but I am seeing successful healthcheck in the log with 200 response.

Other than this, my service is working normally. How do I track down what this is and how to get rid of it?

Log message I am seeing:

INFO: 172.31.79.147:58948 - "GET /predictions?filter[stop]=17096&sort=departure_time&api_key=<some_key> HTTP/1.1" 404 Not Found

dphntm
已提问 2 个月前248 查看次数
2 回答
0
已接受的回答

Hello.

How about enabling the "X-Forwarded-For" header in ALB and checking the global IP of the access source in the web server log?
If you can identify the global IP address of the access source, it may be a good idea to block it using AWS WAF and see what happens.
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/x-forwarded-headers.html#x-forwarded-for

I also think it would be a good idea to enable ALB access logs to determine attacks.
https://docs.aws.amazon.com/elasticloadbalancing/latest/application/enable-access-logging.html

If you can determine that it is an attack, please try setting up AWS WAF etc.
https://docs.aws.amazon.com/waf/latest/developerguide/getting-started.html

profile picture
专家
已回答 2 个月前
0

As its a Query in the URL request, then this will appear in the ALB logs. If you have not enabled ALB logging then enabling will help you locate the source of the request. Query the ALB logs with Athena https://docs.aws.amazon.com/athena/latest/ug/application-load-balancer-logs.html

The 404 is being returned by your Fargate service thats running. It cant find the page requested.

profile picture
专家
已回答 2 个月前
profile picture
专家
已审核 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则