Three AWS services cover day-to-day operations: CloudWatch for metrics, logs, and alarms, CloudFormation for defining infrastructure as templates, and Systems Manager for managing instances without SSH.

Amazon CloudWatch

CloudWatch collects metrics, logs, and traces and provides alarms, dashboards, and automated actions. An alarm only ever watches a metric, never a log or a trace, so alarming on a log pattern needs a metric filter in between.1

flowchart LR
    accTitle: From logs to a CloudWatch alarm
    accDescr: Logs can be queried in Logs Insights, but only a metric filter turns a log pattern into a metric, and only metrics can drive alarms, which then trigger actions.
    L[Log group] --> Q[Logs Insights: query only]
    L --> F[Metric filter]
    F --> M[Metric]
    M --> A[Alarm]
    A --> Act[SNS, Auto Scaling, Systems Manager]

Concepts

  • AWS services publish metrics automatically; you add custom metrics; standard metrics are kept 15 months.
  • Logs Insights queries in SQL or PPL; subscription filters stream logs elsewhere.
  • The CloudWatch agent adds OS-level metrics (memory, disk) from EC2 and on-premises.
  • Application Signals with SLOs, Synthetics canaries, RUM, Container/Lambda/Database Insights, and native OTLP ingestion.1

Troubleshooting

SymptomCheck
No instance metricsAgent running; role allows cloudwatch:PutMetricData
Alarm not firingMetric name, namespace, period; state not INSUFFICIENT_DATA
High costCustom metric volume, log ingestion, detailed monitoring

As tabled in the note.1

AWS CloudFormation

CloudFormation provisions AWS resources from YAML or JSON templates as one unit, a stack, resolving dependencies. Every update is really “compute a change set, then execute it”; the change set exists so the diff can be reviewed first, and skipping to update-stack removes only that review.2

Concepts

  • Stacks, stack sets (many accounts and Regions), nested stacks, drift detection.
  • Templates up to 51,200 bytes inline, 1 MB from S3.2

Practices

  • Review change sets for production; set DeletionPolicy and UpdateReplacePolicy on stateful resources.
  • Parameters and Secrets Manager references instead of hard-coded values; be deliberate with CAPABILITY_IAM.
  • Separate stacks by lifecycle (network, data, application) and run drift detection.2

Troubleshooting

SymptomCheck
Create fails and rolls backdescribe-stack-events: the first CREATE_FAILED is the root cause
IAM resource errors--capabilities CAPABILITY_NAMED_IAM
Cross-stack dependency errorsOutput names and Fn::ImportValue

As tabled in the note.2

AWS Systems Manager

Systems Manager operates nodes at scale across AWS, on-premises, and other clouds. Nodes running the SSM Agent register as managed nodes, and tools act on them without logging in.

ToolPurpose
Run CommandCommands on many nodes without SSH or RDP
Session ManagerAudited shells with no inbound ports or bastions
Patch ManagerPatch baselines and compliance
AutomationRunbooks (SSM documents) for tasks and remediation
Parameter StoreVersioned configuration; SecureString with KMS
State Manager, Inventory, OpsCenterDesired state, metadata, operational issues

As listed in the note.3

Practices

  • Give nodes a role with AmazonSSMManagedInstanceCore; prefer Session Manager to SSH and record sessions.
  • Restrict SendCommand and StartSession with IAM and SCPs.3

Troubleshooting

SymptomCheck
Node not managedAgent running, instance role, outbound access to SSM endpoints
Session won’t startSession Manager config, IAM, SSM VPC endpoint or NAT
Patching not appliedBaseline, maintenance window, registration

As tabled in the note.3

Footnotes

  1. Amazon CloudWatch - Runbook & Reference, original ↩ ↩2 ↩3

  2. AWS CloudFormation - Runbook & Reference, original ↩ ↩2 ↩3 ↩4

  3. AWS Systems Manager - Runbook & Reference, original ↩ ↩2 ↩3