How to use multiple AWS Accounts from the command line?

前端 未结 7 1654
故里飘歌
故里飘歌 2020-12-22 16:35

I\'ve got two different apps that I am hosting (well the second one is about to go up) on Amazon EC2.

How can I work with both accounts at the command line (Mac OS X

7条回答
  •  感动是毒
    2020-12-22 17:13

    You should be able to use the following command-options in lieu of the EC2_PRIVATE_KEY (and even EC2_CERT) environment variables:

    • -K
    • -C

    You can put these inside aliases, e.g.

    alias ec2-describe-instances1 ec2-describe-instances -K /path/to/key.pem
    

提交回复
热议问题