AWS Certified Solutions Architect – Professional (SAP-C02) — Question 45

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?

Answer options

Correct answer: A

Explanation

The correct answer is A because deploying a NAT gateway with an Elastic IP allows the Lambda function in a VPC to access the internet while using a public IP address. The other options do not provide the necessary public IP for the Lambda function to access the external service, as egress-only internet gateways are for IPv6 traffic, and using an internet gateway would not work for a private subnet Lambda function without a NAT setup.