Widgets

會留意到 EC2_URL 這個參數也是滿有趣的過程(只能說自己太晚跑來認真玩 CLI 了)。為了調整某個 backup (snapshot) shell script 而把腦筋動到「ec2-describe-volumes」上頭去。進而發現 region 怎麼跑都跑到美東去,即使有指定「 --region REGION 」參數到別的區也一樣。定神仔細看才發現原來是要 EC2_URL 參數。

將 EC2_URL 參數設定成東京機房的範例方式在 Unix/Unix-like 和 Windows 環境分別如下:

# Unix/Unix-like:
export EC2_URL=https://ec2.ap-northeast-1.amazonaws.com # 東京

# Windows:
set EC2_URL=https://ec2.ap-northeast-1.amazonaws.com # 東京


你可以使用「ec2-describe-regions」取得目前 AWS 最新各個 region 的清單與對應的 region name 與 EC2_URL 的值:(以下是於 2013/Mar 跑出來的清單)

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
REGION ap-southeast-2 ec2.ap-southeast-2.amazonaws.com


其它參考資料:

0 Comments:

Post a Comment

 
Top