4
4

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 InstanceのTerminate時にEBSボリュームも削除するオプション

Last updated at Posted at 2013-05-29

EC2のインスタンスをTerminateする時、以下のように、

スクリーンショット 2013-05-29 20.03.10.png

「Delete on Termination」の値がfalseの設定になっていると、attachされていたEBSのボリュームはdeleteされずに「available」の状態になり削除されずに残ってしまいます。
このような状態を回避するには、ec2-run-instancesec2-request-spot-instancesコマンドの引数に bオプションを指定してあげるとTerminateと共にEBSも削除してくれるようになります。

$ ec2-run-instances -b "/dev/sda1=::true" (後のオプションは省略)

以上

4
4
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
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?