LoginSignup
6
1

More than 1 year has passed since last update.

VPC 「DNSホスト名」の有効化とは

Last updated at Posted at 2021-08-18

開発用途でVPC外部から接続可能なDBインスタンスをVPC内に立てようとして以下のエラーがでた。(※あくまで開発用途のためパブリックアクセス可能としている。また接続元IPは特定IPに制限する)

Cannot create a publicly accessible DBInstance. The specified VPC does not support DNS resolution, DNS hostnames, or both. Update the VPC and then try again

調べると、所属するVPCの「DNSホスト名」を「有効化」すると解決できるらしい。
内容としてはドキュメントのここに書いてある内容。

プライベートDNSホスト名

この形式のアドレスのこと。
ip-{private-ipv4-address}.ec2.internal
インスタンスをVPC内に立てると常に割り当てられる。

パブリックDNSホスト名

この形式のアドレスのこと。
ec2-{public-ipv4-address}.compute-1.amazonaws.com
インスタンスをVPC内に立てた時、VPCの設定で「DNSホスト名」と「DNS解決」が有効になっていると割り当てられる。

スクリーンショット_2021-08-18_11_22_44.png

解決方法

デフォルトでは「DNS解決」のみ有効になっていた。
スクリーンショット_2021-08-18_11_28_49.png

追加で「DNSホスト名」を有効化。
スクリーンショット_2021-08-18_11_29_03.png

6
1
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
6
1