Application Integration
หมวดหมู่ Application Integration รวม services สำหรับเชื่อมต่อ applications, microservices และ systems เข้าด้วยกัน
Amazon SQS (Simple Queue Service)
คืออะไร: Managed message queue service ช่วย decouple components ของ application ให้สื่อสารแบบ asynchronous
ราคา:
- Standard Queue: $0.40/million requests
- FIFO Queue: $0.50/million requests
- Free Tier: 1 million requests/เดือน ตลอดชีพ
เหมาะสำหรับ:
- Decouple microservices
- Buffer งาน background processing
- Retry mechanism สำหรับ failed jobs
Use Case ตัวอย่าง:
ระบบ e-commerce เมื่อลูกค้าสั่งซื้อ → API ส่ง message เข้า SQS แล้ว respond ทันที → Worker processes ดึงจาก queue ทำงาน: ส่ง email, update inventory, notify warehouse ทำให้ checkout เร็ว ไม่ต้องรอทุก process เสร็จ
Amazon SNS (Simple Notification Service)
คืออะไร: Pub/Sub messaging service ส่ง notification ไปยัง subscribers หลายช่องทางพร้อมกัน: email, SMS, SQS, Lambda, HTTP
ราคา:
- HTTP/HTTPS: $0.60/million deliveries
- Email: $2/100,000 deliveries
- SMS: $0.00645/message (US)
- SQS: ฟรี
- Free Tier: 1 million SNS requests/เดือน
เหมาะสำหรับ:
- Fan-out pattern (1 message → หลาย consumers)
- Alert notifications
- Mobile push notifications
Use Case ตัวอย่าง:
ระบบ monitoring: เมื่อ server down → SNS topic ส่งพร้อมกัน: SMS ไป on-call engineer, Email ไป team, Message ไป SQS สำหรับ auto-remediation ทุกคนได้รับแจ้งใน 30 วินาที
Amazon EventBridge
คืออะไร: Serverless event bus เชื่อมต่อ applications ด้วย events จาก AWS services, SaaS applications หรือ custom apps
ราคา:
- Custom events: $1/million events
- Third-party events: $0.60/million events
- AWS events: ฟรี
เหมาะสำหรับ:
- Event-driven architecture
- Integrate กับ SaaS (Shopify, Stripe, Zendesk)
- Scheduled rules (like cron)
Use Case ตัวอย่าง:
เมื่อ Stripe ส่ง payment.succeeded event → EventBridge routing ไปยัง Lambda ที่ activate subscription, SQS queue สำหรับ send welcome email และ S3 สำหรับ store receipt ทั้งหมดอัตโนมัติ
AWS Step Functions
คืออะไร: Orchestrate multi-step workflows โดยใช้ visual state machine กำหนด flow ของ Lambda functions และ services ต่างๆ
ราคา:
- Standard workflows: $0.025/1,000 state transitions
- Express workflows: $1/million state transitions
เหมาะสำหรับ:
- Multi-step business processes
- Long-running workflows (order processing, approval)
- Error handling และ retry logic ที่ซับซ้อน
Use Case ตัวอย่าง:
กระบวนการ onboarding user ใหม่ใช้ Step Functions orchestrate: สร้าง account → ส่ง verification email → รอ 24 ชั่วโมง → ถ้า verify แล้วไป activate ถ้ายังไม่ verify ส่ง reminder → รออีก 48 ชั่วโมง → ถ้ายังไม่ verify ปิด account
Amazon MQ
คืออะไร: Managed message broker service รองรับ Apache ActiveMQ และ RabbitMQ เหมาะสำหรับ migrate แอปเก่าที่ใช้ standard messaging protocols
ราคา:
- mq.m5.large: $0.300/ชั่วโมง
- Storage: $0.30/GB/เดือน
เหมาะสำหรับ:
- Migrate แอปที่ใช้ AMQP, MQTT, STOMP, OpenWire
- ไม่ต้องการ refactor messaging layer เมื่อ migrate ขึ้น cloud
Use Case ตัวอย่าง:
แอป Java enterprise ที่ใช้ ActiveMQ on-premise migrate ขึ้น AWS โดยเปลี่ยน connection URL ไปชี้ที่ Amazon MQ แทน ไม่ต้องแก้ application code เลย