Fix InvalidParameterValue: The instance type is not supported in this region (AWS EC2)

intermediateโ˜๏ธ AWS2026-03-17| AWS EC2, AWS CLI v2, Terraform, CloudFormation โ€” any region

Error Message

InvalidParameterValue: The instance type is not supported in this region
#aws#ec2#instance#region

TL;DR

You're trying to launch an EC2 instance type that doesn't exist in your target region. Check which instance types are actually available there, then either switch regions or pick a supported type.

# Quick check: list available instance types in your region
aws ec2 describe-instance-type-offerings \
  --location-type region \
  --filters Name=instance-type,Values=m6g.large \
  --region ap-southeast-1

# If the output is empty, that instance type is NOT available in that region

The Full Error

An error occurred (InvalidParameterValue) when calling the RunInstances operation:
The instance type 'm6g.large' is not supported in this region (us-gov-east-1)

You'll hit this when running aws ec2 run-instances, applying a Terraform plan, or deploying a CloudFormation stack. The instance type you specified simply doesn't exist in the selected AWS region.

Why This Happens

AWS doesn't roll out every instance type to every region simultaneously. Graviton-based types like m6g and c7g, GPU instances like p4d, and specialized types like inf1 โ€” these launch in major regions first. Some take months to reach GovCloud or China regions. Others never get there at all.

The usual culprits:

  • Copy-pasting an instance type from a blog post that tested in us-east-1, but you're deploying to ap-south-1 or GovCloud
  • Using a Graviton2/3 instance (m6g, c6g, r6g) in a region that hasn't received it yet
  • Selecting a new generation type in an older Terraform module without checking regional availability
  • Spot instance templates referencing types not available in a specific AZ

Fix 1: Find What's Actually Available in Your Region

Run this before anything else. It's the most reliable way to know what you're working with:

# List ALL instance types available in a specific region
aws ec2 describe-instance-type-offerings \
  --location-type region \
  --region ap-southeast-1 \
  --query 'InstanceTypeOfferings[].InstanceType' \
  --output text | tr '\t' '\n' | sort

# Filter by family (e.g., all m6g types)
aws ec2 describe-instance-type-offerings \
  --location-type region \
  --filters "Name=instance-type,Values=m6g.*" \
  --region eu-south-1 \
  --query 'InstanceTypeOfferings[].InstanceType' \
  --output table

Fix 2: Find Equivalent Instance Types in the Same Region

When the exact type isn't available, the previous generation is usually your best bet. Similar specs, broader regional support:

# You wanted m6g.large (Graviton2) but it's not available
# Fall back to m5.large (Intel, similar specs) or m6i.large

aws ec2 describe-instance-type-offerings \
  --location-type region \
  --filters "Name=instance-type,Values=m5.large,m5a.large,m6i.large" \
  --region YOUR_REGION \
  --query 'InstanceTypeOfferings[].InstanceType' \
  --output table

Quick reference for common fallbacks:

  • m6g.* not available โ†’ try m5.* or m5a.*
  • c6g.* not available โ†’ try c5.* or c5a.*
  • r6g.* not available โ†’ try r5.*
  • p4d.* not available โ†’ try p3.*

Fix 3: Check AZ-Level Availability (for Spot or Specific AZs)

Sometimes an instance type exists in the region but not in a specific Availability Zone. This trips up Spot Fleet configs:

# Check AZ-level availability
aws ec2 describe-instance-type-offerings \
  --location-type availability-zone \
  --filters "Name=instance-type,Values=c5.xlarge" \
  --region us-west-2 \
  --query 'InstanceTypeOfferings[].{Type:InstanceType,AZ:Location}' \
  --output table

Fix 4: Terraform or CloudFormation

For IaC, the right move is to make instance type a variable with sensible per-region defaults โ€” not a hardcoded value:

# terraform.tfvars โ€” override per region
instance_type = "m5.large"   # fallback for regions without m6g

# variables.tf
variable "instance_type" {
  description = "EC2 instance type (use m6g.* for Graviton regions)"
  default     = "m5.large"
}

For CloudFormation, use a mappings block:

Mappings:
  RegionInstanceTypeMap:
    us-east-1:
      InstanceType: m6g.large
    us-gov-east-1:
      InstanceType: m5.large
    ap-south-1:
      InstanceType: m5.large

Resources:
  MyInstance:
    Type: AWS::EC2::Instance
    Properties:
      InstanceType: !FindInMap [RegionInstanceTypeMap, !Ref AWS::Region, InstanceType]

Verification

Once you've switched to a supported type, launch the instance and confirm the state comes back as running:

# Launch and verify
aws ec2 run-instances \
  --image-id ami-0abcdef1234567890 \
  --instance-type m5.large \
  --count 1 \
  --region YOUR_REGION \
  --query 'Instances[0].{ID:InstanceId,State:State.Name,Type:InstanceType}' \
  --output table

# Check it's running
aws ec2 describe-instances \
  --instance-ids i-0123456789abcdef0 \
  --query 'Reservations[0].Instances[0].State.Name' \
  --output text
# Expected output: running

Stop It Before It Starts

Wire this check into your deploy pipeline and it'll catch the mismatch before AWS does:

#!/bin/bash
INSTANCE_TYPE="m6g.large"
REGION="ap-southeast-1"

AVAILABLE=$(aws ec2 describe-instance-type-offerings \
  --location-type region \
  --filters "Name=instance-type,Values=${INSTANCE_TYPE}" \
  --region "${REGION}" \
  --query 'length(InstanceTypeOfferings)' \
  --output text)

if [ "$AVAILABLE" -eq 0 ]; then
  echo "ERROR: ${INSTANCE_TYPE} is not available in ${REGION}"
  echo "Run: aws ec2 describe-instance-type-offerings --location-type region --region ${REGION}"
  exit 1
fi

echo "${INSTANCE_TYPE} is available in ${REGION}, proceeding..."

AWS Console Shortcut

Not a CLI person? Head to EC2 โ†’ Instance Types in the AWS Console. Make sure the region selector (top-right) is set correctly, then use the search and filter to see what's available. Each type shows a Current generation or Previous generation label โ€” useful for spotting fallback options at a glance.

Related Error Notes