What should a solutions architect do to accomplish this?
Use AWS Config rules to define and detect resources that are not properly tagged.
Use Cost Explorer to display resources that are not properly tagged. Tag those resources manually.
Write API calls to check all resources for proper tag allocation. Periodically run the code on an EC2 instance.
Write API calls to check all resources for proper tag allocation. Schedule an AWS Lambda function through Amazon CloudWatch to periodically run the code.
Explanations:
AWS Config allows you to define rules that ensure resources are compliant with your tagging policy. It can automatically detect resources that do not have the required tags, minimizing manual effort.
Cost Explorer is used for analyzing cost and usage data but does not enforce tagging or check compliance. It requires manual effort to identify and tag resources, which is not efficient for maintaining compliance.
Writing API calls to check for tags would require ongoing management and monitoring. Running the code on an EC2 instance adds operational overhead and does not automate the compliance checking effectively.
While writing API calls and scheduling them with AWS Lambda is a valid approach, it still requires custom coding and maintenance. AWS Config provides a built-in, managed solution that requires less operational effort.