인스턴스 배포 실습
VPC 대시보드
-> VPC 마법사 시작
클릭
![스크린샷 2021-06-16 오후 10 45 03](https://user-images.githubusercontent.com/76810787/122235177-71b79500-cef8-11eb-8ca0-624b9e33ac46.png)
단일 퍼블릭 서브넷이 있는 VPC
-> 선택
클릭
![스크린샷 2021-06-16 오후 10 45 23](https://user-images.githubusercontent.com/76810787/122235180-72e8c200-cef8-11eb-88e1-a37c054f3c46.png)
차례대로 입력
1 |
|
![스크린샷 2021-06-16 오후 10 46 17](https://user-images.githubusercontent.com/76810787/122235188-754b1c00-cef8-11eb-8947-221943ed2b74.png)
EC2 대시보드
-> 인스턴스 시작
![스크린샷 2021-06-16 오후 10 47 28](https://user-images.githubusercontent.com/76810787/122235190-75e3b280-cef8-11eb-80fd-2cfba5d37256.png)
AMI 선택
AMI 리눅스2 선택
클릭
![스크린샷 2021-06-16 오후 10 47 42](https://user-images.githubusercontent.com/76810787/122235191-767c4900-cef8-11eb-8067-d0cb6421893d.png)
인스턴스 유형 선택
기본 값으로 둔 후, 다음: 인스턴스 세부 정보 구성
클릭
![스크린샷 2021-06-16 오후 10 47 51](https://user-images.githubusercontent.com/76810787/122235195-7714df80-cef8-11eb-9d34-368dbcadd301.png)
인스턴스 세부 구성
인스턴스 개수 : 1
1 |
|
![스크린샷 2021-06-16 오후 10 48 17](https://user-images.githubusercontent.com/76810787/122235198-77ad7600-cef8-11eb-88ff-c089d5192009.png)
하단에 고급 세부 정보에서 사용자 데이터
차례대로 입력
1 |
|
![스크린샷 2021-06-16 오후 10 48 39](https://user-images.githubusercontent.com/76810787/122235201-78460c80-cef8-11eb-95b5-6a65b744623a.png)
다음 스토리지 추가
클릭
![스크린샷 2021-06-16 오후 10 48 47](https://user-images.githubusercontent.com/76810787/122235204-78460c80-cef8-11eb-8b11-521b852b46bc.png)
스토리지 추가 선택
기본값으로 두고, 다음: 태그추가
클릭
![스크린샷 2021-06-16 오후 10 48 55](https://user-images.githubusercontent.com/76810787/122235207-78dea300-cef8-11eb-8ce8-0a2780a45a22.png)
태그 추가
키 : Name
, 값 : WebSrv
입력 후 다음: 보안 그룹 구성
클릭
![스크린샷 2021-06-16 오후 10 49 23](https://user-images.githubusercontent.com/76810787/122235208-79773980-cef8-11eb-88b3-0b2d49ee3409.png)
보안 그룹 구성
보안그룹 이름 : SecondVPC-NewSG
설명 : “HTTP
규칙 추가 후 검토 및 시작
클릭
![스크린샷 2021-06-16 오후 10 50 00](https://user-images.githubusercontent.com/76810787/122235212-79773980-cef8-11eb-886c-ff1d00f45540.png)
시작하기
클릭
![스크린샷 2021-06-16 오후 10 50 12](https://user-images.githubusercontent.com/76810787/122235214-7a0fd000-cef8-11eb-9333-53501d15efb2.png)
키페어 선택
기존 키 페어 선택 후, 체크 박스 체크 -> 인스턴스 시작
클릭
인스턴스 퍼블릭 IP 주소 활성화 확인
![스크린샷 2021-06-16 오후 11 31 59](https://user-images.githubusercontent.com/76810787/122242704-826b0980-cefe-11eb-9291-e407a207ac4b.png)
우클릭 후에 연결
클릭 후
![스크린샷 2021-06-16 오후 11 32 41](https://user-images.githubusercontent.com/76810787/122242716-8565fa00-cefe-11eb-97a7-64b2a0fdfc73.png)
차례대로 입력하면 접속 완료
1 |
|
키가 저장된 폴더에 올릴 사진 옮겨 놓기
1 |
|
1 |
|
CloudWatch 경보 생성
CloudWatch
검색 -> 경보
클릭 -> 경보 생성
클릭
![스크린샷 2021-06-16 오후 11 43 15](https://user-images.githubusercontent.com/76810787/122242735-88f98100-cefe-11eb-9050-a53211f2e2c0.png)
지표 선택
클릭
![스크린샷 2021-06-16 오후 11 43 22](https://user-images.githubusercontent.com/76810787/122242739-88f98100-cefe-11eb-8c47-caf956a5de8b.png)
EC2
클릭
![스크린샷 2021-06-16 오후 11 43 28](https://user-images.githubusercontent.com/76810787/122242742-89921780-cefe-11eb-8595-59a1b32727a9.png)
인스턴스별 지표
선택
![스크린샷 2021-06-16 오후 11 43 40](https://user-images.githubusercontent.com/76810787/122242745-8a2aae00-cefe-11eb-8af1-de68b1a22704.png)
CPUUtilization 검색 후, 인스턴스 이름 확인 후에 체크박스 체크 !지표 선택
클릭
![스크린샷 2021-06-16 오후 11 44 25](https://user-images.githubusercontent.com/76810787/122242750-8ac34480-cefe-11eb-813b-b9fccf77cc68.png)
기간 1분
선택
![스크린샷 2021-06-16 오후 11 44 57](https://user-images.githubusercontent.com/76810787/122242756-8b5bdb00-cefe-11eb-8163-6b6cde08afe4.png)
조건 에서 차례대로 설정 -> 다음
클릭
1 |
|
![스크린샷 2021-06-16 오후 11 46 20](https://user-images.githubusercontent.com/76810787/122242758-8b5bdb00-cefe-11eb-8e2e-c50bbb961756.png)
차례대로 설정 -> 주제 생성
클릭
1 |
|
![스크린샷 2021-06-16 오후 11 48 06](https://user-images.githubusercontent.com/76810787/122242767-8c8d0800-cefe-11eb-837d-1d6ad03236a5.png)
개인 이메일함
에 가서 Confirm subscription
클릭
![스크린샷 2021-06-16 오후 11 48 49](https://user-images.githubusercontent.com/76810787/122242771-8d259e80-cefe-11eb-9c81-05d50f0c4865.png)
EC2 작업 추가
클릭 -> 경보 상태
선택 -> 이 인스턴스 재부팅
선택 -> 다음
클릭
![스크린샷 2021-06-16 오후 11 46 50](https://user-images.githubusercontent.com/76810787/122242761-8bf47180-cefe-11eb-88d8-e9474f6fc81d.png)
경보 이름 : WebSrv-CPU-High-Alarm다음
클릭
![스크린샷 2021-06-16 오후 11 49 45](https://user-images.githubusercontent.com/76810787/122242777-8dbe3500-cefe-11eb-982c-efadfd4bf8b1.png)
맨 하단에 경보 생성
클릭
![스크린샷 2021-06-16 오후 11 49 55](https://user-images.githubusercontent.com/76810787/122242782-8e56cb80-cefe-11eb-8680-1fc2ddab669d.png)
생성 완료 !
![스크린샷 2021-06-16 오후 11 50 18](https://user-images.githubusercontent.com/76810787/122242785-8e56cb80-cefe-11eb-89aa-c7d5fa44b108.png)
1분 간격 모니터링 설정
추가 비용 발생EC2
-> 인스턴스
누른 후 하단에 모니터링
클릭 -> 세부 모니터링
클릭
![스크린샷 2021-06-16 오후 11 51 17](https://user-images.githubusercontent.com/76810787/122242789-8eef6200-cefe-11eb-92c5-998855770a0e.png)
활성화
클릭 -> 저장
클릭
![스크린샷 2021-06-16 오후 11 51 25](https://user-images.githubusercontent.com/76810787/122242790-8f87f880-cefe-11eb-816b-b802a1d13b57.png)
CPU 부하 툴 설치
1 |
|
CPU 사용량이 임계값 50이 넘으면 알람 메일이 온다
과제 실습
리눅스 cli 창에 차례대로 입력
1 |
|
![스크린샷 2021-06-16 오후 9 28 56](https://user-images.githubusercontent.com/76810787/122252468-55baf000-cf06-11eb-8a2b-34766d9c393b.png)
과제 성공 !
![스크린샷 2021-06-16 오후 9 23 43 복사본](https://user-images.githubusercontent.com/76810787/122253191-e85b8f00-cf06-11eb-8b69-1eef15acaf1d.png)
실습 완료 후 인스턴스 종료 -> CloudWatch 경보 클릭 -> 작업 -> 삭제
참고 자료 : AFOS[2기] 노션 내용