How do I edit my AWS ASG scheduled action useing the aws CLI my scheduled action is called training
my ASG is called temp_4_jenkins as I was planning to set up a pipeline on a Jenkins on my personal account to run the CLI commands.
aws application-autoscaling put-scheduled-action --service-namespace ec2 \
  --scalable-dimension ec2:instance:1 \
  --resource-id instance/t2.micro \
  --scheduled-action-name training \
  --schedule &quot;cron(10 9 * * *)&quot; \
  --scalable-target-action MinCapacity=0,MaxCapacity=0

I get back the error
An error occurred (ValidationException) when calling the PutScheduledAction operation: 1 validation error detected: Value 'ec2:instance:1' at 'scalableDimension' failed to satisfy constraint: Member must satisfy enum value set: [cassandra:table:ReadCapacityUnits, dynamodb:table:ReadCapacityUnits, dynamodb:index:ReadCapacityUnits, rds:cluster:ReadReplicaCount, comprehend:document-classifier-endpoint:DesiredInferenceUnits, elasticmapreduce:instancefleet:SpotCapacity, lambda:function:ProvisionedConcurrency, comprehend:entity-recognizer-endpoint:DesiredInferenceUnits, appstream:fleet:DesiredCapacity, dynamodb:index:WriteCapacityUnits, elasticmapreduce:instancefleet:OnDemandCapacity, rds:cluster:Capacity, cassandra:table:WriteCapacityUnits, dynamodb:table:WriteCapacityUnits, elasticache:replication-group:Shards, custom-resource:ResourceType:Property, sagemaker:variant:DesiredInstanceCount, kafka:broker-storage:VolumeSize, ec2:spot-fleet-request:TargetCapacity, elasticache:replication-group:Replicas, elasticmapreduce:instancegroup:InstanceCount, ecs:service:DesiredCount]
I found the command in the docs
https://docs.aws.amazon.com/autoscaling/application/userguide/application-auto-scaling-scheduled-scaling.html
Then tried to modify it to ec2s instances?
I might be missing something obvious but why is the error talking about RDS and fleets I want to edit the schedule on my auto-scaling group to change the number of ec2s that get spun up?
I just solved it using put-scheduled-update-group-action
aws autoscaling put-scheduled-update-group-action --auto-scaling-group-name temp_4_jenkins --scheduled-action-name training --start-time 2020-11-23T09:10:00Z --min-size 0 --max-size 0 --desired-capacity 0 --region eu-west-1 --output json