Locked out of Amzon EC2 Ubuntu instance

First, I would try manually rebooting the instance from the AWS Management console. If that doesn't do it, you'll need to shut down the instance (but save the EBS volume first by taking a snapshot if you have it set to delete on instance termination). You can then start a new instance and attach the volume to it recover your data.