I'm seeing an error about `Your requested instance...
# ask-metaflow
w
I'm seeing an error about
Your requested instance type (g3.8xlarge) is not supported in your requested Availability Zone (us-east-1a). Please retry your request by not specifying an Availability Zone or choosing us-east-1b, us-east-1c, us-east-1d, us-east-1e.
. I don't understand why Batch is choosing
us-east-1a
even though my compute env has
us-east-1a
and
us-east-1b
subnets available. Is this like a bug in Batch? Does anyone have ideas?
1
f
From what I've noticed this is often safe to ignore and seems to be a quirk of AWS Batch and how it's compute environments provision EC2 autoscalers behind the scenes. When configuring the instance types for a Batch compute environment, you're allowed to specify instance types that may only be available in a subset of the availability zones you've specified. The Batch scheduler will keep the job in the queue while the autoscaler will attempt the other AZs over time to provision the requested resources Depending on how you have alerts/monitoring configured in your AWS account, you could see similar alerts like
Copy code
Your Autoscaling Group AWSBatch-... failed launching instances with the error: Launching a new EC2 instance.  Status Reason: Could not launch Spot Instances. InsufficientInstanceCapacity
Typically this will resolve itself as the autoscaler attempts to request the capacity from the other available AZs – personally I only check through these sorts of alerts if something is suspicious like jobs being stuck in the queues for a long time.
Of course if you're worried about these alerts, you could be more restrictive in how the Batch compute environments are configured and ensure it only includes EC2 instance families/types that are available across all specified AZs 🙂
As an example, with that
g3.8xlarge
instance type within the
us-east-1
region it's only available in availability zone ids 2,3,4,6 (equivalent to the names b, c, d, f) https://instances.vantage.sh/?selected=g3.8xlarge
w
where do you see the zone ids on that vantage website?
f
it's an optional column you can show
w
thanks for sharing, this is super useful!