if anyone is interested in knowing this information will be helpful for you. its a very simple solution. the default user is not root but rather ec2-user thats what you need to do