AWS Certified Solutions Architect – Associate (SAA-C03) — Question 620

A company maintains an Amazon RDS database that maps users to cost centers. The company has accounts in an organization in AWS Organizations. The company needs a solution that will tag all resources that are created in a specific AWS account in the organization. The solution must tag each resource with the cost center ID of the user who created the resource.

Which solution will meet these requirements?

Answer options

Correct answer: B

Explanation

Option B is correct because AWS CloudTrail captures API calls for resource creation, which can trigger an Amazon EventBridge rule in near real-time to invoke an AWS Lambda function. This Lambda function can extract the creator's identity, query the Amazon RDS database for the corresponding cost center, and tag the resource. Option A is incorrect because Service Control Policies (SCPs) cannot query external databases to dynamically apply tags. Options C and D are incorrect because scheduled rules do not provide real-time tagging, and using a default value fails to meet the requirement of tagging with the specific user's cost center.