AWS Step Functions
คืออะไร
AWS Step Functions เป็นบริการ serverless workflow orchestration ที่ช่วยประสานงาน AWS services หลายตัวในรูปแบบ visual workflow ผ่าน state machine เขียนด้วย Amazon States Language (JSON/YAML) รองรับ branching, parallel execution, retry/catch logic และ human approval steps ทำให้สร้าง business workflows ที่ซับซ้อนได้โดยไม่ต้องเขียน code จัดการ state เอง
ราคา
- Standard Workflows: $0.025/1,000 state transitions
- Express Workflows: $1.00/ล้าน executions + $0.00001/GB-second duration
- ฟรี 4,000 state transitions/เดือน (Standard)
- ฟรี 1 ล้าน executions แรก/เดือน (Express)
เหมาะสำหรับ
- Orchestrate multi-step business processes
- Data processing pipelines ที่มีหลาย steps
- Human-in-the-loop workflows ที่ต้องรอการอนุมัติ
- Error handling และ retry logic ที่ซับซ้อน
Use Case ตัวอย่าง
บริษัทประกันภัยสร้าง claim processing workflow ด้วย Step Functions ที่ประกอบด้วย: รับ claim จาก API, ตรวจสอบ policy ใน DynamoDB, เรียก ML model ประเมินความเสี่ยง, ถ้าวงเงินเกิน $10,000 รอการอนุมัติจาก adjuster (ผ่าน task token), จากนั้น process payment และส่ง notification ทั้ง workflow แสดงเป็น visual diagram ให้ทีม business เข้าใจง่าย และ retry อัตโนมัติหากขั้นตอนใดล้มเหลว