create a new Lightsail instance or EC2 instance From the AWS Management Console.
Once you create it, download the associated .pem file. you can be downloaded the default SSH key from your account page. we need to move it to the ~/.ssh directory. You can do so by executing
mv ~/Downloads/pemfile.pem ~/.ssh/pemfile.pem