Help us understand the problem. What is going on with this article?

ecsのクラスタがFargate Spotで100%実行する設定

Fargateは非常に便利

だけど開発や試験的に使うだけなら、70%OFFの料金のFargate Spotでお安く使いたい。クラスタの設定を必ずFargate Spotで実行する設定の仕方は以下です。

cluster名がseleniumの場合

$ aws ecs put-cluster-capacity-providers --cluster selenium --capacity-providers FARGATE_SPOT FARGATE --default-capacity-provider-strategy capacityProvider=FARGATE_SPOT,weight=1,base=1

以下のコマンドで確認する
defaultCapacityProviderStrategyが追加されたらOK

$ aws ecs describe-clusters --clusters selenium
{
    "clusters": [
        {
            "clusterArn": "arn:aws:ecs:ap-northeast-1:999999999999:cluster/selenium",
            "clusterName": "selenium",
            "status": "ACTIVE",
            "registeredContainerInstancesCount": 0,
            "runningTasksCount": 0,
            "pendingTasksCount": 0,
            "activeServicesCount": 0,
            "statistics": [],
            "tags": [],
            "settings": [
                {
                    "name": "containerInsights",
                    "value": "disabled"
                }
            ],
            "capacityProviders": [
                "FARGATE_SPOT",
                "FARGATE"
            ],
            "defaultCapacityProviderStrategy": [
                {
                    "capacityProvider": "FARGATE_SPOT",
                    "weight": 1,
                    "base": 1
                }
            ]
        }
    ],
    "failures": []
}

ken992
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした