I am setting my first test instance. I have my own AMI that I have prepared for this. It is based on an ubuntu AMI.
The issue is that ubuntu AMI's default user isn't ec2-user but ubuntu. It seems that the agent uses ec2-user rather than ubuntu and I don't see anywhere I can specify which user to use.
I tried to connect to the instance with ssh and with ubuntu it works but not with ec2-user.