EC2 instance Capacity 부족시 대응방안

2021-08-27

.

Data_Engineering_TIL(20210827)

  • 현상

EC2 인스턴스를 시작하거나 재시작할 때 InsufficientInstanceCapacity 에러가 발생하여 EC2가 실행되지 않는 현상

  • 대응방안

방안 1) 인스턴스 타입을 변경해서 재시작

방안 2) 약간의 시간을 두고 재시작

방안 3) 사전에 capacity를 예약

  • 인스턴스 시작전에 capa를 체크해볼 수 있는 AWS CLI 명령어
$ aws ec2 start-instances --instance-ids <인스턴스 아이디> --dry-run

capa가 충분해서 인스턴스 시작에 문제가 없을 경우 :

An error occurred (DryRunOperation) when calling the StartInstances operation : Request would have successed, but DryRun flag is set.

capa 부족일 경우 :

InsufficientInstanceCapacity 에러 발생

  • 참고자료

https://aws.amazon.com/ko/premiumsupport/knowledge-center/ec2-insufficient-capacity-errors