AWS

AWS EC2 Instance Type 지원되는 가용영역 찾기

DevelopC 2022. 9. 19. 13:09
728x90

AWS EC2 Instance Type 지원되는 가용영역 찾기

AWS EC2 Instace Type에 따라 사용할 수 있는 리전 및 가용영역 다르므로, awscli를 통해서 확인할 수 있습니다.

$ aws ec2 describe-instance-type-offerings \
    --location-type availability-zone \
    --filters Name=instance-type,Values=t3a.large \
    --region ap-northeast-2 --output table
------------------------------------------------------------
|               DescribeInstanceTypeOfferings              |
+----------------------------------------------------------+
||                  InstanceTypeOfferings                 ||
|+--------------+-------------------+---------------------+|
|| InstanceType |     Location      |    LocationType     ||
|+--------------+-------------------+---------------------+|
||  t3a.large   |  ap-northeast-2a  |  availability-zone  ||
||  t3a.large   |  ap-northeast-2c  |  availability-zone  ||
|+--------------+-------------------+---------------------+|

script

매번 위의 명령어를 instance type과 region을 변경해서 사용하기 귀찮으니 아래의 script를 만들어서 확인할 수 있습니다.

#!/bin/bash

REGION=$1
INSTANCE_TYPE=$2

aws ec2 describe-instance-type-offerings \
  --location-type availability-zone \
  --filters Name=instance-type,Values=${INSTANCE_TYPE} \
  --region ${REGION} --output table
728x90