You just join a company as a DevOps engineer and you need to manage an AWS account.
A big number of AWS resources are deployed in the account such as Auto Scaling groups, S3 buckets, etc.
In order to better understand the cost spent in the account, every department starts to attach a user-defined tag CostCenter:xxxx to its AWS resources.
You also configured the AWS Cost and Usage Reports and used an S3 bucket to save the reports.
After several days, you check the reports in the S3 bucket and find that the reports do not use the CostCenter tag to organize the resources or track the AWS costs.
Which of the following steps do you miss?
Click on the arrows to vote for the correct answer
A. B. C. D.Correct Answer - A.
In order to enable the user-defined cost allocation tags, you need to activate the tags first.
Details can be found in https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/cost-alloc-tags.html.
Option A is CORRECT: Because you need to activate the tags in the Billing and Cost Management console for the cost allocation tracking.
Option B is incorrect: The reports have already been put in the S3 bucket successfully, which means there is no problem for the S3 bucket policy permissions.
Option C is incorrect: Because both AWS-Generated Cost Allocation tags and user-defined tags are supported by the AWS Cost and Usage Reports.
Option D is incorrect: Because there is no such requirement to append the “aws:” prefix to the user-defined cost allocation tags.
The issue is that the AWS Cost and Usage Reports are not organizing the resources or tracking the AWS costs using the user-defined tag CostCenter:xxxx. In order to resolve the issue, we need to identify the missing steps in the process. Let's review each answer option:
A. Activate the CostCenter tag in the Billing and Cost Management console then the usage and costs will be grouped by the tag.
This option is a valid step to enable grouping of AWS resources by the CostCenter tag. By activating the CostCenter tag in the Billing and Cost Management console, the tag will be enabled for cost allocation purposes, and AWS will automatically group the resources by this tag. However, if this step was already taken, we need to consider other options.
B. Modify the S3 bucket policy to allow the AWS Cost Allocation Tags service to write objects in the S3 bucket.
This option is related to the S3 bucket policy. When AWS Cost and Usage Reports are enabled, they write reports to an S3 bucket. Therefore, the S3 bucket policy must allow the AWS Cost Allocation Tags service to write objects in the S3 bucket. If the S3 bucket policy does not allow the AWS Cost Allocation Tags service to write objects in the S3 bucket, this may cause issues with the reports. Therefore, this option should be considered as a possible solution.
C. AWS Cost and Usage Reports only support AWS-Generated Cost Allocation Tags. User-defined tags are not supported.
This option is incorrect. AWS Cost and Usage Reports support both AWS-generated cost allocation tags and user-defined tags. User-defined tags are commonly used to track costs by department or application, and AWS supports up to 50 user-defined tags per resource. Therefore, this option is not a valid step.
D. User-defined tags have specific formats in AWS Cost and Usage Reports. The tag keys must have a prefix of “aws:” otherwise the tags are not applied in the reports.
This option is related to the format of user-defined tags in AWS Cost and Usage Reports. User-defined tags can be used to categorize and track AWS resources, but they must follow specific naming conventions. For example, the tag keys must have a prefix of “aws:” to be recognized by AWS Cost and Usage Reports. If user-defined tags are not in the correct format, they may not be applied in the reports. Therefore, this option should also be considered as a possible solution.
In summary, the missing step in this scenario could be either B or D. We need to check the S3 bucket policy to ensure that the AWS Cost Allocation Tags service is allowed to write objects in the S3 bucket. Additionally, we need to ensure that the user-defined tags follow the correct naming conventions.