VPC for ec2 instance running DB, connected via VPC Peering to another VPC with an ec2 instance running application

0

Hi,

I am looking for AWS recommended best practice for connecting an application running on EC2, with a DB, running on another EC2 instance.

I followed a recommendation to create two VPC instances, one for each EC2 (application, db), and connect them by using VPC Peering and security group rules (i.e., open specific ports for ingress and egress for each VPC).

A peer reviewer claims that this is "an obsolete, not recommended, pricy" approach "which is not required, and adds no benefits to the overhaul architecture".

The community's take on this issue is welcome. To VPC Peer, or not to VPC Peer - this is the question ...

Kobi
質問済み 1年前340ビュー
2回答
1

Hi, you could have a read to this architecture whitepaper: https://docs.aws.amazon.com/whitepapers/latest/serverless-multi-tier-architectures-api-gateway-lambda/three-tier-architecture-overview.html There are different cases depending on your scenario (https://docs.aws.amazon.com/whitepapers/latest/serverless-multi-tier-architectures-api-gateway-lambda/sample-architecture-patterns.html),but in general you could exploit reusing the same VPC and having subnets where you can deploy layers to. For instance for databases and EC2 accessing the database you may want to have in 2 separate private subnets.

Finally, searching for 3-layer architecture will usually lead you to clear aws architecture which you can assess if fit your case.

Hope it helps ;)

profile picture
エキスパート
回答済み 1年前
0

If you only want to separate applications and databases, you can simply divide subnets within the same VPC.
An example of dividing a VPC would be to divide it by system or by environment (production, staging, etc.). (In the first place, in this case, it is often divided by AWS account.)
It is also cumbersome to manage because it will be necessary to create flow logs for each VPC.

profile picture
エキスパート
回答済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ