[cs615asa] Question about HW5
Jan Schaumann
jschauma at stevens.edu
Wed Apr 15 14:10:05 EDT 2015
Pengfei Zhang <pzhang11 at stevens.edu> wrote:
> When we create a temp instance, we need a key pair name and security group
> name. Should we hardcode it or read it from config file?
As per the previous discussions around this on this list: you do not
need to specify a key pair or a security group either in your code nor
in a configuration file. AWS will fall back to default values if you do
not specify these -- it is up to the user of your tool to either have
default values that work for them, or to specify the right options via
the environment variables specified in the manual page.
So:
- no options specified, ec2-backup will not provide any hardcoded
options and just use whatever aws defaults to:
ec2-backup .
- the user wishes to use the security group 'foo' and the keypair named
'bar'
export EC2_BACKUP_FLAGS_AWS="--security-groups foo --key-name bar'
ec2-backup .
- the user wishes to use the default security group and the keypair
'foo', and she needs to tell ssh(1) that the private key is found in
~/.ssh/privkey:
export EC2_BACKUP_FLAGS_AWS="--key-name foo"
export EC2_BACKUP_FLAGS_SSH="-i ~/.ssh/privkey"
ec2-backup .
I hope this clarifies this issue.
-Jan
More information about the cs615asa
mailing list