brunch

You can make anything
by writing

C.S.Lewis

by Master Seo Nov 18. 2020

 8탄-VPC피어링-EP-EPS

서로 다른 AWS Account ID 간   private link 연결해보자

Endpoint ,   Endpoint Service를    private link라고 한다.


Endpoint ,   Endpoint Service를 알아보자

VPC Peering을 알아보자

Transit Gateway 설정법을 알아보자

리전 간 Transit Gateway 연동 법을 알아보자


// 개인 AWS Account ID 4개로 테스트한다.


seoul VPC(my) ----------(vpc peering)--------us endpoint(my)-----------us endpoint service(타사)


결론

된다.

seoul VPC(my)에서 us endpoint(my)-까지 되며, us endpoint service(타사)의 LB를 타고 서버 응답까지 온다.

피어링은 바로 직접 연결된 곳 까지만 된다.  단,   Endpoint는 넘겨 준다.!! 그래서 된다.




<1>  VPC Peering , Endpoint ,   Endpoint Service  구성

<2>  us endpoint(my)-----------us endpoint service(타사)

<3>  us endpoint service(타사)에서  Endpoint service 작업

<4>  us endpoint(my)에서  Endpoint  작업

<5>  seoul VPC와 VPC Peering 작업

<6>  seoul VPC(my)에서 curl로 엔드포인트 확인하기

<7> 모니터링 시스템인 데이터독 연동법



<1>  VPC Peering , Endpoint ,   Endpoint Service  구성


seoul VPC(my) ----------(vpc peering)--------us endpoint(my)-----------us endpoint service(타사)

172.16.0.0/16                                                        10.0.0.0/16                    20.0.0.0/16


// 나중에 us endpoint my  는 192.168.100.0/24 로 한다.


2

외부에 있는 서비스와 연동은 vpc peering 사용한다.


https://www.dynatrace.com/support/help/technology-support/cloud-platforms/amazon-web-services/configuration/connect-to-dynatrace-using-aws-privatelink/#vpcs-in-different-aws-regions


3

vpc peering endpoint 

https://docs.aws.amazon.com/ko_kr/vpc/latest/userguide/vpc-inter-region-peering-consumer-side.html







<2>  us endpoint(my)-----------us endpoint service(타사)


 us endpoint(my)-----------us endpoint service(타사)


ohio에서 작업한다.

AWS Account ID가 서로 틀리므로 화이트 리스트 등록을 해야 한다.





<3>  us endpoint service(타사)에서  Endpoint service 작업


1

vpc

vpc 환경 만들기

nlb 있는 구성 만들기

cloudformation  3_lab2 이용  (ELB 가진 네트워크)


2  

 Endpoint service  만들기

VPC > Endpoint service    > Create Endpoint service  >  Network LB  or Gateway LB 선택  >  서비스 생성


3

Endpoint service  name 확인  (다른 계정에서 EP 설정 시 이름 입력 필요)

com.amazonaws.vpce.us-west-1.vpce-svc-0324441 d7




<4>  us endpoint(my)에서  Endpoint  작업


1

화이트 리스트 지정  부여한다.


Endpoint service에  화이트 리스트 지정 하자

 > endpoint service > 화이트 리스트 지정 >

*

추가


또는

iam  >  role 설정

another account  role 설정

aws accout  id 입력

seo-role

role arn 확인

arn:aws:iam::91551:role/seo-admin-role1



https://docs.aws.amazon.com/vpc/latest/userguide/add-endpoint-service-permissions.html




3

B  account에서 EP 생성하기

vpc > ep  > create ep   > Find serivce by name  >  

엔드포인트 서비스 이름  

찾아짐

myvpc

보안 그룹

엔드포인트 생성

수락 대기 중



4

Endpoint service에서  수락하기

C  accout   >   VPC  > Endpoint service   >  endpoint  Connectins > Action >   수락






<5>  seoul VPC와 VPC Peering 작업


seoul VPC(my) ----------(vpc peering)--------us endpoint(my)-----------us endpoint service(타사)


라우팅 테이블에서 반영해야 한다.

상태 VPC ID를 입력한다.


https://docs.aws.amazon.com/ko_kr/vpc/latest/peering/create-vpc-peering-connection.html



<6>  seoul VPC(my)에서 curl로  엔드포인트 확인하기


[ec2-user@ip-172-16-0-74 ~]$ 

curl vpce-0xxxxxxxxxxxxxxkd6-us-east-2a.vpce-svc-05621ab7041ec280a.us-east-2.vpce.amazonaws.com


<html><h1>Endpoint Service  Web Server 2</h1></html>



결론

된다.

seoul VPC(my)에서 us endpoint(my) 까지 되며, us endpoint service(타사)의 LB를 타고 서버 응답까지 온다.




<7> 모니터링 시스템인 데이터독 연동법


데이터 독은 버지니아에만 있다.


https://docs.datadoghq.com/agent/guide/private-link/?tab=metrics


감사합니다.



매거진의 이전글 8탄-7. 7주차-트랜짓 게이트웨이,Route53

작품 선택

키워드 선택 0 / 3 0

댓글여부

afliean
브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari