LoginSignup
2
1

More than 5 years have passed since last update.

AWSでEC2からRDSにアクセスできるまでにハマったこと

Posted at

そもそもRDSが作られない

createしようとすると以下のエラーが出た。
VPC must have a minimum of 2 subnets in order to create a DB Subnet Group. Go to the VPC Management Console to add subnets.
これまでsubnetを作る際にAvailability Zoneを指定してなかったのが原因の模様。
なのでもう一つsubnetをAvailability Zoneを指定して作成すると解決した。

EC2からアクセスできない

セキュリティグループを確認すると、
もともとアクセスは作業していたPCのグローバルに対してだけアクセスを許可していたため、
VPCのPrivateIPからの接続のルールを追加すると接続できるようになった。

DBnameがわからない

DBinstanceの名前ではなく、接続できなかった。
調べるとPSQLの場合、デフォルトでpostgresであることがわかった。
PostgreSQL
The name of the database to create when the DB instance is created. If this parameter is not specified, the default "postgres" database is created in the DB instance.

https://docs.aws.amazon.com/AmazonRDS/latest/APIReference/API_CreateDBInstance.html

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