Currently have a cluster with a service created based on this cluster and load balancer / target group from creating it in the command prompt with aws ecs create-service
and when running the command to describe my scalable targets as aws describe-scalable-targets --resource-ids (fargate-service/default/fargate-clustr)
I receive an error syntax error, unexpected token '('
so I assume I am inputting wrong syntax for trying to describe the targets.
Tells me on the site linked below for service-auto-scaling specifying the resource ID of the ECS service associated with the scalable target in Application Auto Scaling
which I cannot find the resource ID for within my ECS service?
My scope is to create auto scaling for my tasks within my cluster.
Scalable-targets command I followed https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-auto-scaling.html#auto-scaling-IAM
Command for registering targets:
--service-namespace ecs \
--scalable-dimension ecs:service:DesiredCount \
--resrouce-id fargate-service/default/fargate-cluster \
--min-capacity 1 \
--max-capacity 10
CodePudding user response:
The correct command should be:
aws application-autoscaling describe-scalable-targets --resource-ids fargate-service/default/fargate-clustr --service-namespace ecs