1.download amazon api tool , office doc in here
2.install java.
you can search and download and install java in web.here will not say it.
3.set run environment:
win.bat
setx JAVA_HOME "E:\Program Files\Java"
setx Path %JAVA_HOME%\bin;"%Path%"
setx EC2_HOME "E:\develop\ec2-api-tools"
setx Path "%PATH%";%EC2_HOME%\bin
setx AWS_ACCESS_KEY your apkey
setx AWS_SECRET_KEY your seckey
above, E:\Program Files\Java is my java install folder. e:\develop\ec2-api-tools is my amazon tool unzip folder.
and Shortcuts:
4.test it
E:\develop\ec2-api-tools>setx AWS_SECRET_KEY XjpNw7SpqBN9yeJOz2pzjB9u86uoNhOi+L
7APwS
成功: 指定的值已得到保存。
E:\develop\ec2-api-tools>bin\ec2-describe-regions
REGION eu-west-1 ec2.eu-west-1.amazonaws.com
REGION sa-east-1 ec2.sa-east-1.amazonaws.com
REGION us-east-1 ec2.us-east-1.amazonaws.com
REGION ap-northeast-1 ec2.ap-northeast-1.amazonaws.com
REGION us-west-2 ec2.us-west-2.amazonaws.com
REGION us-west-1 ec2.us-west-1.amazonaws.com
REGION ap-southeast-1 ec2.ap-southeast-1.amazonaws.com
Note:
If you get an error that required option -O is missing, check the setting of AWS_ACCESS_KEY, fix any errors, and try the command again.
If you get an error that required option -W is missing, check the setting of AWS_SECRET_KEY, fix any errors, and try the command again.
If you get an error that required option -C is missing, check the setting of EC2_CERT, fix any errors, and try the command again.
If you get an error that required option -K is missing, check the setting of EC2_PRIVATE_KEY, fix any errors, and try the command again.
after that,if i want used us-east-1 endpoint:
E:\develop\ec2-api-tools>setx EC2_URL https://ec2.us-east-1.amazonaws.com
No comments:
Post a Comment