AWS Assignment– 8
Monitoring, Logging & Alerts for DevOps Learners
Basic Questions
- Use Terraform to create a CloudWatch metric alarm for build failures in CodeBuild.
- Configure a CloudWatch dashboard to monitor pipeline execution time in CodePipeline.
- Stream CodeBuild logs to CloudWatch Logs automatically.
- Configure CloudWatch custom metrics for Jenkins running on EC2.
- Write a CloudFormation template to create an SNS topic and link it to a CloudWatch alarm.
- Use CloudWatch Events (EventBridge) to trigger a Lambda function when a pipeline stage fails.
- Configure a metric alarm for ECS service CPUReservation metric.
- Enable CloudWatch Application Insights for a deployed .NET or Java app.
- Create CloudWatch alarms for RDS database free storage space.
- Build a CloudWatch dashboard to track Auto Scaling activity.
- Configure a CloudTrail trail to exclude data events but capture management events.
- Use CloudTrail to track IAM policy changes and send to CloudWatch Logs.
- Write a CloudFormation template to automatically enable CloudTrail in all regions.
- Create a CloudTrail event selector for only Lambda function invocations.
- Enable CloudTrail Insights to detect unusual API activity.
- Store CloudTrail logs in S3 and configure lifecycle rules for cost optimization.
- Enable X-Ray tracing in a Lambda function.
- Instrument an API Gateway endpoint with X-Ray tracing.
- Use X-Ray service map to identify bottlenecks in a microservices app.
- Document how DevOps teams use CloudWatch, CloudTrail, and X-Ray differently than sysadmins.
Intermediate Questions
- Automate multi-account CloudWatch dashboards with Terraform.
- Use Terraform to deploy composite alarms that combine multiple metrics (e.g., EC2 CPU + ELB latency).
- Configure a CloudWatch alarm that triggers rollback in CodeDeploy if errors > threshold.
- Use CloudFormation to deploy a CloudWatch Log group with retention policy set to 7 days.
- Configure centralized log aggregation from multiple AWS accounts into a single CloudWatch Logs group.
- Use EventBridge to invoke a Lambda whenever a CloudTrail event detects root user login.
- Create a pipeline that validates Terraform code quality and logs results to CloudWatch.
- Configure CloudWatch alarms to monitor EKS pod failures.
- Deploy Container Insights for ECS with Terraform.
- Set up CloudWatch Contributor Insights to detect top IAM API users.
- Automate CloudTrail creation across all AWS accounts using an Organizations SCP.
- Enable CloudTrail event data stores for compliance auditing.
- Build an Athena table to query CloudTrail logs for unauthorized API calls.
- Configure X-Ray tracing for a service mesh (App Mesh or Istio on EKS).
- Create a CloudWatch Logs Insights query to detect application errors.
- Export CloudWatch Logs to Kinesis Firehose → S3 → Elasticsearch for centralized analysis.
- Configure CloudWatch alarms for Lambda concurrency limits.
- Integrate CloudWatch with PagerDuty or Opsgenie for on-call alerts.
- Automate dashboard deployment with CloudFormation across dev, staging, prod environments.
- Document DevOps incident response workflows with CloudWatch + CloudTrail + X-Ray.
Advanced Questions
- Build a Terraform module for CloudWatch dashboards, alarms, and logs that can be reused across projects.
- Configure cross-account CloudTrail logging into a central security account.
- Write a CloudFormation StackSet to enable CloudTrail + CloudWatch alarms across multiple AWS accounts.
- Build a log analytics pipeline: CloudWatch Logs → Kinesis → S3 → Athena → QuickSight dashboards.
- Automate anomaly detection in CloudWatch for pipeline execution times.
- Implement X-Ray tracing in a microservices app deployed to ECS with App Mesh.
- Configure alarms to trigger automatic scaling policies in ECS based on CloudWatch metrics.
- Use Terraform + GitHub Actions to validate CloudTrail compliance before merging IaC changes.
- Design a centralized monitoring system where CloudWatch collects metrics/logs from multiple accounts & regions, then pushes them to a monitoring account.
- Final Hands-on Project:
- Build multi-account CloudTrail with centralized S3 + CloudWatch Logs
- Enable anomaly detection alarms in CloudWatch for infra + app performance
- Deploy microservices app with X-Ray tracing enabled
- Automate dashboards/alarms with Terraform + CloudFormation
- Integrate alerts with CI/CD pipeline failures
- Document compliance + observability best practices