English 中文(简体)
设置 amazon 自动自动缩放命令行工具窗口
原标题:set up amazon auto scaling command line tools windows

我从此链接下载了 Amazon 自动缩放命令行工具的 zip 文件 :

http://aws.amazon.com/developmentertools/2535" rel=“nofollow'>http://aws.amazon.com/developtertools/2535

在打开了它之后, 将其重新命名为 AWS (C: AWS)

我安装了 java 并创建了一个蝙蝠文件, 按照以下(README 文件) 读我的指示 :

**Auto Scaling Command Line Tools

Installation:

  1. Ensure that JAVA version 1.5 or higher is installed on your system: (java -version)
  2. Unzip the deployment zip file
  3. Set the following environment variables: 3.1 AWS_AUTO_SCALING_HOME - The directory where the deployment files were copied to check with: Unix: ls ${AWS_AUTO_SCALING_HOME}/bin should list as-create-auto-scaling-group ...) Windows: dir "%AWS_AUTO_SCALING_HOME%in" should list as-create-auto-scaling-group ...) 3.2 JAVA_HOME - Java Installation home directory
  4. Add ${AWS_AUTO_SCALING_HOME}/bin (in Windows: "%AWS_AUTO_SCALING_HOME%in") to your path

    Configuration:

Provide the command line tool with your AWS user credentials. There are two ways you can provide credentails: AWS keys, or using X.509 certificates.

Using AWS Keys

  1. Create a credential file: The deployment includes a template file ${AWS_AUTO_SCALING_HOME}/credential-file-path.template. Edit a copy of this file to add your information. On UNIX, limit permissions to the owner of the credential file: $ chmod 600 .
  2. There are several ways to provide your credential information: a. Set the following environment variable: AWS_CREDENTIAL_FILE= b. Alternatively, provide the following option with every command --aws-credential-file c. Explicitly specify credentials on the command line: --I ACCESS_KEY --S SECRET_KEY

Using X.509 Certs

  1. Save your cetificate and private keys to files: e.g. my-cert.pem and my-pk.pem.
  2. There are two ways to provide the certificate information to the command line tool a. Set the following environment variables: EC2_CERT=/path/to/cert/file EC2_PRIVATE_KEY=/path/to/key/file b. Specify the files directly on command-line for every command --ec2-cert-file-path=/path/to/cert/file --ec2-private-key-file-path=/path/to/key/file

    Running:

  3. To check that your setup works properly, run the following command: $ as-cmd --help You should see the usage page for all Auto Scaling commands $ as-describe-auto-scaling-groups --headers You should see a header line. If you have auto scaling groups already configured, you will see a description line for each auto scaling group**

我的蝙蝠档案看起来像:

 REM Path should have binjava.exe under it
 set AWS_AUTO_SCALING_HOME="C:AWS"
 set JAVA_HOME="C:Program FilesJavajre7"
 set PATH="%PATH%";"%AWS_AUTO_SCALING_HOME%in"
 REM Path to Primary Key and Certificate retrieved from AWS 
 set EC2_PRIVATE_KEY="C:AWSpv_pk.pem"
 set EC2_CERT="C:AWScert-pk.pem"
 cls
 cmd

执行我的蝙蝠文件后, 我尝试执行它不被识别的命令 ec2_ descript_ group 。 我的蝙蝠文件有什么问题 。

问题回答

命令是“ec2-descript- group”而不是“ec2_descrip_ groups”,请见以下文件: