📜  aws ecs fargate 服务计划扩展 - 任何代码示例

📅  最后修改于: 2022-03-11 14:57:12.134000             🧑  作者: Mango

代码示例1
$ export SCALE_OUT_ACTION_NAME=fargate-time-based-scale-out

# configure scaling out
$ aws application-autoscaling put-scheduled-action --service-namespace ecs \
    --scalable-dimension ecs:service:DesiredCount \
    --resource-id service/${ECS_CLUSTER_NAME}/${ECS_SERVICE_NAME} \
    --scheduled-action-name ${SCALE_OUT_ACTION_NAME} \
    --schedule "cron(50 23 * * ? *)" \ # every day at 8:50am JST
    --scalable-target-action MinCapacity=3,MaxCapacity=10