Amazon – run ec2-authorize? Locally or on the AMI VM

amazonamazon ec2

To open port 80 on my Amazon AMI VM, I need to do "ec2-authorize
default -p 80". Should I do this on my home machine or on the VM
itself?

Since running ec2-authorize requires a private key, I'm guessing I run
it on my home machine for security. I'm confused because ec2-authorize
comes preinstalled on my VM (it's in ec2-user's path, but not root's),
and that's the one place I shouldn't use it? Or is this for those
cases where one VM controls others?

Best Answer

Do it from the VM. You have to download a private key and certificate from the Amazon page and copy it somewhere in your VM, and use those to do ec2-authorize.

To download, you can go to the Amazon console and click the upper right dropdown where it says your name. You will find there something like "security settings" or something, click that. Go to the X.509 tab and click create new certificate.