6.3 Patch Manager, Parameter Store vs Secrets Manager & AppConfig

Key Takeaways

  • SSM Patch Manager enforces operating system compliance using Patch Baselines with auto-approval delays, explicit approved/rejected patch lists, and compliance severity thresholds.
  • Patch Groups map instances to distinct patch baselines using the exact tag key 'Patch Group', enabling phased deployment schedules across development, staging, and production fleets.
  • Maintenance Windows orchestrate patching operations with defined Schedule, Duration, and Cutoff parameters, preventing new tasks from initiating as the window nears completion.
  • Parameter Store and AWS Secrets Manager serve distinct architectural roles: Secrets Manager provides native, Lambda-driven automated credential rotation and resource-based cross-account policies, while Parameter Store provides hierarchical, low-cost configuration storage.
  • AWS AppConfig safely deploys dynamic application configurations at runtime, incorporating JSON Schema and Lambda validators, gradual deployment strategies (linear and canary), bake times, and automatic CloudWatch alarm-driven rollbacks.
Last updated: September 2026

SSM Patch Manager: Automated Fleet Patching & Compliance

Maintaining current security patches across heterogeneous operating system fleets is essential for regulatory compliance and vulnerability management. AWS Systems Manager Patch Manager automates the process of scanning, approving, and installing operating system and security patches across Amazon EC2 and hybrid instances at scale.

Patch Baselines: Rules, Approval Delays, and Overrides

A Patch Baseline defines which patches are approved for installation on your managed instances. Systems Manager provides predefined AWS baselines (e.g., AWS-AmazonLinux2DefaultPatchBaseline, AWS-UbuntuDefaultPatchBaseline, AWS-WindowsDefaultPatchBaseline), but enterprise governance typically requires Custom Patch Baselines.

A custom patch baseline consists of four core elements:

  1. Approval Rules: Define criteria for automatic patch approval based on:
    • Product: Operating system release (e.g., Amazon Linux 2023, Ubuntu 22.04, Windows Server 2022).
    • Classification: Patch category (e.g., Security, Bugfix, Enhancement, Recommended).
    • Severity: Vendor severity rating (e.g., Critical, Important, Medium, Low).
  2. Auto-Approval Delay: The number of days to wait after a vendor publishes a patch before it becomes automatically approved (e.g., 7 days). This buffer allows DevOps teams to test patches in development and staging environments before automated production rollout.
  3. Explicit Approved Patches List: Patches explicitly approved regardless of approval rules. Used for emergency zero-day CVE remediation to bypass the 7-day delay.
  4. Explicit Rejected Patches List: Patches explicitly prohibited from installation, even if they match approval rules. Essential for blocking known buggy packages, breaking kernel revisions (e.g., kernel-5.15*), or unvalidated dependencies.
[ Patch Release from Vendor ]
  │
  ├──> Is patch in Rejected List? ───────> YES ──> DO NOT INSTALL (Blocked)
  │      │ (NO)
  ├──> Is patch in Approved List? ───────> YES ──> APPROVE IMMEDIATELY (Zero-Day)
  │      │ (NO)
  └──> Matches Classification & Severity?
         │ (YES)
         └──> Has Auto-Approval Delay Elapsed? (e.g., 7 Days)
                ├── YES ──> APPROVED
                └── NO  ──> PENDING (Wait for delay)

Patch Groups: Associating Instances with Baselines

To apply different patch policies to different environments (e.g., approving patches with a 0-day delay in Development, but a 10-day delay in Production), use Patch Groups:

  • Instances are assigned to a patch group by attaching an EC2 tag with the exact key Patch Group (case-sensitive!). The tag value represents the patch group name (e.g., Web-Production, Database-Staging).
  • In Patch Manager, the patch baseline is registered to that specific patch group name.
  • Cardinality Rule: An instance can belong to only one patch group. A patch baseline can be associated with multiple patch groups, but a patch group can only be registered to one patch baseline per operating system type.

Maintenance Windows: Duration vs. Cutoff Mechanics

Patch installation should not occur during peak traffic hours. Maintenance Windows define scheduled blocks of time during which disruptive tasks (such as package updates and reboots) can execute. A Maintenance Window consists of four structural parameters:

ParameterDefinitionTypical Value
ScheduleA cron or rate expression defining when the window opens (supports time zones).cron(0 2 ? * SUN *) (Sundays at 02:00 UTC)
DurationThe total duration of the maintenance window in hours.4 hours
CutoffThe number of hours before the end of the window when Systems Manager stops scheduling new task invocations.1 hour
Registered Targets & TasksThe target instances (by Patch Group tag or Resource Group) and the registered task (e.g., AWS-RunPatchBaseline).Task: Operation=Install, RebootOption=RebootIfNeeded

[!IMPORTANT] The Duration vs. Cutoff Rule: If a maintenance window has a Duration of 4 hours and a Cutoff of 1 hour, tasks can only initiate during the first 3 hours (02:00 to 05:00). At the 3-hour mark (05:00), the cutoff begins; Systems Manager will not dispatch any new tasks. Currently running tasks are permitted to complete during the final hour until the window closes at 06:00.

Scanning vs. Installing: Compliance Reporting

The AWS-RunPatchBaseline command document accepts an Operation parameter with two modes:

  • Scan: Inspects the instance against the assigned baseline, generates a compliance inventory of installed, missing, and failed patches, and publishes the results to Systems Manager Compliance and AWS Config without modifying installed packages.
  • Install: Resolves approved patches, downloads and installs them, and performs a reboot if RebootOption is set to RebootIfNeeded.
Loading diagram...
AWS AppConfig Deployment, Validation & Automated Rollback Architecture

Systems Manager Parameter Store vs. AWS Secrets Manager

Managing application configuration and sensitive credentials requires choosing between two core AWS services: AWS Systems Manager Parameter Store and AWS Secrets Manager. On the AWS DevOps Professional exam, selecting the correct service depends on specific functional requirements, including automated rotation, cross-account sharing, value size limits, and cost profile.

Comprehensive Decision Matrix

Architectural DimensionSSM Parameter Store (Standard Tier)SSM Parameter Store (Advanced Tier)AWS Secrets Manager
Primary PurposeHierarchical application configuration and simple secretsHigh-throughput application configuration with TTL policiesSensitive secrets, database credentials, API keys with rotation
Storage CostFree (no storage charge)$0.05 per parameter per month$0.40 per secret per month
API Request CostStandard throughput is free$0.05 per 10,000 API requests$0.05 per 10,000 API requests
Max Value Size4 KB8 KB64 KB
Max Parameters / SecretsUp to 10,000 per region/accountUp to 100,000 per region/accountUnlimited secrets
Automated Secret RotationNo native rotation engine (requires custom EventBridge + Lambda)No native rotation engine (requires custom EventBridge + Lambda)Native out-of-the-box rotation via managed Lambda templates
Cross-Account SharingNo resource-based policies; requires IAM role assumptionSupports sharing via AWS RAM, but no resource-based policiesSupports resource-based policies attached directly to secrets
Parameter Policies / TTLNot supportedSupported: Expiration, ExpirationNotification, NoChangeNotificationRotation intervals natively managed
KMS EncryptionPlaintext (String, StringList) or KMS SecureStringPlaintext or KMS SecureStringAlways encrypted via AWS KMS CMK or default key

Automated Rotation Lifecycle in Secrets Manager

The fundamental differentiator between Parameter Store and Secrets Manager is Secrets Manager's native automated rotation engine. When configured (e.g., every 30 days), Secrets Manager invokes a dedicated AWS Lambda rotation function that coordinates a 4-step rotation protocol:

  1. createSecret: The Lambda function generates a new random password and stores it in Secrets Manager under the staging label AWSPENDING. The current production secret remains untouched under AWSCURRENT.
  2. setSecret: The Lambda function connects to the target database (e.g., Amazon RDS Aurora PostgreSQL) using existing superuser credentials and alters the target user's password to match the AWSPENDING credential.
  3. testSecret: The Lambda function opens a fresh connection to the database using the new AWSPENDING credentials to verify that authentication succeeds.
  4. finishSecret: The Lambda function moves the AWSCURRENT version staging label to the newly validated secret version. The previous version receives the label AWSPREVIOUS. This supports rotation without planned downtime when the application refreshes credentials and handles the transition correctly.

Rotation Strategies: Secrets Manager supports Single-User rotation (updating the secret in place, with a momentary authentication blip) and Multi-User rotation (alternating between two user accounts, e.g., user_a and user_b, ensuring 100% uninterrupted zero-downtime database access).

Hierarchical Organization & Dynamic References

Parameter Store uses forward slashes to organize configuration into trees (e.g., /ecommerce/production/database/endpoint). Applications can retrieve entire configuration trees in a single API call using GetParametersByPath with --recursive.

CloudFormation templates can dynamically resolve parameters and secrets without hardcoding sensitive strings or passing parameters as plaintext:

Resources:
  AppDatabase:
    Type: AWS::RDS::DBInstance
    Properties:
      MasterUsername: '{{resolve:ssm:/app/prod/db/user}}'
      MasterUserPassword: '{{resolve:secretsmanager:app/prod/db/creds:SecretString:password}}'

AWS AppConfig: Runtime Configuration & Automated Rollbacks

Traditional application configuration changes (such as toggling feature flags, changing rate limits, or updating routing endpoints) frequently require re-deploying code artifacts or restarting container tasks. AWS AppConfig, a capability of AWS Systems Manager, enables runtime configuration deployment with zero application downtime, automated validation, and safety guardrails.

AppConfig Structural Hierarchy

  1. Application: The logical boundary representing your application (e.g., PaymentService).
  2. Environment: A deployment environment (e.g., Development, Staging, Production).
  3. Configuration Profile: Defines the source and schema of the configuration data. Sources include AppConfig hosted store, SSM Parameter Store, Systems Manager Documents, Amazon S3, or AWS CodeCommit.

Dual-Layer Validation Gates

Before AppConfig deploys a new configuration version, it passes the data through mandatory validation gates to prevent syntax errors or invalid business states from entering production:

  • Syntactic Validators (JSON Schema / YAML Schema): Validates structural formatting, required keys, integer ranges, and regex patterns (e.g., ensuring max_connections is an integer between 1 and 500).
  • Semantic Validators (AWS Lambda Function): Executes programmatic business logic against the new configuration. For example, a Lambda validator can verify that an updated external payment gateway URL responds to health checks before approving the deployment.

Deployment Strategies & Bake Time

An AppConfig Deployment Strategy controls how rapidly the configuration is distributed across the target infrastructure:

  • Growth Type: Linear (distributes fixed percentage increments over time) or Exponential (canary ramp-up).
  • Step Percentage: The percentage of targets that receive the configuration at each interval (e.g., 20%).
  • Deployment Duration: The total time across which the step percentages are applied (e.g., 20 minutes).
  • Bake Time (Soak Time): A mandatory observation period after 100% of the configuration has been deployed (e.g., 15 minutes). AppConfig monitors attached Amazon CloudWatch alarms throughout the entire deployment duration and the bake time.

Automated Rollback via CloudWatch Alarms

You can associate one or more Amazon CloudWatch Alarms (such as HTTP 5xx error rate, synthetic canary failure, or latency spikes) with an AppConfig Environment. If any associated alarm transitions into the ALARM state at any point during deployment or bake time, AppConfig immediately initiates an automated rollback, reverting all clients to the previous known good configuration version.

Client Caching & AWS AppConfig Agent

Applications retrieve configuration via the AWS AppConfig Agent (running as a local sidecar container in Amazon ECS/EKS or local daemon on EC2) or SDK extensions. The agent polls AppConfig periodically, caches configuration locally in memory, and serves data to the application over localhost HTTP with sub-millisecond latency. If the configuration has not changed, AppConfig returns an HTTP 304 Not Modified status, eliminating unnecessary data transfer costs and API throttling.

Test Your Knowledge

An enterprise DevOps team manages 500 Amazon EC2 instances running Amazon Linux 2023 across Development, Staging, and Production environments. Security policy requires that all Critical and Important security patches released by AWS be automatically deployed to Development instances immediately, while Production instances must only receive patches 10 days after release. Furthermore, a specific kernel version (kernel-6.1.99-101) has been identified by quality assurance as causing disk corruption and must be rejected by every automated baseline run across all environments. How should the DevOps engineer configure Systems Manager Patch Manager to enforce this policy?

A
B
C
D
Test Your Knowledge

An organization is building a microservices platform that accesses an Amazon Aurora PostgreSQL database cluster. Corporate security guidelines mandate that the database master password must be rotated every 30 days automatically without requiring application downtime or manual intervention. Additionally, the development team requires storage for over 50,000 non-sensitive runtime feature toggle parameters that are read frequently by microservices. Which architectural approach satisfies these security and scalability requirements most cost-effectively?

A
B
C
D
Test Your Knowledge

A financial services application relies on dynamic configuration parameters deployed at runtime using AWS AppConfig. The operations team needs to roll out an updated configuration profile to their production fleet. The deployment must meet the following safety criteria: changes must be introduced linearly in increments of 20% over a 20-minute period, must be validated against business logic rules before deployment starts, and must be monitored for 15 minutes after 100% rollout. If HTTP 5xx error rates spike at any point during the rollout or monitoring period, the configuration must revert to the previous version automatically. How should the team configure AppConfig to satisfy these requirements?

A
B
C
D