5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

自分用EC2向けコマンドライン

Last updated at Posted at 2015-01-31

自分が良く使うものメモ

EC2インスタンスを作成する

$ ec2-run-instances {ami_id} -g {security_group} -k {keypair} -t {instance_type} -z {availability_zone} --instance-initiated-shutdown-behavior {behavior}

EC2インスタンスの状態確認

$ ec2-describe-instances {instance_id}

EC2インスタンスの停止

$ ec2-stop-instances {instance_id}

EC2インスタンスの削除

$ ec2-terminate-instances {instance_id}

EC2インスタンスのAMIを作成

$ TODO

ELBの作成

$ TODO

ELBにEC2インスタンスを紐付ける

$ elb-register-instances-with-lb {elb_name} --instances {instance_id}

ELBからEC2インスタンスの紐付けを外す

$ elb-deregister-instances-from-lb {elb_name} --instances {instance_id}

ELBに紐付いているEC2インスタンスの状態確認

$ elb-describe-instance-health {elb_name}

EIPの取得

$ ec2-allocate-address --region {region}

EIPをEC2インスタンスに割り当てる

$ ec2-associate-address -i {instance_id} {eip}

EC2インスタンスからEIPの割り当てを解除する

$ ec2-disassociate-address {eip}

EIPを解放する

$ec2-release-address {eip}

5
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?