I tried setting an elastic IP by doing:
ec2-allocate-address
however, it gives me an error:
Required option '-K, --private-key KEY' missing (-h for usage)
why is this?
I tried setting an elastic IP by doing:
ec2-allocate-address
however, it gives me an error:
Required option '-K, --private-key KEY' missing (-h for usage)
why is this?
Most of the AWS console tools require the use of a private key and a certificate (a few (e.g. those relating to S3) require you access keys.
Under your account on AWS, there is a page entitled 'Security Credentials' - on this page you can create (or upload) a new certificate or download an existing certificate. After the certificate has been created, you can no longer access your private key - you must therefore, save it when it is created for you.
For ec2-allocate-address
(and most AWS tools) you can either set two environment variables containing the path your certificate and private key or you can pass the paths directly as part of the command line.
If you will be using the tool more than once or using multiple tools, it is easier to set the environment variables:
export EC2_PRIVATE_KEY=/path/to/pk-XXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem
export EC2_CERT=/path/to/cert-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.pem
There are a number of common options for the AWS tools that you can find in the AWS Docs
I believe you should already have the private key certificate. The key is associated with the security group that your node belongs to. I personally use the key by registering it into my Tunnelier SSH client, for acquiring SSH connectivity to my nodes.
In other words, you don't need to issue yourself a new certificate because the certificate already exists. You need to just export it to a file and include it within your command line query.
You can get the X.509 key at this URL: https://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key