1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AWS VPCピアリングの環境を作ってみる

Posted at

こんにちは。
株式会社クラスアクト インフラストラクチャ事業部の大塚です。
今回はVPC間で通信できる環境を用意してみたいと思います。

環境イメージ

growi-ページ31.drawio (1).png

構築

VPCを作成していきます。
既に作成していたkensyo-vpcと、新規でtest-vpcを作成してそれらをVPCピアリングで繋げていきたいと思います。
image.png
image (1).png

作成したVPC用のパブリックサブネットを作成していきます。
image (2).png
screencapture-ap-northeast-1-console-aws-amazon-vpcconsole-home-2025-05-03-22_00_53.png
image (3).png

サブネットに紐づけるRTを作成していきます。
image (4).png
image (5).png

明示的なサブネットの関連付けも併せてしておきます。
image (6).png

IGWを作成して、VPCにアタッチします。
image (7).png
image (8).png
image (9).png
image (10).png

VPCピアリングの環境を作っていきます。
VPCからピアリング接続タブを押下します。
image (11).png
fromをkensyo-vpc、toをtest-vpcとして作成していきます。
screencapture-ap-northeast-1-console-aws-amazon-vpcconsole-home-2025-05-03-23_55_17.png
ピアリングが作成出来たら、リクエストを承認します。
image (12).png
image (13).png
image (14).png
RTにピアリングを紐づけていきます。
まずはkensyo-vpc側
image (15).png
image (16).png
次にtest-vpc側
image (17).png
image (18).png

# 検証
それぞれのVPCにEC2を立ち上げていきます。
image (19).png
それぞれのEC2に接続
左がkensyo-vpc上、右がtest-vpc上のEC2
それぞれが対象のEC2に疎通が取れています。
image (20).png

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?