EC2 Instance is stuck, can't ssh in and abnormal CPU & network utilisation

0

I have 2 very small applications running in docker containers on a t2micro instance. The CPU usage is minimal but since last month I experienced that the applications were not responding due the ec2 instance being stuck.

The Instance reachability check failed and I can't ssh in to the instance, it just hangs.

Shutting down & starting the instance solves the problem but the issue happens in the next 3-7 days.

Does anybody has any idea?

CPU -> https://imgur.com/YXiSeml

Network -> https://imgur.com/dSZZduU

preguntada hace 2 años1549 visualizaciones
2 Respuestas
0

You mention this is a t2.micro when you run into issues have you checked your CPU credit balance via the monitoring tab for the EC2 instance? This sounds like you are consuming credits faster than they are accruing. The graph you linked shows a spike in CPU utilization which more than likely accounts for the credits being consumed.

RoB
respondido hace 2 años
  • I checked the logs in cat /var/log/auth.log and everything points that its due an attack.

    • Continuously and several times per second there are authentication attempts from several locations. China, US, Singapur ... They don't apply to the use case of my application since the application does not expect requests from there
    • the requests try to authenticate with default usernames like "test", "root", "ubuntu", "oracle", "postgres", "ansible" It seems the attack comes in a DoS shape ... Currently my instance is publicly reachable, What would you recommend?
0

How about fail2ban to prevent login attempts?

AWS
Yuxiang
respondido hace 2 años

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