そもそも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