AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 163

A company has multiple development teams in different business units that work in a shared single AWS account. All Amazon EC2 resources that are created in the account must include tags that specify who created the resources. The tagging must occur within the first hour of resource creation.

A DevOps engineer needs to add tags to the created resources that include the user ID that created the resource and the cost center ID. The DevOps engineer configures an AWS Lambda function with the cost center mappings to tag the resources. The DevOps engineer also sets up AWS CloudTrail in the AWS account. An Amazon S3 bucket stores the CloudTrail event logs.

Which solution will meet the tagging requirements?

Answer options

Correct answer: D

Explanation

The correct answer, D, leverages an Amazon EventBridge rule that triggers on EC2 events captured by CloudTrail, ensuring that tagging occurs promptly after resource creation. Options A and B focus on S3 events, which are not relevant for tagging EC2 resources directly. Option C suggests a scheduled rule, which does not guarantee immediate tagging within the required timeframe after resource creation.