0
0
AWScloud~10 mins

Resource tagging for cost tracking in AWS - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to add a tag key for cost tracking in AWS CloudFormation.

AWS
Resources:
  MyBucket:
    Type: AWS::S3::Bucket
    Properties:
      Tags:
        - Key: [1]
          Value: "ProjectX"
Drag options to blanks, or click blank then click option'
AEnvironment
BOwner
CCostCenter
DName
Attempts:
3 left
💡 Hint
Common Mistakes
Using generic tag keys like 'Name' or 'Owner' which do not directly relate to cost tracking.
2fill in blank
medium

Complete the AWS CLI command to tag an EC2 instance for cost tracking.

AWS
aws ec2 create-tags --resources i-1234567890abcdef0 --tags Key=[1],Value=Marketing
Drag options to blanks, or click blank then click option'
ACostCenter
BProject
CDepartment
DOwner
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Owner' or 'Project' which are not standard for cost tracking.
3fill in blank
hard

Fix the error in the Terraform resource tagging block for cost tracking.

AWS
resource "aws_s3_bucket" "my_bucket" {
  bucket = "my-bucket"
  tags = {
    [1] = "Finance"
  }
}
Drag options to blanks, or click blank then click option'
ACostCenter
Bcostcenter
CcostCenter
Dcost_center
Attempts:
3 left
💡 Hint
Common Mistakes
Using lowercase or snake_case which AWS does not recognize for standard tags.
4fill in blank
hard

Fill both blanks to create a CloudFormation resource with tags for cost tracking and environment.

AWS
Resources:
  MyInstance:
    Type: AWS::EC2::Instance
    Properties:
      Tags:
        - Key: [1]
          Value: "12345"
        - Key: [2]
          Value: "Production"
Drag options to blanks, or click blank then click option'
ACostCenter
BEnvironment
COwner
DProject
Attempts:
3 left
💡 Hint
Common Mistakes
Using non-standard tag keys that do not help with cost tracking or environment identification.
5fill in blank
hard

Fill all three blanks to define a Terraform AWS resource with tags for cost tracking, owner, and environment.

AWS
resource "aws_instance" "web" {
  ami           = "ami-0c55b159cbfafe1f0"
  instance_type = "t2.micro"

  tags = {
    [1] = "7890"
    [2] = "Alice"
    [3] = "Staging"
  }
}
Drag options to blanks, or click blank then click option'
ACostCenter
BOwner
CEnvironment
DProject
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up tag keys or using non-standard keys that do not help with cost tracking.