brunch

You can make anything
by writing

C.S.Lewis

by Master Seo May 03. 2021

569. Route53 프라이빗 영역, 다른 VPC연결

다음은  Main Account A에 Route53 Private Hostzone을 만들고,

서비스 계정B에서 해당 Route53을 연결해 사용하는 방식을 정리한다.

서비스 계정B에 개별 Route53을 사용할 필요가 없어진다.



<1> 모니터링 타켓 B 어카운드 VPC생성 , DNS enable

<2> Main Account A에서 hosted zone 확인

<3> 모니터링 타켓 어카운드에서 수락

<4> Main  account 에서 연결 인증 삭제

<5> 참고 사이트





<1> 모니터링 타켓 B 어카운드 VPC생성 , DNS enable

vpc 생성

2

vpc에 대한 dns enable 해야 한다.




#  설정이 GUI로 안되고, CLI로만 가능하다.


<2> Main Account A에서 hosted zone 확인

1

pip3 install awscli --upgrade --user

aws route53 list-hosted-zones

iam에서 access-key 생성 - admin

aws configure

ap-northeast-2

aws route53 list-hosted-zones


2

B Account에 연결 요청하기

aws route53 create-vpc-association-authorization --hosted-zone-id <hosted-zone-id> --vpc VPCRegion=<region>,VPCId=<vpc-id> --region us-east-1

aws route53 create-vpc-association-authorization --hosted-zone-id Z-Main-account정보 --vpc VPCRegion=ap-northeast-2,VPCId=vpc-목적지vpc



<3> 모니터링 타켓 어카운드에서 수락 


1

계정 B의 ec2 로그인

aws configure

aws route53 associate-vpc-with-hosted-zone --hosted-zone-id <hosted-zone-id> --vpc VPCRegion=<region>,VPCId=<vpc-id>

aws route53 associate-vpc-with-hosted-zone --hosted-zone-id Z-Main-account정보 --vpc VPCRegion=ap-northeast-2,VPCId=vpc-목적지vpc


2

dig test.datadoghq.com 잘되는지 확인



<4> Main  account 에서 연결 인증 삭제


1

aws route53  list-vpc-association-authorizations --hosted-zone-id Z-main-account정보


2

Main a account 에서 연결된것 인증 삭제

aws route53 delete-vpc-association-authorization --hosted-zone-id <hosted-zone-id>  --vpc VPCRegion=<region>,VPCId=<vpc-id> 

aws route53 delete-vpc-association-authorization --hosted-zone-id Z-Main-account정보 --vpc VPCRegion=ap-northeast-2,VPCId=vpc-목적지vpc



<5> 참고 사이트


https://aws.amazon.com/ko/premiumsupport/knowledge-center/private-hosted-zone-different-account/





https://brunch.co.kr/@topasvga/1777


감사합니다.


매거진의 이전글 568.(몰아보기) CloudWatch 몰아보기

작품 선택

키워드 선택 0 / 3 0

댓글여부

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