Is it possible to create RDS replica in public subnet while master db is in private?

0

Is it possible to create RDS replica in public subnet while master db is in private? It seems this might be possible if we create replica in different region as getting error DbSubnetGroupName should not be specified for read replicas that are created in the same region as the master

y0zg
질문됨 2년 전2051회 조회
2개 답변
1

As long as subnets are part of the same DB Subnet group all can be done

see documentation below of creating read replicas[1]https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html

답변함 2년 전
  • I create the config via terraform and it seems the only option worked for me is to use cross-region replicaion due to this error DbSubnetGroupName should not be specified for read replicas that are created in the same region as the master I tried to create separate DB Subnet group with public subnets but in that case creation of read-replica in the same region doesn't work

0

Ideally you would have a private subnet for primary RDS instance, hence the replica would use the same subnet group and would not be accessible publicly. You cannot place the replica in a different subnet group. If your subnets are public, but primary DB has Publicly Accessibility set to No to ensure it can only connect privately, then you can have a public replica with Public Accessibility as Yes. I wouldn't recommend making the subnets public here. Here are some approaches:

  1. Setup manual replication to an RDS instance which will be public, and use that for reading purposes
  2. Use AWS DMS to move data and changes similar to 2 instead of manual replication setup
  3. Use cross region replica(might not fit the use case) within a subnet group which has public subnets in another region
AWS
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠