EC2 Command-Line Tools 自分用まとめ(随時更新)

Amazon のサポートするイメージ一覧

% ec2-describe-images -o amazon


全イメージ一覧

% ec2-describe-images -x all


鍵の作成

% ec2-add-keypair <鍵名> | sed -e "1d" > <鍵ファイル名>


インスタンスの確認

% ec2-describe-instances


インスタンス起動

% ec2-run-instances <イメージID> -k <鍵名>


インスタンス停止

% ec2-terminate-instances <インスタンスID>


ポートの解放状況の確認

% ec2-describe-group


ポートの解放

% ec2-authorize <グループ名> -p <ポート番号>


ポートの解放中止

% ec2-revoke <グループ名> -p <ポート番号>


固定IPアドレスの確認

% ec2-describe-addresses


固定IPアドレスの確保

% ec2-allocate-address


固定IPアドレスの解放

% ec2-release-address 


固定IPアドレスの割当

% ec2-associate-address -i <インスタンスID> 


固定IPアドレスの割当解除

% ec2-disassociate-address