Monitoring & Governance
Monitoring, auditing and compliance on AWS, the difference between CloudWatch, CloudTrail and AWS Config, a load balancer example, and the map of this group.
Three questions, three services
Running workloads on AWS means answering three kinds of question:
- Monitoring: is it healthy and fast? Is something about to break?
- Auditing: who did what, and when?
- Compliance: is every resource configured the way the organization's rules say?
- CloudWatch:
- performance monitoring (metrics, CPU, network…) and dashboards;
- events and alerting;
- log aggregation and analysis.
- CloudTrail:
- records API calls made within the account by everyone;
- trails can be defined for specific resources;
- a global service.
- AWS Config:
- records configuration changes;
- evaluates resources against compliance rules;
- gives a timeline of changes and compliance.
Example: an Elastic Load Balancer
- CloudWatch:
- monitor the incoming connections metric;
- visualize error codes as a percentage over time;
- build a dashboard of the load balancer's performance.
- Config:
- track the security group rules of the load balancer;
- track its configuration changes;
- make sure an SSL certificate is always assigned to it (a compliance rule).
- CloudTrail:
- track who made changes to the load balancer, with which API calls.
In this group
CloudWatch metrics
Metrics, dimensions, custom metrics, metric streams.
CloudWatch Logs
Log groups, Logs Insights, export, subscriptions, agents.
CloudWatch alarms
Alarm states, targets, composite alarms, EC2 recovery.
CloudWatch Insights
Container, Lambda, Contributor and Application Insights.
AWS CloudTrail
API history, event types, Insights, retention.
AWS Config
Configuration history, compliance rules, remediation.
AWS CloudFormation
Infrastructure as code, service roles, StackSets.
AWS Systems Manager
Session Manager, Run Command, patching, automation.
AWS X-Ray
Distributed tracing for applications.
AWS Health Dashboard
AWS service events that affect the account.
Service Catalog, Proton, License Manager
Approved products, platform templates, licences.
Managed Grafana and Prometheus
Open-source monitoring, managed.
EventBridge (formerly CloudWatch Events) is in the Application Integration group.
Exam tips
- "Monitor performance", "metrics", "alarm when CPU is high", "logs" → CloudWatch.
- "Who deleted the resource?", "audit API calls" → CloudTrail.
- "Is the resource compliant?", "track configuration changes over time" → AWS Config.
Common traps
- "CloudTrail shows CPU usage." CloudTrail records API calls; metrics are in CloudWatch.
- "Config blocks non-compliant changes." Config detects and reports (and can remediate); it doesn't prevent. To prevent, use IAM or SCPs.
AWS documentation
SageMaker AI and Personalize
Amazon SageMaker AI for building, training and deploying custom machine learning models, the ML process in a simple example, and Amazon Personalize for real-time recommendations.
CloudWatch metrics
CloudWatch metrics, namespaces and dimensions, standard and high resolution, how long data is kept, custom metrics, dashboards, and metric streams to Firehose and third-party tools.