I found out littlechef from Grig’s post. Thanks to both Grig and to Miguel for the tool and good writeup.
I added some lines to work with the new feature of littlechef about the SSH keypair. Now I can login to my Ubuntu Amazon EC2 instances by specifying the keypair-path on the auth.conf:
user = ubuntu
keypair-file = /home/cocoy/.ssh/id-rsa.pub
Hope that works well for others. The gist is shown below: