AWS Systems Manager · SSM

Operate a fleet of servers — EC2 and on-premises — without SSH, bastions or key pairs. One agent, one control plane, and a toolbox: shell into a box, run a script across a thousand boxes, patch them on a schedule, and store their config. Almost everything else on this page is a consequence of "the agent is installed and can reach the service".

Vận hành cả một đội server — EC2 và on-premises — không cần SSH, bastion hay key pair. Một agent, một control plane, và một hộp đồ nghề: mở shell vào máy, chạy script trên cả nghìn máy, vá theo lịch, và lưu cấu hình. Gần như mọi thứ còn lại trên trang này là hệ quả của "agent đã cài và kết nối được tới service".

Reach for it / not the right toolKhi nào dùng / khi nào không

Reach for Systems ManagerChọn Systems Manager

  • Anything phrased as "without SSH", "without a bastion host", "without opening port 22", "without managing SSH keys".Bất cứ câu nào có "không SSH", "không bastion host", "không mở port 22", "không quản lý SSH key".
  • Patching at scale on a schedule, with a compliance report at the end.Vá hàng loạt theo lịch, kèm báo cáo tuân thủ cuối cùng.
  • One control plane for EC2 and on-premises / other clouds — the same commands work on both.Một control plane cho EC2 và on-prem / cloud khác — cùng bộ lệnh chạy cho cả hai.
  • Storing config values and secrets that instances and Lambdas read at runtime.Lưu giá trị cấu hình và secret để instance và Lambda đọc lúc chạy.

Not the right toolKhông phải chỗ dùng

  • Creating the infrastructure in the first place → CloudFormation / CDK. SSM manages what already exists.Tạo hạ tầng ngay từ đầu → CloudFormation / CDK. SSM quản cái đã tồn tại.
  • Releasing application versions with rollback → CodeDeploy.Phát hành version ứng dụng có rollback → CodeDeploy.
  • Secrets that must rotate automatically with a database → Secrets Manager, not Parameter Store.Secret phải tự rotate cùng database → Secrets Manager, không phải Parameter Store.
  • Containers and serverless — no OS to manage. SSM's fleet tools are about instances.Container và serverless — không có OS để quản. Bộ công cụ fleet của SSM là cho instance.

How it works — the agent is the whole storyCách hoạt động — tất cả nằm ở agent

SSM never connects to your instance. The agent polls outbound to the SSM service and pulls work down. That single fact explains why there's no inbound port, why a private subnet works fine, and why a broken NAT route silently removes an instance from the console. SSM không bao giờ kết nối vào instance của bạn. Agent poll ra ngoài tới service SSM và kéo việc về. Chỉ một điều đó giải thích vì sao không cần port vào, vì sao private subnet vẫn chạy tốt, và vì sao route NAT hỏng là instance âm thầm biến mất khỏi console.

The Systems Manager service is reached by outbound polling from the SSM Agent running on EC2 instances and on-premises VMs. EC2 instances authenticate with an IAM instance profile and get an i-hyphen instance id; on-premises machines use a hybrid activation and get an mi-hyphen managed node id. Connectivity is either through a NAT gateway or internet gateway, or through VPC interface endpoints for ssm, ssmmessages and ec2messages. AWS Systems Manager the control plane · nothing runs here for you outbound HTTPS only — 443 NAT / IGW · or VPC interface endpoints EC2 instance SSM Agent IAM instance profile: AmazonSSMManagedInstanceCore id: i-… EC2 in a private subnet SSM Agent no public IP needed works via VPC endpoints id: i-… On-premises VM / other cloud SSM Agent registered by a hybrid activation code + id id: mi-…

The agent ships preinstalled on Amazon Linux, recent Ubuntu, Windows Server and macOS AMIs. Everything below — sessions, commands, patching, inventory — is the same agent doing different work.

Agent cài sẵn trên AMI Amazon Linux, Ubuntu gần đây, Windows Server và macOS. Mọi thứ bên dưới — session, command, patching, inventory — vẫn là agent đó làm những việc khác nhau.

"The instance doesn't appear in Fleet Manager""Instance không hiện trong Fleet Manager" Work down this list, in order — it is almost always one of these: 1) the agent isn't installed or isn't running · 2) no IAM instance profile, or it lacks AmazonSSMManagedInstanceCore · 3) no route out — a private subnet with no NAT and no VPC endpoints · 4) the endpoints exist but the wrong ones: you need ssm and ssmmessages for Session Manager, plus ec2messages for Run Command, and their security group must allow 443 inbound from the instances. Rà theo thứ tự này — gần như luôn là một trong số đó: 1) agent chưa cài hoặc không chạy · 2) không có IAM instance profile, hoặc thiếu AmazonSSMManagedInstanceCore · 3) không có đường ra — private subnet không NAT, không VPC endpoint · 4) có endpoint nhưng sai loại: cần ssm và ssmmessages cho Session Manager, thêm ec2messages cho Run Command, và security group của chúng phải mở 443 vào từ các instance.
Skipping the instance profile entirelyBỏ hẳn instance profile Default Host Management Configuration is an account-and-region setting that lets SSM manage every EC2 instance in that region without attaching an instance profile at all — the agent gets credentials through Instance Metadata Service v2 using a service-linked role. Useful when the requirement is "manage all instances without touching each one's IAM". Default Host Management Configuration là thiết lập theo account+region cho phép SSM quản mọi EC2 trong region đó mà không cần gắn instance profile nào — agent lấy credential qua Instance Metadata Service v2 bằng một service-linked role. Hữu ích khi yêu cầu là "quản mọi instance mà không đụng IAM của từng cái".

Session Manager — the answer to "no SSH"Session Manager — đáp án cho "không SSH"

A browser or CLI shell onto the instance, authorised by IAM rather than a key pair. The security group can have zero inbound rules and it still works. Một shell qua trình duyệt hoặc CLI vào instance, cấp quyền bằng IAM thay vì key pair. Security group có thể không có rule inbound nào mà vẫn dùng được.

A user connects through the AWS Console, CLI or SDK to Session Manager, authorised by IAM permissions. Session Manager reaches the EC2 instance which has an IAM instance profile and the SSM agent. Session log data is written to CloudWatch Logs and Amazon S3, and CloudTrail records the StartSession API call. The instance security group needs no inbound rules. CloudWatch Logs Amazon S3 session log data · every keystroke and output Session Manager a capability of SSM EC2 instance SSM Agent + instance profile Security group inbound: — none — User Console · CLI · SDK IAM permissions who may open a session CloudTrail records StartSession

Three audit surfaces, worth separating: IAM decides who may connect and to which instances (tag conditions work here), CloudTrail records that a session started, and session logs capture what was actually typed.

Ba mặt phẳng audit, nên tách rõ: IAM quyết ai được kết nối và vào instance nào (dùng được điều kiện theo tag), CloudTrail ghi lại việc session bắt đầu, và session log lưu những gì thực sự được gõ.

  • Supports Linux, macOS and Windows. Access via the Console, aws ssm start-session, or the Session Manager plugin. Hỗ trợ Linux, macOS và Windows. Truy cập qua Console, aws ssm start-session, hoặc plugin Session Manager.
  • Port forwarding and SSH over SSM are both supported — so "reach an RDS instance in a private subnet from my laptop, without a bastion" is a Session Manager answer, not a bastion answer. Hỗ trợ cả port forwarding và SSH qua SSM — nên "kết nối tới RDS trong private subnet từ laptop, không cần bastion" là đáp án Session Manager, không phải bastion.
  • Session preferences can force KMS encryption of session data, set an idle timeout, restrict the shell profile, and require logging before a session may start. Session preference có thể bắt buộc mã hoá KMS cho dữ liệu session, đặt idle timeout, giới hạn shell profile, và yêu cầu bật logging mới cho mở session.
  • You can deny specific commands at the IAM level and remove the SSH key pairs entirely — the classic "developers must reach production without keys, and every command must be auditable" answer. Có thể chặn lệnh cụ thể ở mức IAM và bỏ hẳn SSH key pair — đáp án kinh điển cho "dev phải vào được production mà không có key, và mọi lệnh phải audit được".

Documents, Run Command & AutomationDocument, Run Command & Automation

A document is SSM's unit of work — JSON or YAML describing steps. Which type of document you write decides which engine runs it. Một document là đơn vị công việc của SSM — JSON hoặc YAML mô tả các bước. Loại document bạn viết quyết định engine nào chạy nó.

Document typeLoại document Runs where / what it's forChạy ở đâu / để làm gì
Command On the instance, by the agent — Run Command. e.g. AWS-RunShellScript, AWS-RunPatchBaseline.Trên instance, do agent chạy — Run Command. vd AWS-RunShellScript, AWS-RunPatchBaseline.
Automation (runbook) In the SSM service, calling AWS APIs — restart an instance, create an AMI, patch and then re-image. Can call Lambda, approvals, other runbooks.Trong service SSM, gọi API AWS — restart instance, tạo AMI, vá rồi tạo lại image. Gọi được Lambda, bước duyệt, runbook khác.
Session Shapes what a Session Manager session may do (e.g. AWS-StartPortForwardingSession).Quy định session Session Manager được làm gì (vd AWS-StartPortForwardingSession).
Policy Tells the agent to keep collecting something — this is how Inventory is gathered.Bảo agent thu thập liên tục thứ gì đó — đây là cách Inventory được thu.
Run Command — the four things to rememberRun Command — bốn thứ cần nhớ No SSH needed. Target instances by instance id, tags, or a resource group. Rate control caps how many run at once (a number or a percentage); error control stops the whole thing after N failures. Output goes to the console, S3 or CloudWatch Logs, every call is an IAM-authorised, CloudTrail-logged API call, and completion can notify SNS. Không cần SSH. Chọn target theo instance id, tag, hoặc resource group. Rate control giới hạn số máy chạy đồng thời (số hoặc phần trăm); error control dừng toàn bộ sau N lỗi. Output ra console, S3 hoặc CloudWatch Logs, mọi lời gọi đều là API có IAM và ghi CloudTrail, và khi xong có thể báo qua SNS.

Worked example — act before an ASG kills an instanceVí dụ — hành động trước khi ASG giết instance

The canonical Automation pattern. A scale-in is about to destroy a machine that still holds logs, or a live user session, or an unfinished job. A lifecycle hook freezes it long enough to do something about that. Pattern Automation kinh điển. Một lần scale-in sắp huỷ máy vẫn còn giữ log, hoặc session người dùng, hoặc job chưa xong. Một lifecycle hook đóng băng nó đủ lâu để xử lý.

An Auto Scaling group with a lifecycle hook puts a terminating instance into the Terminating Wait state. That state change emits an event to EventBridge, which triggers an SSM Automation runbook. The runbook sends a command to the instance to drain its work, then calls CompleteLifecycleAction so the Auto Scaling group finishes the termination. Auto Scaling group with a Lifecycle Hook configured EC2 Terminating: Wait EC2 EC2 EventBridge rule on the hook event SSM Automation runbook 1 · event: Terminating:Wait 2 · trigger 3 · SendCommand — flush logs, drain the queue, deregister 4 · CompleteLifecycleAction let the termination proceed

Same shape works for launch: Pending:Wait lets you install software or warm a cache before the instance is put behind the load balancer.

Cùng khuôn cho lúc launch: Pending:Wait cho phép cài phần mềm hoặc làm nóng cache trước khi instance được đưa vào sau load balancer.

The one that bitesCái dễ dính Step 4 is not optional. A lifecycle hook holds the instance in Terminating:Wait until something calls CompleteLifecycleAction — or until the heartbeat timeout expires (default 1 hour, max 100 hours) and the default action takes over. Forget it and every scale-in stalls for an hour while you keep paying for the instance. Bước 4 không phải tuỳ chọn. Lifecycle hook giữ instance ở Terminating:Wait cho tới khi có ai gọi CompleteLifecycleAction — hoặc tới khi hết heartbeat timeout (mặc định 1 giờ, tối đa 100 giờ) và hành động mặc định được áp dụng. Quên là mỗi lần scale-in treo cả tiếng trong khi vẫn trả tiền cho instance.

Parameter StoreParameter Store

Hierarchical storage for configuration and secrets, with IAM on every path. Values are versioned, and applications fetch them at runtime instead of baking them into an AMI or a container image. Kho lưu cấu hình và secret theo cây phân cấp, IAM áp lên từng đường dẫn. Giá trị có version, và ứng dụng lấy lúc chạy thay vì nhét vào AMI hay container image.

# hierarchy — IAM policies grant on path prefixes
/my-app/dev/db-url
/my-app/dev/db-password        ← SecureString, encrypted with a KMS key
/my-app/prod/db-url
/my-app/prod/db-password

aws ssm get-parameters-by-path --path /my-app/prod --with-decryption

# AWS publishes public parameters too — no more hardcoded AMI ids
/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-default-x86_64
String · StringList plain config — URLs, feature flags, instance sizesconfig thường — URL, feature flag, cỡ instance
SecureString encrypted with KMS; readers need both ssm:GetParameter and kms:Decryptmã hoá bằng KMS; người đọc cần cả ssm:GetParameter lẫn kms:Decrypt
Standard tierTier Standard free · up to 10,000 parameters · 4 KB valuesmiễn phí · tối đa 10.000 parameter · giá trị 4 KB
Advanced tierTier Advanced paid · 100,000 parameters · 8 KB · adds parameter policiestính phí · 100.000 parameter · 8 KB · có thêm parameter policy
Parameter policies (Advanced only)Parameter policy (chỉ Advanced) Attach a TTL to a parameter: Expiration deletes it at a date, ExpirationNotification fires an EventBridge event N days before, NoChangeNotification fires if nobody has updated it in N days. That last one is how you get "nag me if this credential hasn't been rotated in 90 days" without real rotation. Gắn TTL cho parameter: Expiration xoá nó vào một ngày, ExpirationNotification bắn event EventBridge trước N ngày, NoChangeNotification bắn khi không ai sửa trong N ngày. Cái cuối là cách để có "nhắc tôi nếu credential này 90 ngày chưa đổi" mà không cần rotation thật.
Parameter Store Secrets Manager
Automatic rotationTự động rotation no — you'd write it yourselfkhông — phải tự viết built in, with Lambda; native for RDS/Redshift/DocumentDBcó sẵn, dùng Lambda; hỗ trợ thẳng RDS/Redshift/DocumentDB
CostChi phí free at standard tiermiễn phí ở tier standard per secret, per monththeo secret, theo tháng
Cross-account accessTruy cập cross-account via a shared KMS key / assumed rolequa KMS key dùng chung / assume role resource policy on the secretresource policy trên secret
Also stores plain configLưu cả config thường yes — that's its main jobcó — đó là việc chính của nó possible but wastefulđược nhưng lãng phí
Reading them from a templateĐọc từ template CloudFormation resolves both at deploy time: {{resolve:ssm:/my-app/prod/db-url}} and {{resolve:secretsmanager:…}}. Parameter Store can also proxy a Secrets Manager secret via the /aws/reference/secretsmanager/ prefix — one API for code that only knows how to read parameters. CloudFormation giải cả hai lúc deploy: {{resolve:ssm:/my-app/prod/db-url}} và {{resolve:secretsmanager:…}}. Parameter Store cũng có thể proxy một secret của Secrets Manager qua tiền tố /aws/reference/secretsmanager/ — một API duy nhất cho code chỉ biết đọc parameter.

The rest of the toolboxPhần còn lại của hộp đồ nghề

Inventory what's on each machine — OS version, installed apps, patches, network config. Queryable, and exportable to S3 for Athena.có gì trên mỗi máy — version OS, app đã cài, bản vá, cấu hình mạng. Truy vấn được, export ra S3 cho Athena.
State Manager keep instances in a desired state on a schedule — the agent re-applies an association if something drifts.giữ instance ở trạng thái mong muốn theo lịch — agent áp lại association nếu có gì lệch.
Compliance one view of patch and association compliance across the fleet.một màn hình xem tuân thủ patch và association cho cả fleet.
Fleet Manager browse instances, files, logs, users and performance from the console, no shell.xem instance, file, log, user và hiệu năng từ console, không cần shell.
Maintenance Windows schedule + duration + registered targets and tasks — used by patching, but generic.lịch + thời lượng + target và task đăng ký — dùng cho patching, nhưng dùng chung được.
Hybrid activations register on-prem / other-cloud machines; they get mi- ids and behave like EC2.đăng ký máy on-prem / cloud khác; nhận id mi- và hành xử như EC2.
OpsCenter A single place to work OpsItems — issues, events and alerts — instead of chasing them across consoles. Each OpsItem aggregates the context needed to resolve it: AWS Config changes and resource relationships, CloudTrail logs, CloudWatch alarms, and CloudFormation stack information — with Automation runbooks attached to fix it. EventBridge rules and CloudWatch alarms can create OpsItems automatically, which is how an alarm becomes a tracked piece of work rather than an email. Một chỗ duy nhất để xử lý OpsItem — sự cố, sự kiện và cảnh báo — thay vì chạy khắp các console. Mỗi OpsItem gom sẵn ngữ cảnh cần để xử lý: thay đổi và quan hệ tài nguyên từ AWS Config, log CloudTrail, alarm CloudWatch, và thông tin stack CloudFormation — kèm Automation runbook để sửa. Rule EventBridge và CloudWatch alarm tạo OpsItem tự động, nhờ vậy một alarm trở thành công việc được theo dõi thay vì một cái email.
What it costsChi phí The capabilities people study for — Session Manager, Run Command, Patch Manager, Inventory, State Manager, standard parameters — are free. You pay for the Advanced parameter tier, on-premises nodes beyond the free allowance, and high-volume Automation steps. Những phần hay học — Session Manager, Run Command, Patch Manager, Inventory, State Manager, parameter standard — đều miễn phí. Chỉ trả tiền cho tier Advanced của parameter, node on-prem vượt hạn mức miễn phí, và các bước Automation khối lượng lớn.

Patch ManagerPatch Manager

At three servers you SSH in and run yum update. At three hundred that falls apart in four specific ways — and Patch Manager is the answer to all four. It is free. Ba server thì SSH vào chạy yum update. Ba trăm server thì cách đó vỡ theo bốn kiểu rất cụ thể — và Patch Manager trả lời cả bốn. Nó miễn phí.

You can't see the stateKhông nhìn thấy hiện trạng "which of our 400 servers is missing the fix that's on the news?" — with SSH the only way to answer is to log into all of them"trong 400 server, máy nào còn thiếu bản vá đang lên báo?" — với SSH thì cách duy nhất là đăng nhập từng máy
You can't control whatKhông kiểm soát được cái gì yum update takes everything — including the package upgrade that breaks your appyum update lấy tất cả — kể cả bản nâng cấp làm hỏng app của bạn
You can't control whenKhông kiểm soát được lúc nào patches often need a reboot; rebooting production at 2pm on a Tuesday is a bad afternoonbản vá thường phải reboot; reboot production lúc 2 giờ chiều thứ Ba là một buổi chiều tệ
You can't prove it happenedKhông chứng minh được đã làm an auditor asks for evidence the fleet is patched — "trust me" is not evidenceauditor đòi bằng chứng cả fleet đã được vá — "tin tôi đi" không phải bằng chứng

The four words, in plain termsBốn từ khoá, nói cho dễ hiểu

TermThuật ngữ What it actually isThực chất là gì
PatchPatch one vendor update — a yum / apt package version, or a Windows KB… updatemột bản cập nhật của nhà cung cấp — một version package yum / apt, hoặc một bản KB… của Windows
Patch baselinePatch baseline your policy: which patches count as approved — and which are banned outrightchính sách của bạn: bản vá nào được duyệt — và bản nào bị cấm hẳn
Patch groupPatch group a label on machines (the tag Patch Group) so different fleets get different policiesmột nhãn trên máy (tag Patch Group) để các fleet khác nhau nhận chính sách khác nhau
Maintenance WindowMaintenance Window the recurring time slot when disruption is allowedkhung giờ lặp lại mà việc gây gián đoạn được cho phép
ComplianceCompliance the report: per instance — installed, missing, failedbáo cáo: theo từng instance — đã cài, còn thiếu, lỗi

The baseline is the interesting one. It is not "install everything". You say: approve patches classified Security with severity Critical or Important, but only once they have been public for 7 days — and keep a rejected list for the package that breaks your app. Baseline mới là phần thú vị. Nó không phải "cài tất". Bạn nói: duyệt bản vá loại Security mức Critical hoặc Important, nhưng chỉ khi đã công bố được 7 ngày — và giữ một danh sách chặn cho package làm hỏng app của bạn.

A patch baseline defines which patches are approved. A patch group is defined by the tag key Patch Group on instances. A maintenance window defines the schedule and registers both the targets and the task. The registered task is the AWS-RunPatchBaseline Run Command with rate control, which patches the targeted instances and reports patch compliance. Patch baseline which patches are approved classification · severity · delay Patch group which machines — by the tag Patch Group = prod Maintenance Window when — schedule + duration registered targets + tasks AWS-RunPatchBaseline the registered task Linux & Windows · rate control EC2 · on-prem EC2 · on-prem EC2 · on-prem Patch compliance who is missing what

The tag key is literally Patch Group, with a space, and an instance may belong to only one patch group. That's the detail exam questions hinge on.

Tag key đúng là Patch Group, có dấu cách, và một instance chỉ thuộc một patch group. Đó là chi tiết mà câu hỏi thi hay xoáy vào.

Worked example — staged rollout across environmentsVí dụ — triển khai theo tầng qua các môi trường

Three baselines, three patch groups, three different auto-approval delays. Same patch, reaching each environment at a different time. Ba baseline, ba patch group, ba mức trễ auto-approve khác nhau. Cùng một bản vá, tới mỗi môi trường vào thời điểm khác nhau.

Patch Group = dev auto-approval delay 0 days — patched the moment a patch shipsđộ trễ auto-approve 0 ngày — vá ngay khi bản vá ra
Patch Group = staging auto-approval delay 3 daysđộ trễ auto-approve 3 ngày
Patch Group = prod auto-approval delay 7 daysđộ trễ auto-approve 7 ngày
The delay is the designĐộ trễ chính là thiết kế Vendors ship broken patches. Dev installs it on day 0 and breaks. You add that package to the baseline's rejected list on day 1. Prod, at 7 days, never sees it. Dev is the canary — and the rejection lives in configuration where the next engineer can find it, instead of in someone's memory. Nhà cung cấp vẫn phát hành bản vá lỗi. Dev cài ngày 0 và hỏng. Ngày 1 bạn thêm package đó vào danh sách chặn của baseline. Prod, ở mức 7 ngày, không bao giờ thấy nó. Dev là con chim hoàng yến — và quyết định chặn nằm trong cấu hình để kỹ sư sau tìm được, thay vì trong trí nhớ của ai đó.

The two ways you'll actually run itHai cách bạn thực sự sẽ chạy nó

Scan — the fire drilllúc khẩn cấp

  • A critical vulnerability lands. Someone asks "are we exposed?"Một lỗ hổng nghiêm trọng xuất hiện. Có người hỏi "mình có dính không?"
  • Run AWS-RunPatchBaseline with Operation: Scan fleet-wide. It changes nothing — it only reports.Chạy AWS-RunPatchBaseline với Operation: Scan trên cả fleet. Nó không thay đổi gì — chỉ báo cáo.
  • Minutes later: 340 instances fine, 60 missing it. Then Install against just those 60.Vài phút sau: 340 instance ổn, 60 cái còn thiếu. Rồi Install chỉ cho 60 cái đó.

Install — the routinechạy định kỳ

  • Configure once: window every third Saturday 02:00–06:00, targets Patch Group = prod-windows.Cấu hình một lần: window vào thứ Bảy tuần thứ ba, 02:00–06:00, target Patch Group = prod-windows.
  • Rate control 25% at a time, error threshold stop after 5 failures.Rate control 25% mỗi lượt, ngưỡng lỗi dừng sau 5 lỗi.
  • Then you never think about it again — it runs monthly and produces a compliance report each time.Rồi bạn không phải nghĩ tới nữa — nó chạy hàng tháng và mỗi lần cho ra một báo cáo compliance.
  • AWS ships a default baseline per OS that approves security patches after a delay. Build your own when you need to control classification, severity, an auto-approval delay, or an explicit reject list. AWS có sẵn baseline mặc định cho mỗi OS, duyệt bản vá bảo mật sau một khoảng trễ. Tự tạo baseline khi cần kiểm soát classification, severity, độ trễ auto-approve, hoặc danh sách chặn.
  • AWS-RunPatchBaseline takes an Operation: Scan reports what's missing without changing anything; Install patches and may reboot. Scan first is the safe rollout. AWS-RunPatchBaseline nhận tham số Operation: Scan chỉ báo cáo thiếu gì mà không đổi gì; Install vá và có thể reboot. Scan trước là cách triển khai an toàn.
  • A Maintenance Window can run any registered task, not just patching — Run Command, Automation, Lambda, Step Functions. It's the generic "do this in the approved window" scheduler. Maintenance Window chạy được bất kỳ task đăng ký nào, không chỉ patching — Run Command, Automation, Lambda, Step Functions. Nó là bộ lịch chung "làm việc này trong khung giờ được duyệt".
  • Golden-AMI alternative: instead of patching live fleets, use an Automation runbook to launch, patch, snapshot and register a new AMI, then roll it out through the ASG. Trade downtime for immutability. Hướng golden-AMI: thay vì vá fleet đang chạy, dùng Automation runbook để launch, vá, snapshot rồi đăng ký AMI mới, sau đó roll qua ASG. Đánh đổi downtime lấy tính bất biến.

Exam reflexesPhản xạ khi thi

The question says…Đề nói… AnswerTrả lời
"Shell access to private instances without a bastion or SSH keys, fully audited""Truy cập shell vào instance private không bastion, không SSH key, có audit đầy đủ" Session Manager + session logs to S3/CloudWatchSession Manager + session log ra S3/CloudWatch
"Run the same script on 500 instances, a few at a time, stop if too many fail""Chạy cùng script trên 500 instance, vài cái một lần, dừng nếu lỗi quá nhiều" Run Command with rate control + error thresholdRun Command có rate control + ngưỡng lỗi
"Patch monthly during a window and prove compliance to an auditor""Vá hàng tháng trong khung giờ và chứng minh tuân thủ với auditor" Patch Manager: baseline + Patch Group tag + Maintenance Window + patch compliancePatch Manager: baseline + tag Patch Group + Maintenance Window + patch compliance
"Instances in a private subnet with no NAT must still be managed""Instance ở private subnet không NAT vẫn phải quản được" VPC interface endpoints for ssm, ssmmessages, ec2messagesVPC interface endpoint cho ssm, ssmmessages, ec2messages
"Upload logs before Auto Scaling terminates the instance""Đẩy log lên trước khi Auto Scaling huỷ instance" Lifecycle hook → Terminating:Wait → EventBridge → SSM Automation → CompleteLifecycleActionLifecycle hook → Terminating:Wait → EventBridge → SSM Automation → CompleteLifecycleAction
"Store a DB password cheaply; rotation is not required""Lưu password DB rẻ; không cần rotation" Parameter Store SecureString (if it must rotate → Secrets Manager)Parameter Store SecureString (nếu phải rotate → Secrets Manager)
"Which instances are missing a required agent / are on an old OS?""Instance nào thiếu agent bắt buộc / đang chạy OS cũ?" Inventory (+ State Manager to keep it installed)Inventory (+ State Manager để giữ nó được cài)
"Same tooling for EC2 and our datacentre servers""Cùng bộ công cụ cho EC2 và server trong datacenter" Hybrid activations — install the agent, register, get mi- nodesHybrid activation — cài agent, đăng ký, có node mi-