In my aws account I have a VPC with front-end nodes and a mongo EC2-Classic. The front-end nodes are in a Elastic Beanstalk environment with auto scaling so when new instances appear I have to allow access in mongo's security group. I want to avoid having to do that every time when a new instances appears and the only solution I found was to migrate the mongo instance into the VPC. Is there another solution in which I can allow access only for the members from a certain VPC ?
The simplest way to create a Managed NAT within your VPC and make your MangoDB Security Group whitelist the NAT ip. The NAT will have an elastic IP so whatever instances are in the VPC will always have that exit ip.