LoginSignup
0
0

More than 3 years have passed since last update.

自分用メモ

Posted at

aws configureの読み込み

export AWS_CONFIG_FILE="ファイル"

instance ID 取得

INSID=`ssh サーバ 'curl http://169.254.169.254/latest/meta-data/instance-id/'`

再起動しないでAMIを取得して、結果をファイルに吐き出す

aws ec2 --region ap-northeast-1 \
 create-image --instance-id インスタンスID \
 --name AMIのタグName-$(date +%Y-%m-%d_%H%M%S) \
 --description 'created by '$(date +%Y-%m-%d_%H%M%S) \
 --no-reboot

作成したAMIのNameタグに名前入れる

aws ec2 create-tags --resources AMIID --tags Key=Name,Value=TAGにつける名前-$(date +%Y-%m-%d_%H%M%S)
0
0
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
0
0