I have two micro frontends hosted on AWS Amplify:
- The first frontend, referred to as FE-A, needs to be accessible solely from a designated static IP.
- The second frontend, FE-B, should be available to the public from any location.
The challenge arises when I set the Security Group of my EC2 instance to 0.0.0.0, as this configuration allows access to both frontends from the public.
If I restrict access to only the static IP, it means both frontends must be accessed from that single point, making FE-B unavailable publicly.
I attempted to launch a Lambda function that would retrieve the IP range for my region and update the EC2 security group daily, but that solution is far from optimal.
For FE-A, everything operates smoothly when I set the static IP in the Security Group.
Currently, I can’t achieve the goal of closing off FE-A while keeping FE-B accessible.
I’m looking for a cost-effective strategy to fulfill these requirements. Any suggestions for a viable solution would be greatly appreciated.