AWS Learning
End User Computing

Amazon WorkSpaces

DaaS (Desktop as a Service), Virtual Desktops, Personal/Pools, PCoIP/DCV Protocols

1. Tổng quan

Amazon WorkSpaces là dịch vụ Desktop as a Service (DaaS) fully managed, cho phép bạn cung cấp virtual desktops trên cloud cho users, thay thế desktop vật lý hoặc VDI on-premises.

Tại sao cần WorkSpaces?

Vấn đề truyền thống (On-premises VDI)Giải pháp với WorkSpaces
Phải mua và quản lý hardwareFully managed - AWS lo hạ tầng
Khó scale khi thêm nhân viênScale nhanh - provision trong vài phút
Upfront cost caoPay-as-you-go - trả theo tháng hoặc giờ
Phải patch OS, update securityAWS managed updates và patches
Khó support remote workersAccess từ mọi nơi - chỉ cần internet
Phức tạp khi deploy globallyMulti-Region deployment
┌─────────────────────────────────────────────────────────────────────────────┐
│                          Amazon WorkSpaces                                  │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  ┌──────────────────────────────────────────────────────────────────────┐   │
│  │                    Desktop as a Service (DaaS)                       │   │
│  │                                                                      │   │
│  │   Users access virtual desktops from ANY device, ANYWHERE            │   │
│  │   → Laptop, Tablet, iPad, Zero Client, Chromebook, Web Browser       │   │
│  └──────────────────────────────────────────────────────────────────────┘   │
│                                                                             │
│  Supported OS:                                                              │
│  ┌────────────┐ ┌────────────┐ ┌────────────┐ ┌────────────┐                │
│  │ Windows 10 │ │ Windows 11 │ │ Amazon     │ │ Ubuntu     │                │
│  │            │ │            │ │ Linux 2    │ │            │                │
│  └────────────┘ └────────────┘ └────────────┘ └────────────┘                │
│                                                                             │
│  Access via:                                                                │
│  ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐           │
│  │ Windows  │ │ macOS    │ │ Linux    │ │ iPad     │ │ Web      │           │
│  │ Client   │ │ Client   │ │ Client   │ │ Client   │ │ Browser  │           │
│  └──────────┘ └──────────┘ └──────────┘ └──────────┘ └──────────┘           │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

2. Kiến trúc

┌─────────────────────────────────────────────────────────────────────────────┐
│                       WorkSpaces Architecture                               │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│   User Devices                        AWS Cloud                             │
│   ┌──────────┐                                                              │
│   │ Laptop   │ ──┐                                                          │
│   └──────────┘   │                                                          │
│   ┌──────────┐   │    ┌───────────┐    ┌─────────────────────────────┐      │
│   │ Tablet   │ ──┼──► │ Internet  │──► │  WorkSpaces Gateway         │      │
│   └──────────┘   │    │ / VPN     │    │  (Authentication)           │      │
│   ┌──────────┐   │    └───────────┘    └────────────┬────────────────┘      │
│   │ Browser  │ ──┘                                  │                       │
│   └──────────┘                                      ▼                       │
│                                        ┌─────────────────────────────┐      │
│                                        │        Your VPC             │      │
│                                        │                             │      │
│                                        │   ┌─────────────────────┐   │      │
│                                        │   │  Directory Service   │  │      │
│                                        │   │  (AD / Simple AD)   │   │      │
│                                        │   └─────────┬───────────┘   │      │
│                                        │             │               │      │
│                                        │   ┌─────────▼───────────┐   │      │
│                                        │   │    WorkSpaces        │  │      │
│                                        │   │  ┌─────┐ ┌─────┐    │   │      │
│                                        │   │  │ WS1 │ │ WS2 │    │   │      │
│                                        │   │  └─────┘ └─────┘    │   │      │
│                                        │   │  ┌─────┐ ┌─────┐    │   │      │
│                                        │   │  │ WS3 │ │ WS4 │    │   │      │
│                                        │   │  └─────┘ └─────┘    │   │      │
│                                        │   └─────────────────────┘   │      │
│                                        │                             │      │
│                                        └─────────────────────────────┘      │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

Key Components

ComponentMô tả
WorkSpaces GatewayEntry point, handles authentication
Directory ServiceUser identity (AD Connector, Simple AD, Managed AD)
WorkSpace InstanceVirtual desktop chạy trong VPC
Root Volume (C:)OS và applications (EBS)
User Volume (D:)User data và profile (EBS)
ENI2 ENIs: 1 cho management, 1 cho user traffic

3. WorkSpaces Personal vs Pools

┌──────────────────────────────────────────────────────────────────────────────┐
│                     WorkSpaces Types                                         │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│  ┌───────────────────────────────────┐  ┌─────────────────────────────────┐  │
│  │  🖥️  WorkSpaces PERSONAL          │  │  👥 WorkSpaces POOLS            │  │
│  │  ───────────────────────────────  │  │  ─────────────────────────────  │  │
│  │                                   │  │                                 │  │
│  │  • 1 user = 1 dedicated desktop   │  │  • Shared pool of desktops      │  │
│  │  • PERSISTENT storage             │  │  • NON-PERSISTENT storage       │  │
│  │  • Cài đặt apps, lưu files        │  │  • Reset sau mỗi session        │  │
│  │  • Personalized settings          │  │  • Giống nhau cho mọi user      │  │
│  │                                   │  │                                 │  │
│  │  Best for:                        │  │  Best for:                      │  │
│  │  → Developers                     │  │  → Call center agents           │  │
│  │  → Knowledge workers              │  │  → Task workers                 │  │
│  │  → Long-term employees            │  │  → Seasonal/temporary staff     │  │
│  │  → Power users                    │  │  → Shared workstations          │  │
│  └───────────────────────────────────┘  └─────────────────────────────────┘  │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘
FeaturePersonalPools
Persistence✅ Persistent (data lưu lại)❌ Non-persistent (reset mỗi session)
Dedication1:1 (1 user = 1 desktop)N:M (nhiều users share pool)
CustomizationCao (cài app, save settings)Thấp (standard image)
CostCao hơnThấp hơn (efficient resource use)
Auto Stop✅ Stop khi không dùngN/A (pool scales down)
Use caseFull-time employeesPart-time, seasonal, task workers

4. Bundle Types

Bundle = combination of compute, memory, storage được pre-configured.

BundlevCPUMemoryStorageUse Case
Value12 GB10 GB root + 10 GB userLight tasks, browsing
Standard24 GB80 GB root + 50 GB userOffice apps, email
Performance28 GB80 GB root + 100 GB userBusiness apps, development
Power416 GB175 GB root + 100 GB userData analysis, engineering
PowerPro832 GB175 GB root + 100 GB userHeavy workloads
Graphics.g4dn416 GB100 GB root + 100 GB user3D modeling, video editing
GraphicsPro.g4dn1664 GB100 GB root + 100 GB userGPU-intensive apps

Storage có thể customize. Root volume (OS) và User volume (data) là EBS volumes riêng biệt, cho phép snapshot và restore độc lập.


5. Streaming Protocols

WorkSpaces hỗ trợ 2 giao thức streaming:

ProtocolPCoIPDCV (NICE Desktop Cloud Visualization)
Developed byTeradiciNICE (AWS)
Best forGeneral desktop, videoHigh-performance graphics, GPU
UDP support✅✅
Bidirectional video❌✅ (webcam, video calls)
Network toleranceTốtTốt hơn (higher loss/latency tolerance)
Web Access✅✅
Linux support❌✅
RecommendationLegacy workloadsRecommended cho mới

DCV là protocol được khuyến nghị cho các deployments mới vì hiệu suất tốt hơn, hỗ trợ webcam/video calls, và tolerance cao hơn với network issues.


6. Directory Integration

WorkSpaces BẮT BUỘC phải kết nối với một directory service để quản lý user identity.

┌──────────────────────────────────────────────────────────────────────────────┐
│                      Directory Options                                       │
├──────────────────────────────────────────────────────────────────────────────┤
│                                                                              │
│  Option 1: Simple AD (AWS Managed)                                           │
│  ┌──────────────────────────────────────────────┐                            │
│  │  • Standalone directory by AWS               │                            │
│  │  • Small: ≤ 500 users | Large: ≤ 5,000 users │                            │
│  │  • Best for: Small orgs, không có AD sẵn     │                            │
│  │  • ⚠️ Không support MFA, trusts              │                            │
│  └──────────────────────────────────────────────┘                            │
│                                                                              │
│  Option 2: AD Connector                                                      │
│  ┌──────────────────────────────────────────────┐                            │
│  │  • Proxy tới on-premises Active Directory    │                            │
│  │  • Không lưu data trên AWS                   │                            │
│  │  • Best for: Có AD on-prem sẵn, hybrid       │                            │
│  │  • ✅ Support MFA qua RADIUS                 │                            │
│  └──────────────────────────────────────────────┘                            │
│                                                                              │
│  Option 3: AWS Managed Microsoft AD                                          │
│  ┌──────────────────────────────────────────────┐                            │
│  │  • Full Microsoft AD trên AWS                │                            │
│  │  • Trust relationship với on-prem AD         │                            │
│  │  • Best for: Enterprise, cần full AD features│                            │
│  │  • ✅ Support MFA, Group Policies, Trusts    │                            │
│  └──────────────────────────────────────────────┘                            │
│                                                                              │
└──────────────────────────────────────────────────────────────────────────────┘

7. Security

7.1. Encryption

DataEncryption
In-transitAES-256 (PCoIP/DCV protocol)
Root volume (EBS)✅ KMS encryption available
User volume (EBS)✅ KMS encryption available
Data dùng AWS owned key hoặc customer managed CMK✅

7.2. Network Security

┌─────────────────────────────────────────────────────────────────────────────┐
│                        Network Security                                     │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  • WorkSpaces nằm trong VPC → Security Groups áp dụng                       │
│  • IP Access Control Groups: whitelist client IP ranges                     │
│  • Có thể restrict clipboard, file transfer, printing                       │
│  • MFA support (RADIUS)                                                     │
│  • Smart card authentication (CAC/PIV)                                      │
│  • Certificate-based authentication                                         │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

7.3. Access Controls

FeatureMô tả
Clipboard redirectionEnable/disable copy-paste giữa local ↔ WorkSpace
File transferEnable/disable transfer files giữa local ↔ WorkSpace
PrintingLocal printing từ WorkSpace
Drive redirectionMap local drives vào WorkSpace
Time-based accessRestrict access theo giờ làm việc

8. Multi-Region Resilience

┌─────────────────────────────────────────────────────────────────────────────┐
│                    Multi-Region Resilience                                  │
├─────────────────────────────────────────────────────────────────────────────┤
│                                                                             │
│  Primary Region (ap-southeast-1)     Standby Region (ap-northeast-1)        │
│  ┌─────────────────────────────┐     ┌─────────────────────────────┐        │
│  │                             │     │                             │        │
│  │   ┌─────┐  ┌─────┐         │     │   ┌─────┐  ┌─────┐           │        │
│  │   │ WS1 │  │ WS2 │  ACTIVE │     │   │ WS1'│  │ WS2'│ STANDBY   │        │
│  │   └─────┘  └─────┘         │     │   └─────┘  └─────┘           │        │
│  │   ┌─────┐  ┌─────┐         │     │   ┌─────┐  ┌─────┐           │        │
│  │   │ WS3 │  │ WS4 │         │     │   │ WS3'│  │ WS4'│           │        │
│  │   └─────┘  └─────┘         │     │   └─────┘  └─────┘           │        │
│  │                             │     │                             │        │
│  └─────────────────────────────┘     └─────────────────────────────┘        │
│                                                                             │
│  Khi primary region gặp sự cố → Failover sang standby region                │
│  • Chỉ cho WorkSpaces Personal                                              │
│  • User data được sync cross-region                                         │
│                                                                             │
└─────────────────────────────────────────────────────────────────────────────┘

9. Pricing

9.1. Pricing Models

ModelCách tínhBest for
MonthlyFixed rate/tháng (luôn bật)Full-time users dùng > 80h/tháng
HourlySmall fixed monthly fee + $/giờ sử dụngPart-time, < 80h/tháng
Pools$/user/tháng + $/giờ streamingShared, non-persistent desktops

9.2. Pricing Examples (US East - Virginia)

BundleMonthlyHourly (Monthly fee + /hour)
Value~$21/tháng$7.25/tháng + $0.17/giờ
Standard~$35/tháng$9.75/tháng + $0.30/giờ
Performance~$48/tháng$11.25/tháng + $0.46/giờ
Power~$78/tháng$13.00/tháng + $0.80/giờ
Graphics~$53/tháng$14.00/tháng + $1.92/giờ
  • Prices chưa bao gồm Windows RDS SAL (thêm ~$4.19/user/tháng nếu dùng Windows)
  • AutoStop (hourly mode): WorkSpace auto-stop sau khoảng thời gian idle → tiết kiệm chi phí
  • Giá có thể thay đổi, check AWS Pricing Page để biết giá mới nhất

10. So sánh với các dịch vụ khác

FeatureAmazon WorkSpacesAmazon AppStream 2.0EC2 + RDP
LoạiFull Desktop (DaaS)Application StreamingSelf-managed desktop
Persistence✅ (Personal)❌ Non-persistent✅
User experienceFull Windows/Linux desktopChỉ app cụ thểFull desktop
ManagementFully managedFully managedSelf-managed
DirectoryBắt buộc (AD)OptionalTùy bạn
ScalingManual (add WorkSpaces)Auto scaleManual
Cost modelMonthly/Hourly per userPer user streaming hourPer instance
Best forRemote workforce, VDI replacementDeliver specific appsDev/test, custom needs

WorkSpaces = cung cấp FULL DESKTOP cho users AppStream 2.0 = chỉ stream SPECIFIC APPLICATIONS (không cần full desktop)

Đề thi hay hỏi phân biệt 2 dịch vụ này!


11. Exam Tips

  1. WorkSpaces = managed DaaS, thay thế VDI on-premises → chọn khi đề nói "virtual desktops for remote workers"
  2. WorkSpaces vs AppStream 2.0: WorkSpaces = full desktop, AppStream = chỉ streaming apps cụ thể
  3. WorkSpaces Personal = persistent, Pools = non-persistent (cost-effective cho task workers)
  4. Directory bắt buộc: Simple AD, AD Connector, hoặc AWS Managed AD
  5. Protocols: PCoIP và DCV - DCV là recommended cho deployments mới
  6. Pricing: Monthly (full-time) vs Hourly (part-time) - AutoStop giúp tiết kiệm
  7. Khi đề nói "securely access desktops from anywhere" hoặc "cloud-based virtual desktops" → WorkSpaces
  8. Multi-Region Resilience cho DR scenario - chỉ cho WorkSpaces Personal
  9. WorkSpaces chạy trong VPC của bạn → áp dụng Security Groups, NACLs
  10. Encryption at rest (KMS) và in transit (AES-256) đều supported

12. Tài liệu tham khảo

On this page