🎯 ภารกิจ — สาย AWS: สถาปัตยกรรมระดับองค์กร
ลงมือทำจริงในบัญชี AWS หรือ Cloudflare ของคุณ แล้วติ๊กรายการที่ทำได้ครบ ภารกิจที่มีป้าย “บังคับ” ต้องผ่านทุกข้อจึงจะเลื่อนระดับ อย่าลืมลบทรัพยากรที่สร้างเมื่อทำเสร็จ
ภารกิจบังคับ 0/3
Guardrail ชุดแรกของ organization ทดสอบใน sandbox
บังคับสิ่งที่ต้องทำ
ออกแบบโครง OU ขององค์กร (สมมติหรือจริง) แล้วสร้าง OU Sandbox-Lab เขียน SCP baseline (จำกัด region, ห้ามออกจาก org, ห้ามสร้าง IAM user/access key, ห้ามปิด CloudTrail/GuardDuty) แนบกับ OU แล็บ พิสูจน์ด้วยคำสั่งที่ถูก deny จากบัญชี sandbox และตั้งการเข้าใช้ผ่าน IAM Identity Center
คำสั่ง/โค้ดเริ่มต้น
ลองในAWS Console ↗ช่วยเขียน SCP (JSON) สำหรับ AWS Organizations แบบ deny-list ที่ใช้คู่กับ FullAWSAccess: 1) deny ทุก action นอก ap-southeast-1 และ us-east-1 ยกเว้นบริการ global (iam, organizations, sts, route53, cloudfront, support, budgets, ce, sso, kms ฯลฯ) ใช้ NotAction 2) deny organizations:LeaveOrganization 3) deny iam:CreateUser และ iam:CreateAccessKey 4) deny cloudtrail:StopLogging, cloudtrail:DeleteTrail, guardduty:DeleteDetector, guardduty:DisassociateFromMasterAccount ทุกข้อยกเว้น role arn:aws:iam::*:role/OrgPlatformAdmin ด้วย aws:PrincipalArn ตรวจขนาดไม่เกินเพดาน SCP และบอกคำสั่ง aws organizations create-policy / attach-policy ที่ใช้
เช็กลิสต์
ตรวจจับและซ้อมรับมือ access key หลุด
บังคับสิ่งที่ต้องทำ
เปิด GuardDuty และ IAM Access Analyzer ในบัญชีทดลอง ตั้ง EventBridge ส่ง finding severity 7 ขึ้นไปเข้า SNS ทดสอบด้วย sample finding จากนั้นซ้อม tabletop: สร้าง IAM user ทดลองพร้อม access key ใช้คีย์เรียก API 2-3 คำสั่ง แล้วทำตาม playbook กักกัน → สืบใน CloudTrail → กำจัด และเขียน runbook 1 หน้า
คำสั่ง/โค้ดเริ่มต้น
ลองในAWS Console ↗# 1) ตรวจจับ DET=$(aws guardduty list-detectors --query "DetectorIds[0]" --output text) aws events put-rule --name guardduty-high \ --event-pattern '{"source":["aws.guardduty"],"detail-type":["GuardDuty Finding"],"detail":{"severity":[{"numeric":[">=",7]}]}}' # 2) กักกัน (ใช้ access key ID ของ user ทดลอง) aws iam update-access-key --user-name [lab-leaked-user] --access-key-id [AKIA...] --status Inactive aws iam attach-user-policy --user-name [lab-leaked-user] --policy-arn arn:aws:iam::aws:policy/AWSDenyAll # 3) สืบ aws cloudtrail lookup-events --lookup-attributes AttributeKey=AccessKeyId,AttributeValue=[AKIA...] \ --query "Events[].[EventTime,EventName,AwsRegion]" --output tableเช็กลิสต์
พิสูจน์ RTO/RPO ด้วยการกู้จริงและ chaos test
โบนัสสิ่งที่ต้องทำ
เลือกข้อมูลสำคัญ 1 ชุด (DynamoDB หรือ RDS ในบัญชีทดลอง) ตั้ง RTO/RPO เป้าหมาย จำลองการลบข้อมูลผิด แล้วกู้ด้วย PITR หรือ AWS Backup จับเวลาตั้งแต่ตัดสินใจกู้จนแอปชี้ไปข้อมูลที่กู้แล้ว และรัน FIS experiment 1 ครั้งที่มี stop condition เป็น CloudWatch alarm
คำสั่ง/โค้ดเริ่มต้น
ลองในAWS Console ↗ช่วยเขียน runbook การกู้ข้อมูล DynamoDB ด้วย PITR สำหรับทีมของฉัน โดยมี: - ขั้นตอนหาเวลาก่อนเกิดเหตุจาก CloudTrail - คำสั่ง aws dynamodb restore-table-to-point-in-time ไปยังตารางใหม่ - รายการการตั้งค่าที่ต้องตั้งซ้ำหลัง restore (TTL, streams, auto scaling, tags, PITR) - วิธีสลับแอปไปตารางใหม่ (ผ่าน SSM Parameter หรือ env var จาก IaC) - จุดที่ต้องจับเวลาเพื่อเทียบกับ RTO แล้วเขียน FIS experiment template (JSON) ที่ stop EC2 ที่มี tag chaos=ok 2 นาที พร้อม stopConditions เป็น CloudWatch alarm ARN
เช็กลิสต์
Capstone — Design และ Well-Architected review ระบบจริง
บังคับสิ่งที่ต้องทำ
เลือกระบบจริงของคุณ (หรือโจทย์ example-shop ในบท 05) เติม capstone-design-review-template.md ให้ครบ สร้าง workload ใน Well-Architected Tool ตอบทุกเสาตามความจริงวันนี้ สร้าง milestone baseline เขียน ADR 3 ข้อ แผนปรับปรุงที่มีเจ้าของ/วันที่ ประมาณการค่าใช้จ่ายด้วย Pricing Calculator แนบหลักฐานการทดสอบจริงอย่างน้อย 2 อย่าง แล้วสร้าง milestone target หลังปรับสถาปัตยกรรม
คำสั่ง/โค้ดเริ่มต้น
ลองในAWS Console ↗คุณคือ AWS solution architect ที่รีวิวงานอย่างตรงไปตรงมา นี่คือเอกสารออกแบบของฉัน (วางด้านล่าง) ช่วย: 1) ชี้ว่าความต้องการข้อไหนยังไม่เป็นตัวเลข 2) ไล่ 6 เสา Well-Architected หา high risk ที่ฉันอาจมองข้าม พร้อมเหตุผล 3) ท้าทาย ADR แต่ละข้อด้วยทางเลือกที่ถูกกว่าหรือง่ายกว่า 4) บอกว่าส่วนไหน over-engineering เกินทีมและงบ ห้ามเดาตัวเลขราคา ให้บอกว่าต้องไปตรวจที่ Pricing Calculator --- [วางเอกสารออกแบบที่นี่]
เช็กลิสต์