-
[ERROR] failed to create:[AWSEBInstanceLaunchWaitCondition]Cloud/AWS 2023. 5. 24. 01:18
배경
- public subnet 에 NAT Instance 를 사용하여 인터넷 연결을 할 수 있도록 구축했다
- private subnet 에 beanstalk 환경을 구축하였으나 실패했다 (pending -> Info)
INFO Environment health has transitioned from Info to No Data. Initialization completed 23 seconds ago and took 19 minutes. None of the instances are sending data. INFO Rebuilt environment: Citron-app-env. However, there were issues during launch. See event log for details. ERROR Stack named 'awseb-e-gahb2apkpm-stack' aborted operation. Current state: 'CREATE_FAILED' Reason: The following resource(s) failed to create: [AWSEBInstanceLaunchWaitCondition]. ERROR The EC2 instances failed to communicate with AWS Elastic Beanstalk, either because of configuration problems with the VPC or a failed EC2 instance. Check your VPC configuration and try launching the environment again.
전개
- 추측1) 네트워크 연결이 안됨
- beanstalk 인스턴스는 정상적으로 동작했고 ping 결과 정상 수신되었다
- 추측2) 인스턴스 메모리 문제
- 인스턴스 유형을 변경했으나 pending이 조회되었다(t2.small)
- 추측3) NAT Instance의 문제
- public subnet 에서 beanstalk 환경 구축에 성공하였다
- NAT Instance에 문제가 있다고 판단하여 아웃바운드 규칙을 모든 트래픽 허용으로 변경했다
- 환경 구축에 성공했다
원인
- 기존의 NAT Instance 아웃바운드 보안규칙은 다음과 같다
- private 서브넷의 IP 대역에 대해 ”SSH” 유형을 허용
- 모든 “ICMP" 유형을 0.0.0.0/0으로 허용
- ICMP는 네트워크 상태 확인 및 제어 메세지 전송에 사용되는 프로토콜일 뿐 데이터를 전송하지 않는다
해결
실제 데이터를 전송하는 TCP/UDP 프로토콜 규칙을 추가하였다
참고
-
'Cloud > AWS' 카테고리의 다른 글
[AWS] CLI (0) 2023.05.22 [AWS] NAT gateway 대신 NAT Instance 생성하기 (with Bastionhost) (0) 2023.05.22 [AWS] CI/CD (0) 2023.05.18 [AWS] S3 (0) 2023.05.18 [AWS] IAM (0) 2023.05.18