By Fatskills Exam Guides Team — the exam nerds behind 28,500+ quizzes and 2.1M practice questions across 500+ global exams.
(For AWS Solutions Architect – Associate)
You’re a cloud engineer at a mid-sized company. Your CFO just sent you a panicked Slack:
"Our AWS bill spiked 300% last month. Who’s spending $12K on ‘miscellaneous’? Fix this."
Problem: Without cost allocation tags, AWS bills are a black box. You can’t answer: - Which team owns the $5K/month RDS instance? - Is that Lambda function still in use, or is it zombie infrastructure? - Why did costs jump in us-east-1 but not eu-west-1?
us-east-1
eu-west-1
Solution: Cost allocation tags + AWS Budgets give you X-ray vision into your AWS spend. They let you: ✅ Attribute costs to teams, projects, or environments (dev/stage/prod).✅ Set alerts before costs spiral (e.g., "Warn me if EC2 spend exceeds $1K this month").✅ Enforce accountability (e.g., "Team A’s S3 costs are capped at $500/month").
Real-world scenario:You inherit a legacy AWS account with 200+ resources. The bill is $8K/month, but no one knows what’s driving it. Your mission:1. Tag all resources by Owner, Project, and Environment.2. Set up a budget to alert if costs exceed $10K/month.3. Generate a cost report showing which team is overspending.
Owner
Project
Environment
If you ignore this:- Cost overruns (e.g., a forgotten p3.8xlarge GPU instance running 24/7).- Blame games ("Who deployed this?!").- Failed audits (e.g., SOC2 requires cost tracking by department).
p3.8xlarge
Project=Alpha
Owner=Alice
aws:createdBy
Environment=Prod
AdministratorAccess
AWSBudgetsActionsWithAWSResourceControlAccess
Prod
Staging
Dev
Alpha
Beta
Internal
Alice
Bob
Team-Data
Verify:
aws ce list-cost-allocation-tags --status ACTIVE
Expected output:
{ "CostAllocationTags": [ { "TagKey": "Environment", "Status": "ACTIVE" }, { "TagKey": "Project", "Status": "ACTIVE" } ] }
Use the Resource Groups & Tag Editor: 1. Go to AWS Resource Groups → Tag Editor.2. Select All supported resource types → All regions.3. Click Search resources.4. Select all resources → Manage tags.5. Add: - Environment=Prod (for production resources) - Project=Alpha (for your project) - Owner=Alice (your name) 6. Click Save changes.
CLI Alternative (Tag an EC2 Instance):
aws ec2 create-tags \ --resources i-1234567890abcdef0 \ --tags Key=Environment,Value=Prod Key=Project,Value=Alpha Key=Owner,Value=Alice
Monthly-Prod-Cost-Limit
Monthly
$10,000
All AWS services
80%
[email protected]
100%
CLI Alternative:
aws budgets create-budget \ --account-id 123456789012 \ --budget '{ "BudgetName": "Monthly-Prod-Cost-Limit", "BudgetLimit": { "Amount": "10000", "Unit": "USD" }, "TimeUnit": "MONTHLY", "BudgetType": "COST", "CostFilters": { "TagKeyValue": ["Project$Alpha", "Environment$Prod"] } }' \ --notifications-with-subscribers '[ { "Notification": { "NotificationType": "ACTUAL", "ComparisonOperator": "GREATER_THAN", "Threshold": 80 }, "Subscribers": [{ "SubscriptionType": "EMAIL", "Address": "[email protected]" }] } ]'
Tag
Last month
Expected output (simplified):| Project | Cost (USD) | |---------|------------| | Alpha | 4,200 | | Beta | 1,800 | | Internal| 3,500 |
To enforce tagging on new resources: 1. Go to AWS Config → Rules.2. Click Add rule → Search for required-tags.3. Configure: - Rule name: Enforce-Project-Tag - Tag key: Project - Trigger type: Configuration changes 4. Click Save.
required-tags
Enforce-Project-Tag
Configuration changes
aws configservice put-config-rule \ --config-rule '{ "ConfigRuleName": "Enforce-Project-Tag", "Source": { "Owner": "AWS", "SourceIdentifier": "REQUIRED_TAGS" }, "InputParameters": { "tag1Key": "Project" }, "Scope": { "ComplianceResourceTypes": ["AWS::EC2::Instance", "AWS::RDS::DBInstance"] } }'
json { "Effect": "Allow", "Action": "ec2:TerminateInstances", "Resource": "*", "Condition": { "StringEquals": { "ec2:ResourceTag/Owner": "${aws:username}" } } }
PascalCase
env
Project=Alpha Team
yaml # CloudFormation example Resources: MyEC2Instance: Type: AWS::EC2::Instance Properties: Tags: - Key: Environment Value: Prod - Key: Project Value: Alpha
project=alpha
"How long does it take for tags to appear in cost reports?" ✅ Answer: 24 hours.
AWS Budgets:
"Can budgets automatically stop resources?" ✅ Answer: Yes, via AWS Systems Manager Automation.
Tagging strategies:
Department
Department=Finance
"You need to track costs for a new project. The project uses EC2, RDS, and S3. How do you ensure costs are accurately attributed?" ✅ Answer:1. Tag all resources with Project=NewProject.2. Enable cost allocation tags in the Billing Console.3. Set up a cost budget for the project.4. Use Cost Explorer to generate reports by tag.
Project=NewProject
Challenge:You have an untagged EC2 instance (i-1234567890abcdef0) running in us-east-1. Your manager wants: 1. The instance tagged with Environment=Dev and Owner=You.2. A budget alert if costs for this instance exceed $50/month.
i-1234567890abcdef0
Environment=Dev
Owner=You
Solution:
# Tag the instance aws ec2 create-tags \ --resources i-1234567890abcdef0 \ --tags Key=Environment,Value=Dev Key=Owner,Value=You # Create a budget for the instance aws budgets create-budget \ --account-id 123456789012 \ --budget '{ "BudgetName": "Dev-EC2-Budget", "BudgetLimit": { "Amount": "50", "Unit": "USD" }, "TimeUnit": "MONTHLY", "BudgetType": "COST", "CostFilters": { "ResourceId": ["i-1234567890abcdef0"] } }' \ --notifications-with-subscribers '[ { "Notification": { "NotificationType": "ACTUAL", "ComparisonOperator": "GREATER_THAN", "Threshold": 80 }, "Subscribers": [{ "SubscriptionType": "EMAIL", "Address": "[email protected]" }] } ]'
Why it works:- Tags are applied immediately (but take 24 hours to appear in cost reports).- The budget filters by ResourceId, so it only tracks this instance.
aws ec2 create-tags --resources i-1234567890abcdef0 --tags Key=Project,Value=Alpha
Final Tip:
"Tagging is like labeling your storage boxes. If you don’t label them, you’ll waste hours digging through ‘Miscellaneous’ when you need something. Tag early, tag often."
Now go tag your resources and set up a budget—your CFO will thank you. ?
Join 4M+ learners. Unlock unlimited quizzes, wrong-answer tracking, flashcards + reminders, study guides, and 1-on-1 challenges.