AWS Certified Solutions Architect – Professional — Question 498

A company is using AWS Organizations to manage 15 AWS accounts. A solutions architect wants to run advanced analytics on the company's cloud expenditures. The cost data must be gathered and made available from an analytics account. The analytics application runs in a VPC and must receive the raw cost data each night to run the analytics.
The solutions architect has decided to use the Cost Explorer API to fetch the raw data and store the data in Amazon S3 in JSON format. Access to the raw cost data must be restricted to the analytics application. The solutions architect has already created an AWS Lambda function to collect data by using the Cost Explorer
API.
Which additional actions should the solutions architect take to meet these requirements?

Answer options

Correct answer: A

Explanation

To query consolidated billing and cost data across an entire AWS Organization, the Cost Explorer API must be accessed via the management (master) account; therefore, the Lambda function in the member analytics account must assume a role in the management account using AWS STS. To securely restrict S3 bucket access to only the analytics application inside the VPC, a gateway VPC endpoint for S3 should be used, with an S3 bucket policy limiting access to that specific endpoint. Options B and D are incorrect because member accounts cannot directly query organization-wide Cost Explorer data, and Option C is incorrect because using aws:SourceIp with private IP ranges does not work for restricting access through VPC endpoints.