Tag เปรียบเสมือน DNA ของ FinOps
FinOps Practitioner ออกแบบ Tagging Strategy 4 Tags บังคับ: Team, Environment, Service, CostCenter แล้วใช้ SCP บังคับ Tag ก่อน provision แต่ปัญหาคือ Legacy resources 150+ ตัวที่ไม่มี Tag และ Untaggable costs อีก 12%
14 ก.พ. 2569 | 8 นาที
- Tag 4 ตัวที่บังคับ: Team, Environment, Service, CostCenter ไม่มี = provision ไม่ได้
- ใช้ SCP (Service Control Policy) บังคับ Tag ก่อนสร้าง Resource ใหม่
- Legacy resources ต้อง Tag ย้อนหลัง และ Untaggable costs (Support, Tax) ต้องจัดการแยก
ปัญหาที่ต้องแก้
จากตอนที่แล้ว FinOps Practitioner เปิด Visibility แล้ว แต่ยังตอบไม่ได้ว่า “ทีมไหนใช้เท่าไหร่” เพราะ 77% ของ resource ไม่มี Tag
วันนี้ FinOps Practitioner จะออกแบบ Tagging Strategy และบังคับให้ทุก Resource ต้องมี Tag
Tagging Strategy กับ 4 Tags ที่ต้องมี
FinOps Practitioner ประชุมกับ CTO และ DevOps Engineer เพื่อออกแบบ Tag Strategy
| Tag Key | ตัวอย่าง Value | ใช้ตอบคำถาม |
|---|---|---|
Team | search, booking, payment, platform | ทีมไหนใช้เท่าไหร่? |
Environment | prod, staging, dev | Production vs Non-prod? |
Service | hotel-search, booking-api, shared-service | Feature ไหนกินเยอะ? |
CostCenter | product, engineering, marketing | แผนกไหนรับผิดชอบ? |
Tag อื่นที่ควรมี (Optional)
Owner: email ของคนรับผิดชอบProject: ถ้ามีหลาย project ใน account เดียวกันCreatedBy: สร้างโดยใคร (ทำ auto-tag ได้)
CTO ถามว่า
แล้วพวก VPC กับ NAT Gateway ที่ใช้ร่วมกันหลายทีมล่ะ? จะติด Tag
Serviceว่าอะไร?
FinOps Practitioner ตอบว่า
ใส่ว่า
shared-serviceไปก่อนครับ จำที่เราคุยกันตอนที่แล้วเรื่อง Allocation Key ได้ไหม? พวก Shared Resource เราจะเอาไปคำนวณปันส่วนทีหลังตอนทำ Showback
CTO ถามต่อว่า
4 Tags เยอะไปไหม? DevOps จะบ่นเอา
FinOps Practitioner ตอบว่า
ถ้าน้อยกว่านี้จะตอบคำถาม business ไม่ได้ และ Tag พวกนี้ส่วนใหญ่ใส่ครั้งเดียวตอนสร้าง resource ไม่ต้องมาแก้ทีหลัง ซึ่งทำผ่าน IaC (Infrastructure as Code) ได้
บังคับให้ต้อง Tag ด้วย SCP
FinOps Practitioner ใช้ Service Control Policy (SCP) บังคับว่า Resource ใหม่ต้องมี Tag ครบ 4 ตัว ไม่งั้นสร้างไม่ได้
ตัวอย่าง SCP Policy (คลิกเพื่อดู JSON)
{ "Version": "2012-10-17", "Statement": [ { "Sid": "RequireTeamTag", "Effect": "Deny", "Action": ["rds:CreateDBInstance", "lambda:CreateFunction", "elasticache:CreateCacheCluster", "s3:CreateBucket"], "Resource": "*", "Condition": { "Null": { "aws:RequestTag/Team": "true" } } }, { "Sid": "RequireEnvironmentTag", "Effect": "Deny", "Action": ["rds:CreateDBInstance", "lambda:CreateFunction", "elasticache:CreateCacheCluster", "s3:CreateBucket"], "Resource": "*", "Condition": { "Null": { "aws:RequestTag/Environment": "true" } } }, { "Sid": "RequireServiceTag", "Effect": "Deny", "Action": ["rds:CreateDBInstance", "lambda:CreateFunction", "elasticache:CreateCacheCluster", "s3:CreateBucket"], "Resource": "*", "Condition": { "Null": { "aws:RequestTag/Service": "true" } } }, { "Sid": "RequireCostCenterTag", "Effect": "Deny", "Action": ["rds:CreateDBInstance", "lambda:CreateFunction", "elasticache:CreateCacheCluster", "s3:CreateBucket"], "Resource": "*", "Condition": { "Null": { "aws:RequestTag/CostCenter": "true" } } } ]}ทำไมไม่ใช้ Tag Policy?
AWS มี Tag Policy สำหรับบังคับ tag เหมือนกัน แต่ enforcement mode รองรับแค่บาง services เช่น EC2, S3, RDS
ปัญหาคือ HotelGo ใช้ Lambda, API Gateway, ElastiCache เป็นหลัก ซึ่ง Tag Policy ไม่รองรับ enforcement สำหรับ services เหล่านี้ ทำได้แค่ reporting mode (รายงานว่า noncompliant แต่ไม่ block)
SCP จึงเหมาะกว่าเพราะ block ได้ทุก action ที่ระบุ ไม่ว่าจะเป็น service ไหน
DevOps Engineer ถามว่า
แปลว่าถ้าผมลืมใส่ Tag จะสร้าง Lambda ไม่ได้เลย?
FinOps Practitioner ตอบว่า
ใช่ครับ แต่ดีกว่าสร้างไปแล้วไม่รู้ว่าใครเป็นเจ้าของ
วันแรกที่เปิด SCP
วันถัดมา DevOps Engineer วิ่งมาหา FinOps Practitioner
DevOps Engineer ถามว่า
Pipeline แดงเถือกเลย! Deploy ไม่ผ่านเพราะติด SCP
FinOps Practitioner ตอบกลับไปว่า
ใช่ครับ ต้องไปแก้ serverless.yml กับ Terraform ให้ใส่ Tag ครบก่อน ผมให้เวลา 3 วันแก้ IaC ทุก repo ระหว่างนี้ผมเปิด SCP แค่ Dev ก่อน Production ยังไม่บังคับ
SCP ใช้ได้กับ AWS Organizations เท่านั้น
ถ้าใช้ single account ต้องใช้ IAM Policy แทน หรือใช้ AWS Config Rules ตรวจจับ resource ที่ไม่มี Tag
เปิด Cost Allocation Tags
Tag ที่สร้างใน AWS ไม่ได้ปรากฏใน Cost Explorer อัตโนมัติ ต้องเปิด Cost Allocation Tags ใน Billing Console ก่อน
สร้าง Tag บน Resource
ติด Tag Team, Environment, Service, CostCenter
เปิด Cost Allocation Tags
Billing Console → Cost Allocation Tags → Activate
รอ 24 ชั่วโมง
AWS ต้องใช้เวลา process
ใช้ใน Cost Explorer
Filter by Tag ได้แล้ว
FinOps Practitioner พูดว่า
หลังเปิด Cost Allocation Tags ต้องรอ 24 ชั่วโมง Tag ถึงจะปรากฏใน Cost Explorer และ CUR
อย่าลืม Activate!
หลายคนติด Tag บน Resource แล้วแต่ไม่เห็นใน Cost Explorer เพราะลืมไป Activate ใน Billing Console ต้องไปที่ Billing → Cost Allocation Tags → เลือก Tag ที่ต้องการ → กด Activate
ปัญหา 1: Legacy Resources
Resource ใหม่บังคับ Tag ได้แล้ว แต่ Resource เก่า 150 ตัวยังไม่มี Tag
FinOps Practitioner วางแผนจัดการ Legacy:
Phase 1 (สัปดาห์แรก): Tag resource ที่กิน cost เยอะสุดก่อน
- RDS instances (30% ของบิล)
- Lambda functions ที่ invoke เยอะ
- ElastiCache clusters
Phase 2 (สัปดาห์ที่ 2-3): Tag resource ที่เหลือ
- S3 buckets
- CloudWatch Log Groups
- API Gateway APIs
Phase 3 (ต่อเนื่อง): ตรวจจับ resource ใหม่ที่หลุด Tag
- ใช้ AWS Config Rules
- Weekly report ส่งให้ทีม
DevOps Engineer ถามว่า
ผมต้อง Tag 400 กว่าตัวเองเหรอ?
FinOps Practitioner ตอบว่า
ไม่ครับ เราจะใช้ AWS Resource Groups Tag Editor ทำ bulk tagging และเขียน script ช่วย
ปัญหา 2: Untaggable Costs
บาง cost ติด Tag ไม่ได้ ไม่ว่าจะพยายามแค่ไหน
Taggable vs Untaggable Costs
Untaggable costs (~12% ของบิล):
| ประเภท | ตัวอย่าง | วิธีจัดการ |
|---|---|---|
| Support | AWS Support Plan | Allocate ตาม % ของแต่ละทีม |
| Tax | VAT 7% | Allocate ตาม % ของแต่ละทีม |
| Data Transfer | Inter-region, Internet | ใช้ VPC Flow Logs ประมาณการ |
| Marketplace | 3rd party software | Allocate ให้ทีมที่ใช้ |
FinOps Practitioner อธิบายว่า
Untaggable costs เราจะ allocate ตามสัดส่วน cost ของแต่ละทีม เช่น ถ้าทีม Search ใช้ 40% ของ taggable cost ก็รับ 40% ของ untaggable cost ด้วย
Untaggable ≠ Unallocatable
แม้ติด Tag ไม่ได้ แต่ยังสามารถ allocate ได้ด้วยวิธีอื่น เช่น สัดส่วน, fixed %, หรือ business rule
ผลลัพธ์หลัง 3 สัปดาห์
FinOps Practitioner พูดว่า
ตอนนี้เราตอบได้แล้วว่าทีมไหนใช้เท่าไหร่ และจำ Cost Categories ที่เราทำค้างไว้ตอนที่แล้วได้ไหมครับ? พอเรามี Tag Environment ครบ Cost Categories นั้นจะทำงานสมบูรณ์ทันที ไม่มี Uncategorized อีกต่อไป
CFO ถามว่า
แล้วทีมไหนใช้เยอะสุด?
FinOps Practitioner ตอบว่า
คำถามดีครับ แต่ก่อนตอบ เราต้องแยก COGS ออกจาก OpEx ก่อน ไม่งั้นตัวเลขที่เห็นจะไม่ใช่ต้นทุนจริง
สรุป
| สิ่งที่ทำ | ผลลัพธ์ |
|---|---|
| ออกแบบ Tag Strategy 4 Tags | Team, Environment, Service, CostCenter |
| บังคับ Tag ด้วย SCP | Resource ใหม่ต้องมี Tag ครบ |
| เปิด Cost Allocation Tags | ใช้ใน Cost Explorer ได้ |
| Tag Legacy resources | Coverage 23% → 89% |
| จัดการ Untaggable costs | Allocate ตามสัดส่วน |
Tag คือ DNA ของ FinOps ถ้าไม่มี Tag ก็จะ allocate ไม่ได้ และไม่รู้ว่าใครใช้เท่าไหร่
ตอนหน้า FinOps Practitioner จะแยก COGS (Cost of Goods Sold) ออกจาก OpEx (Operating Expense) เพื่อให้เห็น กำไรขั้นต้น (Gross Margin) ที่แท้จริง
รับบทความผ่านทางอีเมล
บทความที่เกี่ยวข้อง
State of FinOps 2026: องค์กร ทีม และอนาคต
ทีมที่มี executive engagement ระดับ VP+ มีอิทธิพลมากกว่า 2-4 เท่า, FinOps for AI ขึ้นเป็น priority อันดับ 1 ใน 12 เดือนข้างหน้า, และ Shift Left ยังเป็น unsolved challenge (สรุปตอนจบ State of FinOps 2026)
State of FinOps 2026: จาก Cloud สู่ Technology ทั้งหมด
90% บริหาร SaaS, 64% Licensing, 57% Private Cloud, 48% Data Center: FinOps ขยายขอบเขตเกิน Cloud ไปแล้ว และทุก technology เริ่มจาก visibility ก่อน optimize เสมอ
Typography Showcase
แสดง typography และ UI components ทั้งหมดที่ใช้ในเว็บไซต์นี้