LoginSignup
0
0

More than 3 years have passed since last update.

aws-cliを使って「キャパシタープロバイダー」にある「FARGATE」を見えなくする

Last updated at Posted at 2020-10-21

FARGATE_SPOT 100%で動かしたいときによくあるコマンドでやると、使わないFARGATEが残ってて気持ち悪い、という人向け(要するに自分用メモ)

注意: ドキュメント曰くこれはaws-cli 1.xのやり方らしいです。現状2.0でのやり方が見当たらなかったので書いてますが、別のより良いやり方が存在する可能性があることを念頭において使用してください。

やり方

aws-cliで↓みたいな感じでput-cluster-capacity-providersを叩く。

aws ecs put-cluster-capacity-providers \
     --cluster {{ ClusterName }} \
     --capacity-providers FARGATE_SPOT \  # ここを残したいやつにする
     --default-capacity-provider-strategy capacityProvider=FARGATE,weight=1,base=1  # ここはお好みで

--capaity-providersのところに書いたやつがAWSコンソールに表示されるようになるので、そこに「FARGATE」を入れなければよい。その他FARGATE_SPOT以外に残したいやつがあればそこに書く。

補足

タイトルがなぜ「見えなくする」なのか?

delete-capacity-providerのドキュメントを見るとこう書かれているため。たぶん内部的には存在しているけど、表示上見えなくなっていればいいやの気持ち。

Note
The FARGATE and FARGATE_SPOT capacity providers are reserved and cannot be deleted. You can disassociate them from a cluster using either the PutClusterCapacityProviders API or by deleting the cluster
https://docs.aws.amazon.com/cli/latest/reference/ecs/delete-capacity-provider.html

参考

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