The simplest way to obtain a virtual machine image that works is to download one that someone else has already created. Most of the images contain the cloud-init package to support the SSH key pair and user data injection. Because many of the images disable SSH password authentication by default, boot the image with an injected key pair. You can SSH into the instance with the private key and default login account.