[cs615asa] Setting a Default Key Pair for creating instances

Jan Schaumann jschauma at stevens.edu
Tue Mar 18 11:33:54 EDT 2014


Daniel Schuler <dschuler at stevens.edu> wrote:
> I have tried that approach - creating a keypair named 'default' - but when I
> try executing the 'aws ec2 run-instances' command without specifying any
> keypair, the 'default' keypair is NOT applied.

It's quite possible that this used to be the case a few years ago, and
now one needs to specify a keypair by name.

You then want to make use of the EC2_BACKUP_FLAGS_AWS environment
variable:

$ export EC2_BACKUP_FLAGS_AWS="--key-name mykeypairname"
$ ./ec2-backup .

Your program can then either pass the flags directly to any aws(1)
invocations or extract the right paramenters for any API calls you might
make from this variable.

-Jan


More information about the cs615asa mailing list