Skip to main content

Database

หมวดหมู่ Database ของ AWS ครอบคลุม database service ทุกประเภท ทั้ง relational, NoSQL, in-memory, graph และ time-series


Amazon RDS (Relational Database Service)

คืออะไร: Managed relational database service รองรับ MySQL, PostgreSQL, MariaDB, Oracle, SQL Server และ Aurora

ราคา:

  • db.t3.micro: $0.017/ชั่วโมง ($12/เดือน)
  • db.t3.medium: $0.068/ชั่วโมง ($49/เดือน)
  • Storage: $0.115/GB/เดือน (gp2)
  • Free Tier: db.t2.micro 750 ชั่วโมง/เดือน (1 ปีแรก)

เหมาะสำหรับ:

  • Web application ที่ใช้ SQL database
  • OLTP workloads (e-commerce, ERP)
  • ต้องการ automated backup, patching, failover

Use Case ตัวอย่าง:

แอป Node.js ใช้ RDS PostgreSQL แบบ Multi-AZ ช่วย failover อัตโนมัติภายใน 60 วินาทีเมื่อ primary instance มีปัญหา ลด downtime จากที่เคยต้องทำเองหลายชั่วโมง


Amazon Aurora

คืออะไร: AWS database engine ที่ compatible กับ MySQL และ PostgreSQL แต่เร็วกว่า MySQL ถึง 5 เท่า และ PostgreSQL ถึง 3 เท่า

ราคา:

  • db.r5.large: ~$0.29/ชั่วโมง
  • Storage: $0.10/GB/เดือน (จ่ายเฉพาะที่ใช้จริง)
  • Aurora Serverless v2: $0.12/ACU-hour

เหมาะสำหรับ:

  • High-traffic web application
  • SaaS ที่ต้องการ performance สูง
  • Global application (Aurora Global Database)

Use Case ตัวอย่าง:

Platform ที่มี user 10 ล้านคน ย้ายจาก RDS MySQL มา Aurora MySQL ได้ throughput เพิ่ม 3 เท่า โดยแทบไม่ต้องเปลี่ยน code เลย


Amazon DynamoDB

คืออะไร: Fully managed NoSQL database แบบ key-value และ document ที่ scale ได้ไม่จำกัด latency ต่ำกว่า 10ms

ราคา:

  • On-Demand: $1.25/million write, $0.25/million read
  • Provisioned: $0.00065/WCU-hour, $0.00013/RCU-hour
  • Storage: $0.25/GB/เดือน
  • Free Tier: 25 GB storage + 25 WCU + 25 RCU ตลอดชีพ

เหมาะสำหรับ:

  • Gaming leaderboards
  • Session management
  • Shopping carts
  • Real-time data และ IoT

Use Case ตัวอย่าง:

เกม mobile ใช้ DynamoDB เก็บ player profile และ game state รองรับ 1 ล้าน concurrent players โดยไม่ต้องจัดการ database infrastructure เลย


Amazon ElastiCache

คืออะไร: Managed in-memory caching service รองรับ Redis และ Memcached ช่วยลด latency ของ database

ราคา:

  • cache.t3.micro (Redis): $0.017/ชั่วโมง ($12/เดือน)
  • cache.r6g.large: ~$0.166/ชั่วโมง
  • Free Tier: cache.t2.micro 750 ชั่วโมง/เดือน (1 ปีแรก)

เหมาะสำหรับ:

  • Database query caching
  • Session storage
  • Real-time analytics
  • Rate limiting

Use Case ตัวอย่าง:

E-commerce เพิ่ม ElastiCache Redis หน้า RDS: product listing queries ที่เคยใช้เวลา 200ms ลดเหลือ 2ms หลัง cache ร้อยละ 90 ของ traffic ลด load บน RDS ได้มาก


Amazon Redshift

คืออะไร: Cloud data warehouse สำหรับ analytical queries ขนาดใหญ่ ประมวลผล petabyte data ได้รวดเร็ว

ราคา:

  • dc2.large: $0.25/node/ชั่วโมง
  • ra3.xlplus: $0.65/node/ชั่วโมง
  • Redshift Serverless: $0.375/RPU-hour

เหมาะสำหรับ:

  • Business Intelligence (BI) และ reporting
  • Data analytics ขนาดใหญ่
  • ETL และ data pipeline

Use Case ตัวอย่าง:

บริษัท Retail วิเคราะห์ sales data 5 ปีย้อนหลัง (10 TB) ใน Redshift สร้าง dashboard ใน Tableau แสดง trend รายชั่วโมง query ที่เคยใช้เวลา 30 นาทีใน MySQL เสร็จใน 30 วินาที


Amazon Neptune

คืออะไร: Fully managed graph database รองรับ Gremlin และ SPARQL สำหรับ relationship-heavy data

ราคา:

  • db.r5.large: ~$0.348/ชั่วโมง
  • Storage: $0.10/GB/เดือน

เหมาะสำหรับ:

  • Social network (friend relationships)
  • Fraud detection
  • Knowledge graph
  • Recommendation engine

Use Case ตัวอย่าง:

ระบบ fraud detection ของธนาคารใช้ Neptune วิเคราะห์ความสัมพันธ์ระหว่าง account, IP, device และ transaction ตรวจจับ fraud ring ที่ใช้หลาย account ได้รวดเร็ว


Amazon DocumentDB

คืออะไร: Managed document database ที่ compatible กับ MongoDB API เหมาะสำหรับ JSON document storage

ราคา:

  • db.r5.large: ~$0.277/ชั่วโมง
  • Storage: $0.10/GB/เดือน

เหมาะสำหรับ:

  • Content management systems
  • User profiles และ catalog data
  • Mobile backend

Use Case ตัวอย่าง:

แอปจัดการเนื้อหา เก็บ article content เป็น JSON ใน DocumentDB ใช้ MongoDB driver เดิมได้เลย แต่ได้ความ reliable ของ AWS managed service


Amazon Timestream

คืออะไร: Time-series database สำหรับข้อมูลที่มี timestamp เช่น metrics, sensor data, log data

ราคา:

  • Write: $0.50/million records
  • Memory store: $0.036/GB-hour
  • Magnetic store: $0.03/GB/เดือน

เหมาะสำหรับ:

  • IoT sensor data
  • Application metrics
  • DevOps monitoring
  • Financial data

Use Case ตัวอย่าง:

บริษัทผลิตรถ EV เก็บข้อมูล sensor จาก 100,000 คัน ทุก 5 วินาที ใน Timestream วิเคราะห์ battery performance และ predict maintenance ล่วงหน้าได้