SAP-C02 · Question #296
A company is building a serverless application that runs on an AWS Lambda function that is attached to a VPC. The company needs to integrate the application with a new service from an external…
The correct answer is A. Deploy a NAT gateway. Associate an Elastic IP address with the NAT gateway. Configure the. This solution will give the Lambda function access to the internet by routing its outbound traffic through the NAT gateway, which has a public Elastic IP address. This will allow the external provider to whitelist the single public IP address associated with the NAT gateway…
Question
A company is building a serverless application that runs on an AWS Lambda function that is attached to a VPC. The company needs to integrate the application with a new service from an external provider. The external provider supports only requests that come from public IPv4 addresses that are in an allow list. The company must provide a single public IP address to the external provider before the application can start using the new service. Which solution will give the application the ability to access the new service?
Options
- ADeploy a NAT gateway. Associate an Elastic IP address with the NAT gateway. Configure the
- BDeploy an egress-only internet gateway. Associate an Elastic IP address with the egress-only
- CDeploy an internet gateway. Associate an Elastic IP address with the internet gateway. Configure
- DDeploy an internet gateway. Associate an Elastic IP address with the internet gateway. Configure
How the community answered
(23 responses)- A83% (19)
- B4% (1)
- C9% (2)
- D4% (1)
Explanation
This solution will give the Lambda function access to the internet by routing its outbound traffic through the NAT gateway, which has a public Elastic IP address. This will allow the external provider to whitelist the single public IP address associated with the NAT gateway, and enable the application to access the new service. Deploying a NAT gateway and associating an Elastic IP address with it, and then configuring the VPC to use the NAT gateway, will give the application the ability to access the new service. This is because the NAT gateway will be the single public IP address that the external provider needs for the allow list. The NAT gateway will allow the application to access the service, while keeping the underlying Lambda functions private. When configuring NAT gateways, you should ensure that the route table associated with the NAT gateway has a route to the internet gateway with a target of the internet gateway. Additionally, you should ensure that the security group associated with the NAT gateway allows outbound traffic from the Lambda functions. https://docs.aws.amazon.com/vpc/latest/userguide/VPC_NAT_Gateway.html
Community Discussion
No community discussion yet for this question.