Let's say I have three environments - Development, Test and Production. I believe I have two options on how to set them up in AWS:
Which one of these approaches is considered best practice? What are the advantages or disadvantages of each, if any? I'm new to AWS and so far have been unable to find a definitive answer for which is best
If you create more than one subnet in a VPC, the CIDR blocks of the subnets cannot overlap. For example, if you create a VPC with CIDR block 10.0. 0.0/24 , it supports 256 IP addresses. You can break this CIDR block into two subnets, each supporting 128 IP addresses.
How many subnets can I create per VPC? Currently you can create 200 subnets per VPC. If you would like to create more, please submit a case at the support center.
Limit of 5 VPCs per AWS Account.
Using a Multi-VPC architecture allows you to isolate different parts of your infrastructure. Following the principle of divide and conquer simplifies and improves security due to less error prone and more precise access control.
The good practice is to have production fully separated from test or development environments, which is best achieved by having separate accounts for them:
Accounts in the SDLC OU host non-production workloads and therefore should not have production dependencies from other accounts.
Since you are not using different account, the closest you can get (if you want to follow the good practice) is to have different VPCs (option 1). What's more, to further separate the environments, the VPCs could be in different regions.
Also I would encourage you to re-think why do you need any common resources (i.e. forth VPC). If you share something (e.g. RDS) between prod and devel through the forth VPC, it is a disaster waiting to happen.
I came across a similar problem.
VPC per environment can create great separation between resources, so I would recommend having at least PROD and nonPROD (dev, test, uat) VPC.
Having one VPC per environment can cause an increase in costs:
(Of course, you can solve some issue using VPC Peering, but I do not think this is the proper solution in this case)
On the other side having one VPC per environment can create some benefits:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With