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 Reachability AnalyzerでLBとの疎通を調べる

1
Last updated at Posted at 2026-02-25

結論

Load BalancerのNetwork Interface IDはAWS CLIで取得できる。

aws ec2 describe-network-interfaces \
  --filters Name=description,Values="ELB <LBのARNのloadbalancer/より後ろ>" \
  --query 'NetworkInterfaces[*].NetworkInterfaceId' \
  --output text

こんな人におすすめ

  • VPC Reachability AnalyzerでLBとの疎通を調べたい
  • AWS ConsoleでLBのNetwork Interface IDが見つからない

VPC Reachability Analyzerとは

VPC内の送信元リソースから宛先リソースへ到達可能かどうかを確認するツール。実際にパケットを送信せずに、ルートテーブル・セキュリティグループ・NACLなどの設定を解析して到達性を判定する。ネットワーク通信のトラブルシューティングに有用。

困ったこと

LBと他のAWSリソース間の通信をVPC Reachability Analyzerで調査しようとしたが、指定できるリソースタイプは以下の8つに限られている。

リソースタイプ
Transit Gateways
Transit Gateway Attachments
VPN Gateways
Instances
Network Interfaces
Internet Gateways
VPC Endpoints
VPC Peering Connections

LBを直接指定できないため、LBのNetwork Interfaceを調べる必要がある。しかし、AWS Console上のLB詳細画面からはNetwork Interfaceを確認できない。

解決策

手順1:LBのARNを確認

AWSコンソールのLB詳細画面でARNを確認し、arn:*:loadbalancer/ より後ろの部分をメモする。

arn:aws:elasticloadbalancing:ap-northeast-1:123456789012:loadbalancer/app/my-alb/1234567890abcdef
                                                                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                                     この部分をコピー

手順2:AWS CLIでNetwork Interface IDを取得

aws ec2 describe-network-interfaces \
  --filters Name=description,Values="ELB app/my-alb/1234567890abcdef" \
  --query 'NetworkInterfaces[*].NetworkInterfaceId' \
  --output text
eni-0123456789abcdef0    eni-0fedcba9876543210

手順3:Reachability Analyzerで調査

取得したNetwork Interface IDをVPC Reachability Analyzerの送信元または宛先に指定して、通信の調査を進める。

まとめ

やりたいこと 方法
LBのENI IDを取得 describe-network-interfaces
Reachability AnalyzerでLB指定 ENI IDを使用

参考

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?