Unable to bootstrap aws instances with Identity file

I am trying to bootstrap AWS RHEL instance using the pem key file as well as with ppk file. I am running the following command to bootstrap.

knife bootstrap ip_address -x ec2-user -i “path to pem file” -N “node_name” -r “recipe[java]” --sudo

It is prompting me to enter the password as the authentication got failed. I am trying this from windows machine as I don’t have the password I just went with return key and it got failed.

I have logged into the instance using the putty and asssigned password for ec2-user and provided the password. But it didn’t worked for me.

Any help is appreciated.

Are you able to login successfully using the same key using putty?

Also, please check whether you have given proper permissions to your .pem
file