Continuously getting locked out from EC2 instance. No supported authentication methods available
Although i have not found out what leads to this. But i am finally able to login into my instance by following these steps:
1. As you are logged in create a user in the instance and give it a password.

$ adduser user1
$ passwd user1


2. Enable password authentication in /etc/sshd_config file.
3. Login with the new user.

Interestingly, this user does not gets locked out as the centos user.