What solution should the Engineer use to implement the appropriate access restrictions for the application?
Create a NACL to allow access on TCP port 443 from the 1,500 subsidiary CIDR block ranges. Associate the NACL to both the NLB and EC2 instances
Create an AWS security group to allow access on TCP port 443 from the 1,500 subsidiary CIDR block ranges. Associate the security group to the NLB. Create a second security group for EC2 instances with access on TCP port 443 from the NLB security group.
Create an AWS PrivateLink endpoint service in the parent company account attached to the NLB. Create an AWS security group for the instances to allow access on TCP port 443 from the AWS PrivateLink endpoint. Use AWS PrivateLink interface endpoints in the 1,500 subsidiary AWS accounts to connect to the data processing application.
Create an AWS security group to allow access on TCP port 443 from the 1,500 subsidiary CIDR block ranges. Associate the security group with EC2 instances.
Explanations:
NACLs can restrict traffic, but applying them to both the NLB and EC2 instances can be cumbersome and inefficient for the use case. NACLs are stateless, making it harder to control access properly for an application behind a load balancer. Additionally, security groups are a better option in this context.
While security groups are a good choice, associating the security group with the NLB isn’t possible since the NLB doesn’t support directly associating a security group. The second part (security group for EC2 instances) is correct, but the first part is flawed.
AWS PrivateLink allows for secure, private connectivity between VPCs. By creating a PrivateLink endpoint service and using interface endpoints in the subsidiaries’ accounts, the application becomes accessible only via PrivateLink, which meets the compliance requirement of restricting public internet access.
While associating a security group with EC2 instances allows restricting access, this option doesn’t address restricting access through the NLB itself. Without limiting the NLB’s access, the application might still be accessible externally, which violates the compliance requirement.