A company runs a highly available image-processing application on Amazon EC2 instances in a single VPC. The EC2 instances run inside several subnets across multiple Availability Zones. The EC2 instances do not communicate with each other. However, the EC2 instances download images from Amazon S3 and upload images to Amazon S3 through a single NAT gateway. The company is concerned about data transfer charges.
What is the MOST cost-effective way for the company to avoid Regional data transfer charges?
A. Launch the NAT gateway in each Availability Zone.
B. Replace the NAT gateway with a NAT instance.
C. Deploy a gateway VPC endpoint for Amazon S3.
D. Provision an EC2 Dedicated Host to run the EC2 instances.
C
A技巧:排除明顯錯誤選項,在沒有明顯錯誤的選項中選擇最合理的選項。
一家公司在單個 VPC 中的 Amazon EC2 實例上運行一個高可用的圖像處理應用程序。這些 EC2 實例在多個可用區的多個子網內運行。EC2 實例之間不進行通信。但是,EC2 實例從 Amazon S3 下載映像,并通過單個 NAT 網關將圖片上傳到 Amazon S3。該公司擔心數據傳輸費用。
公司避免區域數據傳輸費用的最具成本效益的方法是什么?
A. 不正確。在每個可用區中啟動 NAT 網關。每個可用區的實例將使用其所在可用區的 NAT 網關,這可以減少跨可用區的數據傳輸,但是 NAT 網關本身會產生數據傳輸費用,特別是當實例通過 NAT 網關訪問互聯網或 AWS 服務(如 S3)時。每個 NAT 網關都會增加一定的運營成本。該方案沒有完全避免區域數據傳輸費用,反而可能增加了 NAT 網關的使用成本。
B. 不正確。用 NAT 實例替換 NAT 網關。NAT 實例仍然需要通過實例進行數據傳輸,這通常涉及更高的維護成本和潛在的性能瓶頸。此外,NAT 實例同樣會產生數據傳輸費用,特別是當訪問 S3 時。
C. 正確。為 Amazon S3 部署網關 VPC 端點。VPC 端點允許 VPC 中的資源(如 EC2 實例)直接訪問 AWS 服務(如 S3),而無需通過互聯網網關或 NAT 網關。對于 S3,使用 VPC 端點可以完全避免通過 NAT 網關產生的數據傳輸費用,因為數據直接在 AWS 網絡內部傳輸,不涉及公共互聯網。該方案直接解決了數據傳輸費用的問題,且不需要額外的維護或性能開銷。
D. 不正確。為運行 EC2 實例提供專用主機。專用主機提供了對底層物理服務器的專用訪問,但它與數據傳輸費用無關。使用專用主機不會減少通過 NAT 網關訪問 S3 產生的數據傳輸費用。