1. Target Group 생성
Update : 2024-01-06
Last updated
Update : 2024-01-06
Last updated
VPC Lattice 를 구성하기 위한, Step 1. Target Group 을 수행합니다.
01.사전 준비 및 소개 단계에서 배포한 VPC의 자원들을 VPC Lattice의 Target Group으로 생성합니다.
아래 3개의 자원들이 Target이 됩니다.
VPC Reservation - Lambda
VPC Rate - EC2
VPC Payments - ALB
먼저 Lambda가 배포되어 있는 VPC Reservation의 자원을 Target Group으로 등록합니다.
"VPC"- "VPC Lattice" 메뉴에서 Target groups 를 선택하고, "Create target group"을 선택합니다.
Lambda 를 Target Group으로 등록해야 하므로 , target type은 "Lambda function"을 선택합니다.
Target group name은 식별을 용이하게 하기 위해 "reservation-tg" 라고 입력합니다.
Choose a target type : Lambda function
Target group name : reservation-tg
이제 Target을 구성합니다.
"Lambda function" 을 선택하면, 이미 1개의 Lambda function이 선택되어 있는 것을 확인해 볼 수 있습니다. "LatticeReservationLambda"를 선택하고, "Create target group"을 선택합니다.
Lambda function - LatticeReservationLambda
정상적으로 등록이 완료되면 아래와 같은 화면이 출력됩니다.
EC2가 배포되어 있는 VPC Rate의 자원을 Target Group으로 등록합니다.
"VPC"- "VPC Lattice" 메뉴에서 Target groups 를 선택하고, "Create target group"을 선택합니다.
EC2를 Targate Group으로 등록해야 하므로, target type은 "Instance"를 선택합니다.
Target group Name은 식별을 용이하게 하기 위해 "rates-tg" 라고 입력합니다.
아래 속성값을 추가로 입력합니다.
Choose a target type - instances
Target group name - rates-tg
Protocol : Port - HTTP / 4242
VPC - LatticeWorkshop Rates VPC
Protocol version - HTTP1
Health Check 관련 값들을 입력합니다.
이제 Target을 구성합니다.
아래 그림과 같이 인스턴스를 선택 구성하고, "Create target group"을 선택합니다.
Instance Name : LatticeWorkshop Rates
AutoScaleGroup 에 등록한 EC2를 VPC Lattice 에 연결해 주는 작업이 필요합니다.
"EC2" - "Auto Scaling Groups" 로 이동하고, "xxxxRatesASG-xxx" 라는 이름의 Auto Scale Group을 선택합니다.
화면 하단의 "VPC Lattice integration options" 에서 "Edit"를 선택ㅎ합니다.
Auto Scaling groups Name - xxxx-RatesASG-xxxx
Detail - VPC Lattice integration options - Edit 선택
VPC Lattice integration options 에서 "Attach to VPC Lattice service"를 선택하고, "Choose VPC Lattice target group" 항목에서 앞서 등록한 "rate-tg"를 선택합니다.
이제 Update를 선택합니다.
Select VPC Lattice service to attach - Attach to VPC Lattice service
Choose VPC Lattice target group - rates-tg
Update 선택
Step1. Specify group deatils 구성하기
ALB가 배포되어 있는 VPC Payments 의 자원을 Target Group으로 등록합니다.
"VPC"-"VPC Lattice" 메뉴에서 Target groups를 선택하고, "Creat target group"을 선택합니다.
ALB를 Target Group으로 등록해야 하므로, target type은 "Application Load Balancer"를 선택합니다.
Target group Name은 식별을 용이하게 하기 위해 "payments-tg"라고 입력합니다.
아래 속성값을 추가로 입력합니다.
Choose a target group - Application Load Balancer
Target group name - payments-tg
Protocol:Port - HTTP / 80
VPC - LatticeWorkshop Payments VPC
Protocol version - HTTP1
Next 선택
Step2. Register Targets
이제 Target 을 구성합니다.
아래 그림과 같이 ALB를 선택 구성합니다. 이미 배포되어 만들어진 ALB를 선택합니다.
Default to target group port:80 을 선택하고, Create Target Group을 선택합니다.
Register Application Load Balancer - Register now
Application Load Balancer - lattice-Paymexxxx-xxxx
Port - Defalt to target group port:80
"VPC" - "Lattice Target Group"에서 아래와 같이 정상적으로 생성되었는지 확인합니다.