☁️ AWS

Free AWS Certified DevOps Engineer - Professional (DOP-C02) Study Resources

Comprehensive AWS Certified DevOps Engineer - Professional (DOP-C02) hive provides study notes, question bank with practice tests, flashcards, and hands-on labs, all supported by a personal AI tutor to help you master the AWS Certified DevOps Engineer - Professional (DOP-C02) certification.

1,168
Practice Questions
198
Study Notes
851
Flashcards
Start Studying — Free1 learners studying this hive

AWS Certified DevOps Engineer - Professional (DOP-C02) Study Notes & Guides

198 AI-generated study notes covering the full AWS Certified DevOps Engineer - Professional (DOP-C02) curriculum. Showing 10 complete guides below.

Study Guide1,050 words

Mastering AWS Alerting and Automated Remediation

Alert notification and action capabilities (for example, CloudWatch alarms to Amazon SNS, Lambda, EC2 automatic recovery)

Read full article

Mastering AWS Alerting and Automated Remediation

This study guide focuses on the critical DevOps capability of moving from reactive monitoring to proactive, automated response. We will explore how CloudWatch alarms, Amazon EventBridge, SNS, and Lambda work together to create a self-healing infrastructure.

Learning Objectives

After studying this material, you should be able to:

  • Configure CloudWatch alarms with multiple actions (SNS, Lambda, EC2 recovery).
  • Design event-driven architectures using Amazon EventBridge and S3 Event Notifications.
  • Implement automated remediation for system failures and configuration drift.
  • Distinguish between metric-based alerting (CloudWatch) and event-based alerting (EventBridge).
  • Automate incident response for AWS Health events and CodeDeploy failures.

Key Terms & Glossary

  • CloudWatch Alarm: A mechanism that watches a single metric over a specified time period and performs actions based on the value of the metric relative to a threshold.
  • Amazon SNS (Simple Notification Service): A managed pub/sub service used to fan out notifications to endpoints like email, SMS, or Lambda.
  • EventBridge (formerly CloudWatch Events): A serverless event bus that makes it easy to connect applications using data from your own applications, integrated SaaS applications, and AWS services.
  • EC2 Automatic Recovery: A feature that automatically recovers an EC2 instance if it fails a system status check due to hardware issues.
  • Metric Filter: A way to search and match terms or patterns in CloudWatch Logs and turn them into numerical metrics for alerting.

The "Big Idea"

In a professional DevOps environment, monitoring is only half the battle. The "Big Idea" here is Automated Operational Health. Instead of a human responder receiving a page at 3:00 AM to restart a service, the infrastructure identifies the failure (via CloudWatch or EventBridge) and triggers a targeted script (Lambda) or native AWS action (EC2 Recovery) to fix the state. This reduces Mean Time to Repair (MTTR) and ensures consistency across large-scale fleets.

Formula / Concept Box

CloudWatch Alarm Logic

An alarm's state is determined by three variables:

VariableDescription
ThresholdThe numerical value the metric is compared against (e.g., CPU > 80%).
PeriodThe length of time to evaluate the metric (e.g., 60 seconds).
Datapoints to AlarmThe number of data points within a set of evaluation periods that must be breaching (e.g., 3 out of 5).

[!IMPORTANT] For High-Resolution Metrics, you can define periods as short as 1 second or 10 seconds, allowing for much faster reaction times than the standard 1-minute minimum.

Hierarchical Outline

  • I. Metric-Based Alerting (CloudWatch Alarms)
    • Standard Metrics: CPU, Disk, Network, Status Checks.
    • Custom Metrics: Using the CloudWatch Agent to collect RAM usage or application-level logs.
    • Alarm Actions:
      • SNS: Pushing alerts to human operators or Slack.
      • Auto Scaling: Triggering a change in the number of instances.
      • EC2 Recovery: Moving an instance to a new host if the physical hardware fails.
  • II. Event-Based Alerting (Amazon EventBridge)
    • Pattern Matching: Triggering actions based on JSON event patterns (e.g., "Instance State is Terminated").
    • AWS Health Integration: Responding to scheduled maintenance notifications.
    • S3 Event Notifications: Triggering Lambda when a new log file is uploaded to an S3 bucket.
  • III. Automated Remediation
    • AWS Lambda: Running custom code to fix issues (e.g., rebooting a database).
    • AWS Config Rules: Automatically reverting unauthorized security group changes.
    • SSM Automation: Executing runbooks in response to CloudWatch Alarms.

Visual Anchors

CloudWatch Alerting Flow

Loading Diagram...
Figure 1 — Mermaid diagram

EC2 Auto-Recovery vs. Reboot

Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds
Figure 2 — TikZ diagram

Definition-Example Pairs

  • Remediation: The act of fixing a resource that has drifted from its desired state.
    • Example: An AWS Config rule detects a public S3 bucket and triggers a Lambda function to immediately set it to private.
  • Fan-out: A design pattern where a single message is sent to multiple destinations simultaneously.
    • Example: A CloudWatch Alarm triggers an SNS topic, which then sends an email to the team, a message to a Slack Webhook, and triggers a Lambda function to log the incident.
  • Metric Stream: A continuous stream of CloudWatch metrics to a destination like Kinesis Data Firehose.
    • Example: Sending all EC2 metrics to an S3 bucket for long-term historical analysis and compliance auditing.

Worked Examples

Scenario: Automating Slack Notifications for AWS Health Events

The Problem: AWS is performing maintenance on a host. We need to know about it in Slack immediately.

  1. Event Source: AWS Health sends a "Scheduled Maintenance" event to the default EventBridge bus.
  2. EventBridge Rule: Create a rule with an event pattern matching source: aws.health.
  3. Target: Select an AWS Lambda function as the target.
  4. Lambda Code (Python):
    python
    import urllib3 import json def lambda_handler(event, context): url = "https://hooks.slack.com/services/YOUR_WEBHOOK" msg = {"text": f"AWS Health Alert: {event['detail']['eventDescription'][0]['latestDescription']}"} http = urllib3.PoolManager() http.request('POST', url, body=json.dumps(msg), headers={'Content-Type': 'application/json'})
  5. Result: Whenever AWS schedules maintenance, the DevOps team gets a real-time Slack message.

Checkpoint Questions

  1. What is the primary difference between a System Status Check and an Instance Status Check in CloudWatch?
  2. Which service should you use if you want to trigger a response based on a specific API call (e.g., StopInstances) recorded in CloudTrail?
  3. Can an EC2 Auto Recovery action preserve the same Instance ID and Private IP address?
  4. What happens to a CloudWatch Alarm if it doesn't receive data for the specified period?
Click to see answers
  1. System Status Checks monitor AWS infrastructure (hardware); Instance Status Checks monitor your software and network configuration.
  2. Amazon EventBridge (integrating with CloudTrail).
  3. Yes, Auto Recovery preserves Instance ID, Private IP, Elastic IP, and all metadata.
  4. It enters the INSUFFICIENT_DATA state (unless configured otherwise).

Muddy Points & Cross-Refs

  • CloudWatch Alarms vs. EventBridge: Use Alarms for numerical thresholds (CPU > 90%). Use EventBridge for state changes (Instance STOPPED) or specific API events.
  • Standard vs. High-Resolution Metrics: Standard is 1-minute; High-Res is up to 1-second. High-Res is more expensive but crucial for sensitive auto-scaling.
  • Cross-Reference: See "AWS Systems Manager OpsCenter" for how to consolidate these alerts into a single management console.

Comparison Tables

Detection Methods: CloudWatch vs. EventBridge

FeatureCloudWatch AlarmsAmazon EventBridge
Trigger BasisNumerical Thresholds (Metrics)JSON Patterns (Events)
Best ForPerformance monitoring (CPU, Latency)Operational changes (State, API calls)
Latency1 min (Standard) / 10s (High-Res)Near real-time
TargetsSNS, EC2 Actions, Auto ScalingLambda, SQS, SNS, Kinesis, SSM
CostPer AlarmPer Million Events
Study Guide940 words

Study Guide: Analyzing Failed Deployments in AWS

Analyzing failed deployments (for example, AWS CodePipeline, AWS CodeBuild, AWS CodeDeploy, AWS CloudFormation, CloudWatch synthetic monitoring)

Read full article

Analyzing Failed Deployments

This guide covers the critical skills needed to identify, troubleshoot, and remediate failures within the AWS CI/CD ecosystem and infrastructure provisioning, specifically for the AWS Certified DevOps Engineer - Professional (DOP-C02) exam.

Learning Objectives

After studying this module, you should be able to:

  • Identify the specific stage and cause of failure within AWS CodePipeline.
  • Troubleshoot build errors in AWS CodeBuild using CloudWatch Logs.
  • Configure and analyze AWS CodeDeploy rollbacks and health checks.
  • Detect and remediate AWS CloudFormation stack failures and configuration drift.
  • Implement CloudWatch Synthetic Canaries to monitor endpoint health during and after deployments.

Key Terms & Glossary

  • Drift Detection: The process of identifying unmanaged configuration changes in AWS resources that were originally created via CloudFormation.
  • Canary Deployment: A deployment strategy where a small percentage of traffic is shifted to a new version to test stability before full cutover.
  • MinimumHealthyHosts: A CodeDeploy parameter that defines the number of instances that must remain healthy and online during a deployment.
  • Synthetic Canary: Configurable scripts that run on a schedule to monitor endpoints and APIs, mimicking user behavior.
  • Rollback: Automatically returning a resource or application to its previous known-good state upon failure detection.

The "Big Idea"

In a DevOps environment, deployment failure is an expected event. The objective of a DevOps Professional is not just to prevent failure, but to build "resilient delivery"—systems that detect failure instantly via Observability (CloudWatch/X-Ray) and mitigate impact automatically via Automated Rollbacks. The logs and metrics generated during a failure are the primary assets for performing Root Cause Analysis (RCA).

Formula / Concept Box

Deployment Metric/ConfigPurposeLogic
MinimumHealthyHostsCodeDeploy AvailabilityTotal - (Max. Concurrent Update)
Canary10Percent10MinutesTraffic ShiftingShift 10% now; shift remainder in 10m
Fn::ImportValueCross-Stack RefAccesses Export values from other stacks
CloudWatch Metric FilterPattern Matching[ip, user, adapter, log, code=404, size]

Hierarchical Outline

  • AWS CodePipeline Failures
    • Stage Transitions: Identifying if a pipeline is stuck or if transitions are disabled.
    • Inbound Artifacts: Verifying S3 versioning and bucket encryption for artifact consistency.
  • AWS CodeBuild Troubleshooting
    • Buildspec Errors: Validating YAML syntax and phase commands.
    • Environment Issues: Checking VPC connectivity for private resources and IAM service role permissions.
    • Logging: Streaming logs to CloudWatch Logs for real-time debugging.
  • AWS CodeDeploy Analysis
    • Deployment Configurations: Linear, Canary, and AllAtOnce impact on availability.
    • Lifecycle Event Hooks: Troubleshooting BeforeInstall, AfterInstall, and ValidateService scripts.
    • Alarms & Rollbacks: Triggering rollbacks based on CloudWatch Alarm thresholds.
  • AWS CloudFormation Recovery
    • Rollback Configuration: Using OnFailure=ROLLBACK vs. DELETE vs. DO_NOTHING.
    • Termination Protection: Preventing accidental deletion of critical stacks.
  • CloudWatch Monitoring
    • Synthetics: Creating "Canaries" to check for 2xx/3xx responses.
    • Logs Insights: Querying massive log volumes for specific error patterns.

Visual Anchors

Deployment Failure & Recovery Flow

Loading Diagram...
Figure 1 — Mermaid diagram

CloudWatch Synthetic Canary Logic

Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds
Figure 2 — TikZ diagram

Definition-Example Pairs

  • Definition: Lifecycle Event Hook — A specific script or action triggered during a CodeDeploy deployment phase.

  • Example: Using the ValidateService hook to run a curl command against localhost:80. If it fails, CodeDeploy stops the deployment and initiates a rollback.

  • Definition: CloudFormation Drift — When the actual state of a resource deviates from its template definition (e.g., someone manually edited a Security Group rule).

  • Example: Detecting that an EC2 instance type was changed from t3.medium to m5.large via the console, making it out-of-sync with the IaC template.

Worked Examples

Scenario: CodeDeploy Failure on EC2

Problem: A deployment fails at the AllowTraffic stage in an Application Load Balancer (ALB) environment.

Step-by-Step Breakdown:

  1. Check Deployment Logs: Navigate to /opt/codedeploy-agent/deployment-root/ on the instance.
  2. Verify Health Checks: Check the ALB Target Group. If the instance stays in initial or unhealthy, CodeDeploy will time out.
  3. IAM Permissions: Ensure the CodeDeploy service role has elasticloadbalancing:RegisterTargets and Describe* permissions.
  4. Solution: Correct the ValidateService script which was returning a 404 because the application server hadn't finished bootstrapping.

Checkpoint Questions

  1. What happens to a CloudFormation stack by default if one resource fails to create? (Answer: It initiates a ROLLBACK_IN_PROGRESS and deletes created resources).
  2. Which service would you use to find the exact line of code causing a timeout in a distributed microservice? (Answer: AWS X-Ray).
  3. How can you notify a Slack channel when a CodeBuild project fails? (Answer: Create an EventBridge rule for "CodeBuild Build State Change" with a Lambda function target to post to Slack).

Muddy Points & Cross-Refs

  • CodeDeploy vs. CloudFormation Rollbacks: CodeDeploy rolls back to the previous deployment (re-deploying old code). CloudFormation rolls back to the previous stack state (reverting infrastructure changes). They are often used together in a pipeline.
  • Synthetic Canaries vs. Route 53 Health Checks: Route 53 checks are for DNS failover (Is the IP reachable?). Synthetics are for functional testing (Can I log in?).

Comparison Tables

CodeDeploy Deployment Types

FeatureCanaryLinearAll-at-once
Traffic ShiftTwo increments (e.g., 10%, then 90%)Equal increments (e.g., 10% every 1 min)100% immediately
Risk LevelLowLow/MediumHigh
Best Use CaseProduction safetyGradual performance monitoringDev/Test environments
DowntimeNoneNonePotential

[!IMPORTANT] For the exam, always remember that EventBridge is the "glue" for automation. If a task asks for a reactive action (like stopping a pipeline if an alarm fires), EventBridge is likely the answer.

Study Guide1,050 words

Incident Analysis: Troubleshooting Failed Processes in AWS

Analyzing incidents regarding failed processes (for example, auto scaling, Amazon Elastic Container Service [Amazon ECS], Amazon Elastic Kubernetes Service [Amazon EKS])

Read full article

Incident Analysis: Troubleshooting Failed Processes in AWS

This study guide focuses on identifying, analyzing, and remediating failures in automated processes, specifically within Auto Scaling, Amazon ECS, and Amazon EKS. For the DOP-C02 exam, understanding the intersection of CloudWatch, IAM permissions, and service-specific scaling logic is critical.

Learning Objectives

  • Diagnose failures in EC2 Auto Scaling groups (ASG), including launch failures and health check mismatches.
  • Analyze Amazon ECS incidents related to task placement, capacity providers, and container agent connectivity.
  • Troubleshoot Amazon EKS scaling issues involving the Cluster Autoscaler and Karpenter.
  • Utilize AWS Health, EventBridge, and CloudWatch Logs to perform root cause analysis (RCA).

Key Terms & Glossary

  • Capacity Provider: An ECS resource that manages the infrastructure (ASGs or Fargate) for your tasks.
  • Cluster Autoscaler (CA): A Kubernetes tool that automatically adjusts the size of a Kubernetes cluster when pods fail to launch due to lack of resources.
  • Cooldown Period: A configurable setting for ASGs that prevents the group from launching or terminating additional instances before the previous scaling activity takes effect.
  • Karpenter: An open-source, flexible, high-performance Kubernetes cluster autoscaler that bypasses EC2 ASGs to provision nodes directly.
  • Target Tracking: A scaling policy that keeps a specific metric (e.g., CPU utilization) at a target value.

The "Big Idea"

In a DevOps environment, automation is the standard, but automation creates "hidden" failures. When a process like Auto Scaling fails, it is usually due to a break in the feedback loop: either the trigger (CloudWatch) didn't fire, the actor (IAM Role) lacked permissions, or the target (Capacity) was unavailable. Incident analysis is the art of tracing these three components to restore system health.

Formula / Concept Box

ProcessPrimary Metric for ScalingCommon Failure Metric
EC2 Auto ScalingCPUUtilization / RequestCountPerTargetGroupStandbyInstances / GroupTerminatingInstances
ECS ServiceECSServiceAverageCPUUtilizationCPUReservation (Cluster Level)
DynamoDBConsumedReadCapacityUnitsThrottledRequests
EKS PodsHorizontal Pod Autoscaler (HPA)pending_pods (indicates CA trigger)

Hierarchical Outline

  1. Auto Scaling Group (ASG) Incidents
    • Launch Failures: Often caused by reaching service quotas (e.g., Max instances in region) or invalid Launch Templates (e.g., AMI deleted).
    • Health Check Mismatches: Instances marked unhealthy by ELB but healthy by EC2 (or vice-versa).
    • Scaling Suspended: Manual intervention or repeated failures can cause AWS to suspend scaling processes.
  2. Amazon ECS Process Failures
    • Task Placement Errors: Insufficient memory/CPU in the cluster or failure to satisfy placement constraints.
    • Agent Disconnects: ECS Container Agent on EC2 stops reporting to the ECS control plane.
    • Capacity Provider Issues: Mismatched ManagedScaling settings between ECS and the underlying ASG.
  3. Amazon EKS Scaling Issues
    • Cluster Autoscaler (CA): Fails if IAM OIDC provider is misconfigured or if ASG tags are missing.
    • Karpenter: Fails if the Provisioner CRD has incompatible constraints with the requested Pod's nodeSelector.

Visual Anchors

Scaling Failure Flowchart

Loading Diagram...
Figure 1 — Mermaid diagram

ECS Task Placement Logic

Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds
Figure 2 — TikZ diagram

Definition-Example Pairs

  • Service Quota Exhaustion: A hard or soft limit on AWS resources that prevents new resource allocation.
    • Example: An ASG fails to scale out during a flash sale because the account has hit the default limit of 20 running On-Demand instances in us-east-1.
  • Zombie Task: An ECS task that the control plane believes is running, but the container agent has lost contact.
    • Example: An EC2 instance hosting ECS tasks has its outgoing traffic blocked by a NACL change, preventing the ECS Agent from sending heartbeats to the ECS service endpoint.

Worked Examples

Example 1: ECS Tasks Stuck in PENDING

Scenario: You deploy a new version of a microservice to ECS. The tasks remain in PENDING status and eventually disappear without becoming RUNNING. Analysis Steps:

  1. Check Service Events: Navigate to ECS Console > Service > Events. Look for "was unable to place a task because no container instance met all of its requirements."
  2. Verify Resources: Compare the memory and cpu definitions in the Task Definition vs. the available capacity on your EC2 instances.
  3. Resolution: In this case, the task requested 2GB of RAM, but the instances only had 1.5GB available. The solution is to increase the instance size or decrease the task's reservation.

Example 2: EKS Cluster Autoscaler Not Scaling

Scenario: Pods are in Pending state with the message 0/3 nodes are available: 3 Insufficient cpu., but no new nodes are being added to the cluster. Analysis Steps:

  1. Check CA Logs: View logs for the cluster-autoscaler pod in the kube-system namespace.
  2. Identify IAM Issue: Logs show Failed to describe ASG: AccessDenied.
  3. Resolution: The IAM Role associated with the Service Account (IRSA) lacks the autoscaling:DescribeAutoScalingGroups permission. Update the IAM policy to fix the scaling process.

Checkpoint Questions

  1. What is the first place to look if an ASG fails to launch an instance but no CloudWatch alarm is triggered?
  2. How does the ECS awsvpc network mode impact task placement compared to bridge mode?
  3. Which AWS service would you use to automatically remediate an EC2 instance that has failed a system status check?
  4. What is the primary advantage of Karpenter over the standard Kubernetes Cluster Autoscaler?

[!TIP] Answers: 1. ASG Activity History. 2. awsvpc requires an ENI for every task, which may hit EC2 ENI limits. 3. Amazon CloudWatch Alarms (EC2 Status Check Alarm) with an EC2 Recovery action. 4. Karpenter provisions nodes faster by talking directly to the EC2 API, bypassing ASG group logic.

Muddy Points & Cross-Refs

  • Managed Termination Protection: A common point of confusion is why an ASG won't scale in. Ensure ECS Managed Termination Protection is disabled if you want the ASG to terminate instances immediately, or check if "Scale-in protection" is enabled on specific instances.
  • Cross-Ref: For more on health checks, see Unit 4: Monitoring and Logging (ALB Target Group Health vs. Route 53 Health).

Comparison Tables

ECS vs. EKS Scaling Mechanisms

FeatureECS ScalingEKS Scaling (Cluster Autoscaler)
Logic LayerCapacity Provider (AWS Managed)Cluster Autoscaler Pod (User Managed)
Underlying MechanismEC2 Auto Scaling GroupsEC2 Auto Scaling Groups
TriggerTarget Tracking / Step ScalingPods in "Pending" status
SpeedModerate (Wait for ASG Cool-down)Moderate (Wait for ASG Cool-down)
AlternativeFargate (Serverless)Karpenter (Direct EC2 Provisioning)
Study Guide1,050 words

Mastering AWS Monitoring & Security Analytics: Logs, Metrics, and Findings

Analyzing logs, metrics, and security findings

Read full article

Mastering AWS Monitoring & Security Analytics: Logs, Metrics, and Findings

This guide covers the critical aspects of Domain 4 (Monitoring and Logging) and Domain 6 (Security and Compliance) for the AWS DevOps Engineer Professional (DOP-C02) exam, focusing on how to collect, aggregate, and analyze data to maintain operational excellence and a robust security posture.

Learning Objectives

By the end of this guide, you should be able to:

  • Configure multi-source log collection using CloudWatch agents and service-native logging.
  • Analyze log data in real-time using CloudWatch Logs Insights and Amazon Kinesis.
  • Implement automated security auditing with AWS Config, GuardDuty, and CloudTrail.
  • Manage log lifecycles and encryption to meet compliance requirements.
  • Visualize operational health using CloudWatch Dashboards and QuickSight.

Key Terms & Glossary

  • Namespace: A container for CloudWatch metrics. Metrics in different namespaces are isolated from each other.
  • Dimension: A name/value pair that is part of a metric's identity (e.g., InstanceId for EC2 metrics).
  • Metric Filter: A rule that searches for patterns in log data and turns matches into numerical CloudWatch metrics.
  • Log Subscription: A mechanism to stream log events to other services like Lambda, Kinesis, or OpenSearch for real-time processing.
  • AWS Config Rule: A desired configuration setting for an AWS resource; used to identify non-compliant resources.
  • VPC Flow Logs: A feature that captures information about IP traffic going to and from network interfaces in your VPC.

The "Big Idea"

[!IMPORTANT] Visibility is the foundation of both DevOps and Security. You cannot improve what you cannot measure, and you cannot defend what you cannot see. The "Big Idea" here is moving from reactive monitoring (waiting for something to break) to proactive and automated observability, where systems automatically detect anomalies, audit changes, and remediate security findings.

Formula / Concept Box

ConceptRule / Syntax
Log RetentionRetention Days = Compliance Requirement (e.g., 365) + Archive Buffer.
Metric Filter Syntax[ip, user, id, timestamp, request, status_code=4*, size] (Example for 4xx errors)
CloudWatch ResolutionStandard = 1 minute; High Resolution = 1 second.
KMS EncryptionUse a Resource-Based Policy on the KMS key to allow logs.<region>.amazonaws.com access.

Hierarchical Outline

  1. Collection & Storage
    • CloudWatch Agent: Collects system-level metrics (RAM, Disk) and custom logs from EC2/On-premises.
    • Metric Streams: Low-latency delivery of metrics to S3 or Kinesis Data Firehose for 3rd party analysis.
    • Storage Lifecycles: Using S3 Lifecycle policies (Transition to Glacier) and CloudWatch Log Group retention settings to manage costs.
  2. Analysis & Insights
    • CloudWatch Logs Insights: Interactive, purpose-built query language for log analysis.
    • Amazon Athena: Querying logs stored in S3 (e.g., CloudTrail, VPC Flow Logs) using standard SQL.
    • Amazon OpenSearch: Real-time search and visualization (ELK stack style) for complex log data.
  3. Security & Compliance
    • AWS CloudTrail: The "Who, What, When, Where" of API calls.
    • AWS Config: Continuous monitoring of resource configurations and history.
    • Amazon GuardDuty: Managed threat detection using machine learning on CloudTrail, VPC Flow, and DNS logs.

Visual Anchors

Log Processing Pipeline

Loading Diagram...
Figure 1 — Mermaid diagram

CloudWatch Metric Dimensions

Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds
Figure 2 — TikZ diagram

Definition-Example Pairs

  • Anomaly Detection: A CloudWatch feature that applies machine learning to your metric data to determine a baseline of normal behavior.
    • Example: If a web server typically has 5% CPU usage at 3 AM but suddenly spikes to 80%, an alarm triggers based on the statistical deviation, even if 80% is technically within "normal" operating limits for daytime.
  • Drift Detection: A CloudFormation feature that identifies if infrastructure has been manually changed outside of the template.
    • Example: Someone manually opens port 22 in a Security Group that was defined as closed in the template. Drift detection flags this discrepancy.
  • Metric Filter: Extracting data from logs to create a timeline graph.
    • Example: Searching for the word "ERROR" in application logs and creating a count metric that alarms if "ERROR" appears more than 10 times in 5 minutes.

Worked Examples

Example 1: Creating a Metric Filter for HTTP 404 Errors

Scenario: You want to be alerted if your Application Load Balancer (ALB) returns too many "Page Not Found" errors.

  1. Locate Logs: Navigate to CloudWatch Logs and find the log group for your ALB access logs.
  2. Define Pattern: Use the filter pattern [type, timestamp, elb, client_ip, client_port, target_ip, target_port, request_processing_time, target_processing_time, response_processing_time, elb_status_code=404, target_status_code, received_bytes, sent_bytes, request, user_agent, ssl_cipher, ssl_protocol].
  3. Assign Value: Set the metric value to 1 for every occurrence.
  4. Create Alarm: Set a threshold where the sum of this metric > 50 over a 5-minute period triggers an SNS notification to the DevOps team.

Example 2: Querying Logs with Insights

Scenario: Find the top 10 IP addresses making requests to your system that resulted in a 5xx error.

Query:

sql
filter @message like /5[0-9][0-9]/ | stats count(*) as errorCount by clientIp | sort errorCount desc | limit 10

Checkpoint Questions

  1. Which service is best for querying CloudTrail logs archived in S3 using standard SQL? (Answer: Amazon Athena)
  2. How do you collect RAM usage from an EC2 instance, given that it is not a default metric? (Answer: Install and configure the CloudWatch Agent)
  3. What is the difference between a high-resolution metric and a standard-resolution metric? (Answer: High-resolution can be as frequent as 1-second intervals; standard is 1-minute).
  4. True or False: CloudWatch Logs are encrypted by default at rest. (Answer: True, but you can also use your own KMS key for more control).

Muddy Points & Cross-Refs

  • CloudWatch vs. CloudTrail: Beginners often confuse these. CloudWatch is for performance/health (metrics/logs); CloudTrail is for governance/auditing (who did what in the API).
  • Config vs. GuardDuty: Config checks for state (Is this bucket private?); GuardDuty checks for behavior (Is this instance communicating with a known Bitcoin mining IP?).
  • Deeper Study: Review the "AWS Well-Architected Framework: Security Pillar" for more context on the "Defense in Depth" approach mentioned in your source content.

Comparison Tables

FeatureCloudWatch Logs InsightsAmazon AthenaAmazon OpenSearch Service
Primary SourceLog GroupsS3 BucketsLive Stream (via Kinesis)
Query LanguageCustom Query SyntaxStandard SQLDSL / Lucene
LatencySeconds (Interactive)Seconds to MinutesReal-time (Sub-second)
Best Use CaseQuick troubleshootingLong-term trend analysisComplex dashboarding/ELK
ServiceType of MonitoringPrimary Data Source
AWS ConfigConfiguration ComplianceResource State Changes
AWS CloudTrailAPI AuditingAWS API Logs
Amazon InspectorVulnerability ScanningEC2/ECR/Lambda Scans
AWS X-RayDistributed TracingApplication Service Calls
Study Guide920 words

AWS Log Analysis: Athena, CloudWatch Insights, and OpenSearch

Analyzing logs with AWS services (for example, Amazon Athena, CloudWatch Logs Insights)

Read full article

AWS Log Analysis: Athena, CloudWatch Insights, and OpenSearch

This guide covers the essential services and techniques for auditing, monitoring, and analyzing logs within the AWS ecosystem, specifically tailored for the DevOps Engineer Professional (DOP-C02) exam.

Learning Objectives

By the end of this module, you should be able to:

  • Differentiate between Amazon Athena and CloudWatch Logs Insights for specific log analysis use cases.
  • Configure CloudWatch Metric Filters and Metric Streams to generate actionable data from raw logs.
  • Implement Log Subscriptions to forward data to Amazon OpenSearch, Lambda, or Kinesis.
  • Design cost-effective log storage lifecycles using Amazon S3 and CloudWatch retention policies.
  • Analyze real-time and historical security events using CloudTrail and VPC Flow Logs.

Key Terms & Glossary

  • Log Stream: A sequence of log events that share the same source (e.g., a specific EC2 instance or Lambda function execution).
  • Log Group: A collection of log streams that share the same retention, monitoring, and access control settings.
  • Subscription Filter: A mechanism to stream log events to other services (Lambda, Kinesis, OpenSearch) in near real-time.
  • Metric Filter: A pattern matching rule that extracts numerical data from log events to create CloudWatch Metrics.
  • Partitioning (Athena): The process of organizing data in S3 (e.g., by year/month/day) to improve query performance and reduce cost.

The "Big Idea"

Logs are the "truth" of your system, but raw text is unusable at scale. The goal of AWS log analysis is to move from Passive Storage (just keeping files) to Active Intelligence. This involves a pipeline: Collection (CloudWatch Agent) \rightarrow Aggregation (Log Groups/S3) \rightarrow Analysis (Insights/Athena) \rightarrow Visualization (Dashboards/QuickSight).

Formula / Concept Box

FeatureCloudWatch Logs InsightsAmazon AthenaAmazon OpenSearch (ELK)
Query LanguageProprietary Pattern SyntaxStandard SQLDSL / Lucene / SQL
Data SourceLogs in CloudWatch Log GroupsLogs stored in S3Indexed data in OpenSearch
Ideal Use CaseAd-hoc troubleshooting, quick searchesComplex joins, historical long-term analysisReal-time dashboards, full-text search
PricingPer GB of data scannedPer TB of data scannedPer instance hour + EBS storage

Hierarchical Outline

  • I. CloudWatch Logs Ecosystem
    • CloudWatch Agent: Collecting custom OS-level metrics and file-based logs.
    • Metric Filters: Creating alarms from log patterns (e.g., counting "404" errors).
    • Logs Insights: Interactive querying (parseparse, filterfilter, statsstats).
  • II. Long-Term Analysis with Athena
    • S3 Export: Moving logs from CW to S3 (not real-time).
    • Direct S3 Ingestion: VPC Flow Logs, CloudTrail, and ALB logs delivered directly to S3.
    • AWS Glue: Using crawlers to automatically discover schema for Athena.
  • III. Real-Time Streaming & Search
    • Subscription Filters: Pushing logs to Kinesis Data Firehose \rightarrow OpenSearch.
    • Lambda Transformation: Cleaning or enriching logs before they reach the destination.
  • IV. Security & Compliance
    • KMS Encryption: Encrypting log groups at rest.
    • Retention Policies: Automatically deleting logs to save costs (e.g., 30 days for Dev, 365 for Prod).

Visual Anchors

Log Ingestion and Analysis Flow

Loading Diagram...
Figure 1 — Mermaid diagram

CloudWatch vs. Athena Scope

Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds
Figure 2 — TikZ diagram

Definition-Example Pairs

  • Metric Filter: A rule to turn log text into numbers.
    • Example: Searching for the string "ERROR" in an application log and creating a metric ErrorCount. If ErrorCount > 5 in 1 minute, trigger an SNS notification.
  • Logs Insights Parse: A command to extract fields from a raw log string.
    • Example: parse @message "[*] *" as level, msg takes a log like [INFO] User logged in and creates searchable fields level="INFO" and msg="User logged in".
  • Athena Partitioning: Organizing S3 folders to limit data scanned.
    • Example: Storing logs in s3://my-bucket/year=2023/month=10/day=27/. Athena only scans the specific folder for that day's query, significantly reducing cost.

Worked Examples

Case 1: Querying for 403 Forbidden Errors in CloudWatch Insights

To find the most frequent IP addresses causing access denied errors in an ALB log group:

sql
fields @timestamp, @message | filter @message like /403/ | parse @message "* * * * * * * * * * *" as time, elb, client_ip, target_ip, request_processing_time, target_processing_time, response_processing_time, elb_status_code, target_status_code, received_bytes, sent_bytes | stats count(*) as errorCount by client_ip | sort errorCount desc | limit 10

Case 2: Athena Query for CloudTrail Security Audit

To find who deleted an S3 bucket in the last 24 hours:

sql
SELECT eventTime, eventName, userIdentity.arn, requestParameters FROM cloudtrail_logs WHERE eventName = 'DeleteBucket' AND eventTime > '2023-10-26T00:00:00Z' ORDER BY eventTime DESC;

Checkpoint Questions

  1. You need to perform a complex SQL join between VPC Flow Logs and a customer metadata table. Which service is most appropriate?
  2. What is the most cost-effective way to store logs that must be kept for 7 years but are rarely accessed?
  3. How do you trigger an AWS Lambda function every time a specific keyword appears in your CloudWatch Logs?
  4. Does CloudWatch Logs Insights require you to set up a server or index data beforehand?

[!TIP] Answers: 1. Amazon Athena (supports SQL joins). 2. Export to S3 and use S3 Glacier Lifecycle policies. 3. Use a CloudWatch Logs Subscription Filter. 4. No, it is a serverless, on-demand query engine.

Muddy Points & Cross-Refs

  • Latency: CloudWatch Logs Insights is near-instant for data already in the log group. Athena depends on the data being delivered to S3 (which can have a 5-15 minute lag for services like VPC Flow Logs).
  • Concurrency: Athena has service quotas on concurrent queries; it is not meant for high-concurrency application backends (use OpenSearch for that).
  • Cross-Account: To analyze logs across accounts, use CloudWatch Cross-Account Observability or centralize logs into a single S3 bucket for Athena analysis.

Comparison Tables: Log Analysis Strategy

RequirementRecommended Path
Immediate Operational DebuggingCloudWatch Logs Insights
Security Forensics (Long Term)S3 + Athena
Real-time Dashboard (Kibana)OpenSearch Service
Triggering Auto-ScalingMetric Filter \rightarrow CloudWatch Metric \rightarrow Scaling Policy
Reporting to Business UsersAthena \rightarrow Amazon QuickSight
Study Guide985 words

Analyzing Real-Time Log Streams with Amazon Kinesis Data Streams

Analyzing real-time log streams (for example, using Amazon Kinesis Data Streams)

Read full article

Analyzing Real-Time Log Streams with Amazon Kinesis Data Streams

This guide covers the architecture, configuration, and analysis techniques for real-time log streaming, a core requirement for the AWS Certified DevOps Engineer Professional (DOP-C02) exam. We focus on how to move from static log storage to active, real-time insights.

Learning Objectives

After studying this guide, you should be able to:

  • Architect a real-time log processing pipeline using CloudWatch Logs and Kinesis.
  • Configure subscription filters to stream log data to downstream consumers.
  • Calculate shard requirements based on log volume and throughput limits.
  • Differentiate between standard and enhanced fan-out consumers.
  • Analyze streaming data using AWS services like Kinesis Data Analytics and CloudWatch Logs Insights.

Key Terms & Glossary

  • Shard: The base throughput unit of a Kinesis data stream. It provides a fixed capacity (1MB/sec in, 2MB/sec out).
  • Partition Key: A value used by producers to group data into specific shards within a stream.
  • Sequence Number: A unique identifier assigned by Kinesis to each data record when it is added to a stream.
  • Subscription Filter: A CloudWatch Logs feature that allows you to forward log events to Kinesis, Lambda, or OpenSearch in real-time.
  • Kinesis Client Library (KCL): A Java library that helps you build consumer applications to process data from Kinesis streams efficiently.

The "Big Idea"

In modern DevOps, logs are no longer just for "post-mortem" investigations. The Big Idea is to treat logs as a continuous event stream. By piping logs into Amazon Kinesis Data Streams, you shift from reactive analysis (searching logs after a crash) to proactive monitoring (detecting 5XX errors or security threats as they happen in milliseconds).

Formula / Concept Box

FeatureLimit / RuleLogic
Shard Ingest1,000 records/sec or 1MB/secWhichever limit is reached first.
Shard Egress2MB/sec (standard)Shared across all consumers not using enhanced fan-out.
Data Retention24 hours (default)Can be extended up to 365 days.
Record Size1 MB (Maximum)Includes partition key and data blob.
Enhanced Fan-out2MB/sec per consumerDedicated throughput for each registered consumer.

Hierarchical Outline

  1. Log Ingestion Layer
    • CloudWatch Logs Agent: Installed on EC2/on-prem to collect files.
    • Metric Filters: Extract specific patterns to create CloudWatch Metrics.
    • Subscription Filters: The "bridge" that pushes logs to Kinesis.
  2. The Processing Core: Kinesis Data Streams
    • Sharding Strategy: Scaling based on IncomingBytes and IncomingRecords.
    • Ordering: Records with the same Partition Key are sent to the same shard and processed in order.
  3. Consumption & Analysis
    • Kinesis Data Firehose: To deliver logs to S3, Redshift, or OpenSearch (near real-time).
    • AWS Lambda: For simple transformations or real-time alerting.
    • Kinesis Data Analytics: SQL-based analysis on the live stream.

Visual Anchors

Log Stream Architecture

Loading Diagram...
Figure 1 — Mermaid diagram

Anatomy of a Kinesis Data Record

Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds
Figure 2 — TikZ diagram

Definition-Example Pairs

  • Partition Key: A value provided by the producer to determine shard assignment.
    • Example: Using Customer_ID as a partition key ensures all logs for a specific customer are processed in the exact order they occurred by the same shard.
  • Metric Filter: A rule to turn log patterns into numerical metrics.
    • Example: Searching for the string "ERROR" in logs and incrementing a CloudWatch metric called ErrorCount every time it appears.
  • Kinesis Data Analytics: A service that runs SQL queries against streaming data.
    • Example: Calculating a rolling 5-minute average of 404 errors from a website clickstream log to detect a broken link immediately.

Worked Examples

Scenario: Streaming Web Server Logs to Amazon OpenSearch

Goal: Provide a real-time dashboard for a DevOps team to see HTTP 500 errors.

  1. Configure CloudWatch Logs: Ensure logs are flowing into a Log Group (e.g., /aws/vendedlogs/alb).
  2. Create Kinesis Data Stream: Provision a stream with 2 shards (providing 2MB/s ingest capacity).
  3. Setup Subscription Filter:
    • Pattern: [ip, user, id, time, request, status_code=500, size]
    • Destination: Select the Kinesis Data Stream.
  4. Connect Firehose: Create a Kinesis Data Firehose delivery stream using the Data Stream as the source.
  5. Destination: Set Amazon OpenSearch Service as the destination for the Firehose stream.
  6. Result: Within 60 seconds of a 500 error occurring, it appears in the OpenSearch dashboard.

Checkpoint Questions

  1. What is the maximum size of a single Kinesis Data Record?
  2. If you have 3 consumers reading from the same shard without using Enhanced Fan-out, what is the total shared egress throughput available?
  3. Which field in a Kinesis record ensures that data is stored and processed in the correct order within a shard?
  4. How do you scale a Kinesis Data Stream that is experiencing ProvisionedThroughputExceededException errors?
Click to see answers
  1. 1 MB.
  2. 2 MB/sec (shared among all three).
  3. Sequence Number (though the Partition Key determines which shard it goes to).
  4. Increase the number of shards (Resharding).

Muddy Points & Cross-Refs

  • KDS vs. Kinesis Data Firehose: KDS is for processing (you write code/Lambda to read it); Firehose is for delivery (it pushes data to S3/Redshift/OpenSearch automatically). Firehose is near-real-time (60s+ latency), while KDS is sub-second.
  • Ordering across shards: Kinesis only guarantees ordering within a shard. If your data spans multiple shards, you must use timestamps in your payload to re-order them downstream if absolute global ordering is required.

Comparison Tables

Kinesis Data Streams vs. Kinesis Data Firehose

FeatureKinesis Data Streams (KDS)Kinesis Data Firehose
Primary PurposeLow-latency ingestion & custom processing.Loading data into AWS data stores.
Latency< 200 ms (Sub-second).60 seconds to 15 minutes.
ScalingManual/Auto-scaling (Shards).Fully Managed (Automatic).
Data Retention1 to 365 days.None (Ephemeral).
CostHourly per shard + per 1M PUT units.Per GB of data ingested.

[!TIP] For the exam, if the requirement asks for "Real-time" analysis with SQL, choose Kinesis Data Analytics. If it asks for "Near real-time" delivery to S3, choose Kinesis Data Firehose.

Study Guide820 words

CloudWatch Anomaly Detection Alarms: Professional Study Guide

Anomaly detection alarms (for example, CloudWatch anomaly detection)

Read full article

CloudWatch Anomaly Detection Alarms

CloudWatch anomaly detection applies machine-learning algorithms to your metric data to create a model of expected values. This allows for dynamic thresholds that adapt to the natural fluctuations (seasonality) of your infrastructure without manual intervention.

Learning Objectives

  • Explain the machine learning mechanism behind CloudWatch anomaly detection.
  • Configure anomaly detection bands using standard deviation settings.
  • Differentiate between static threshold alarms and anomaly detection alarms.
  • Troubleshoot common alarm states like INSUFFICIENT_DATA and ALARM in the context of seasonal metrics.

Key Terms & Glossary

  • Anomaly Detection Band: The shaded area on a CloudWatch graph representing the range of expected values for a metric.
  • Seasonality: Predictable changes that recur over a specific period, such as higher CPU usage every Monday morning or lower traffic during weekends.
  • Standard Deviation (sigma\\sigma): A measure of how much the metric fluctuates from the mean. In anomaly detection, this defines the width of the band.
  • Evaluation Period: The number of the most recent data points to evaluate when determining the alarm state.
  • Datapoints to Alarm: The required number of breaching data points (M) within a set of evaluation periods (N).

The "Big Idea"

In modern DevOps, static thresholds (e.g., "Alarm if CPU > 80%") are often too rigid. A system might normally run at 90% during a nightly batch job and 10% at noon. Anomaly detection shifts the focus from absolute limits to statistical deviance, allowing the system to alert you only when behavior is truly "weird" based on historical patterns.

Formula / Concept Box

ConceptDescriptionLogic / Parameters
Band WidthControls how "sensitive" the alarm is.Higher standard deviation = wider band (fewer alarms).
M of N RuleDetermines alarm sensitivity over time."3 out of 5" means 3 points must be outside the band within 5 periods.
State LogicTransitions based on ML model comparison.Metric > Model + (Stdev * Width) OR Metric < Model - (Stdev * Width).

Hierarchical Outline

  1. Metric Selection & Modeling
    • Historical Analysis: AWS analyzes up to 2 weeks of data to build the initial model.
    • Continuous Learning: The model updates every hour as new data arrives.
  2. Alarm Configuration
    • Threshold Type: Choose "Anomaly detection" instead of "Static".
    • Band Thickness: 1, 2, or 3 standard deviations (standard is 2).
    • Direction: Alarm when the metric is "Greater than the band", "Lower than the band", or "Outside the band".
  3. Advanced Evaluation
    • Datapoints to Alarm: MM out of NN evaluation.
    • Missing Data Treatment: Configure as missing, breaching, ignore, or non-breaching.

Visual Anchors

Alarm State Transition Logic

Loading Diagram...
Figure 1 — Mermaid diagram

Metric Band Visualization

Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds
Figure 2 — TikZ diagram

Definition-Example Pairs

  • Term: Seasonality Awareness

  • Definition: The ability of the ML model to recognize hourly, daily, or weekly patterns.

  • Example: An e-commerce site has high traffic every Sunday at 8 PM. Static alarms would fire every Sunday; Anomaly Detection learns this is "Normal" and remains OK.

  • Term: Model Exclusion

  • Definition: Manually telling the model to ignore specific time ranges (e.g., during a deployment or load test).

  • Example: During a 4-hour maintenance window, you exclude that data so the model doesn't think the "Zero Traffic" state is a new normal.

Worked Examples

Scenario: RDS Database Latency

Goal: Detect unusual latency spikes in an RDS instance where latency normally fluctuates between 5ms and 20ms throughout the day.

  1. Metric: AWS/RDS -> ReadLatency.
  2. Threshold Type: Anomaly Detection.
  3. Configuration:
    • Standard Deviation: Set to 2 (Moderate sensitivity).
    • Evaluation Period: 1 Minute.
    • Datapoints to Alarm: 3 out of 5.
  4. Result: If latency hits 40ms for 3 minutes within any 5-minute window, the alarm triggers. If it hits 40ms for only 1 minute, the alarm stays OK to avoid false positives from transient blips.

Checkpoint Questions

  1. What is the default amount of historical data CloudWatch attempts to use when building an anomaly detection model?
  2. What happens to the anomaly detection alarm if you change the metric's unit?
  3. True or False: You can only use anomaly detection on AWS-provided standard metrics.
  4. Which alarm state indicates that the machine learning model is still being trained?

Muddy Points & Cross-Refs

  • Cold Starts: New metrics without history will stay in INSUFFICIENT_DATA until enough points are collected. Don't rely on AD for brand-new resources in the first few hours.
  • Sudden Step Changes: If your application permanently changes behavior (e.g., a version update that uses 20% more memory), the AD model will initially alarm, then slowly "learn" the new level over several days. You may need to reset the model.
  • Cross-Ref: Combine with CloudWatch ServiceLens to visualize these anomalies across distributed traces.

Comparison Tables

Static vs. Anomaly Detection Alarms

FeatureStatic ThresholdAnomaly Detection
Setup DifficultyEasy (Pick a number)Moderate (Choose Stdev width)
MaintenanceHigh (Update as load changes)Low (Self-adjusting)
Best Use CaseHard limits (Disk full, Budget)Fluctuating traffic/CPU/Latency
False PositivesHigh (during peak hours)Low (ignores expected peaks)
Study Guide1,054 words

AWS Application Storage Patterns: EBS, EFS, and S3

Application storage patterns (for example, Amazon Elastic File System [Amazon EFS], Amazon S3, Amazon Elastic Block Store [Amazon EBS])

Read full article

AWS Application Storage Patterns: EBS, EFS, and S3

This guide covers the core storage services within AWS (Amazon EBS, Amazon EFS, and Amazon S3) and how to select the correct pattern for instance-based, containerized, and serverless applications.

Learning Objectives

After studying this guide, you should be able to:

  • Differentiate between Block, File, and Object storage paradigms.
  • Identify the correct storage service based on throughput, latency, and access requirements.
  • Design hybrid storage solutions using AWS Storage Gateway.
  • Implement storage patterns that support high availability and disaster recovery (RPO/RTO).

Key Terms & Glossary

  • Block Storage: Data is stored in fixed-size blocks; ideal for low-latency database workloads.
  • Object Storage: Data is stored as objects with metadata and a unique key; ideal for unstructured data and web scaling.
  • POSIX: A family of standards for maintaining compatibility between operating systems (EFS/FSx for Lustre are POSIX-compliant).
  • IOPS (Input/Output Operations Per Second): A performance metric used to measure the speed of storage devices.
  • Throughput: The amount of data moved from one place to another in a given time period (typically MB/s).
  • WORM (Write Once Read Many): A data storage technology that prevents the erasure or modification of data (S3 Object Lock).

The "Big Idea"

In the AWS Cloud, storage is not just a place to put files—it is a decoupling mechanism. By choosing the right storage pattern, you separate the application's "state" from the compute layer. This allows you to treat EC2 instances and containers as ephemeral (disposable) resources, enabling seamless auto-scaling, blue/green deployments, and high resiliency.

Formula / Concept Box

Storage TypeInterfacePrimary Use CaseScaling Nature
Amazon EBSBlock (iSCSI-like)Databases, Boot volumesVertical (Manual/Elastic)
Amazon EFSFile (NFS v4)Shared content, Home dirsAutomatic (Elastic)
Amazon S3Object (HTTP API)Static assets, Data lakesVirtually Unlimited
Amazon FSxFile (SMB/Lustre)Windows/HPC workloadsManaged Performance

Hierarchical Outline

  • I. Block Storage (Amazon EBS)
    • Characteristics: Low latency, single-AZ by default, attached to one instance at a time (mostly).
    • Use Cases: Primary storage for file systems, Relational Databases, and raw block access.
  • II. File Storage (Amazon EFS & FSx)
    • Amazon EFS: Fully managed NFS v4 for Linux; supports thousands of concurrent connections.
    • Amazon FSx for Lustre: High-performance parallel storage for HPC and Machine Learning.
    • Amazon FSx for Windows: Native SMB support for Microsoft environments.
  • III. Object Storage (Amazon S3)
    • Architecture: Buckets (Global unique name) and Objects (Key/Value).
    • Capabilities: Static website hosting, Cross-Region Replication, and lifecycle policies.
  • IV. Hybrid Patterns (Storage Gateway)
    • File Gateway: S3 access via NFS/SMB.
    • Volume Gateway: Block storage with cloud backup (Cached or Stored).
    • Tape Gateway: Replaces physical tapes with virtual tapes in S3/Glacier.

Visual Anchors

Storage Selection Decision Tree

Loading Diagram...
Figure 1 — Mermaid diagram

EBS Architecture Layout

Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds
Figure 2 — TikZ diagram

Definition-Example Pairs

  • Pattern: Shared Configuration Management

    • Definition: Using a single source of truth for configuration files across a fleet of Linux servers.
    • Example: Mounting an Amazon EFS volume to /etc/config on ten different EC2 instances so they all read the same settings simultaneously.
  • Pattern: Static Asset Delivery

    • Definition: Offloading non-computational data to a high-availability storage tier to reduce server load.
    • Example: Storing application images and CSS files in an Amazon S3 bucket and serving them directly to users via CloudFront.
  • Pattern: High-Performance Database Volume

    • Definition: Dedicated low-latency throughput for random read/write operations.
    • Example: Attaching a Provisioned IOPS (io2) EBS volume to an EC2 instance running a MySQL database.

Worked Examples

Example 1: Migrating a Legacy Windows App

Problem: A company has a legacy .NET application that requires an SMB file share to store user documents. They want to move to AWS with minimal code changes. Solution:

  1. Provision Amazon FSx for Windows File Server.
  2. Join the FSx file system to the company's Active Directory.
  3. Map the network drive (e.g., Z:) on the EC2 instances to the FSx DNS name. Why: This preserves the SMB protocol and NTFS permissions the app expects.

Example 2: Building a Log Processing Pipeline

Problem: You need to collect logs from 100 containers and analyze them for security threats every 24 hours. Solution:

  1. Containers push logs to Amazon S3 using the AWS SDK or a logging driver.
  2. Configure an S3 Event Notification to trigger an AWS Lambda function whenever a new log file is uploaded.
  3. Use Amazon Athena to query the logs directly in S3 using SQL for the 24-hour report.

Checkpoint Questions

  1. Which storage service would you use for a High-Performance Computing (HPC) cluster requiring sub-millisecond latencies and hundreds of GB/s throughput?
  2. True or False: Amazon EBS volumes are automatically replicated across multiple Availability Zones.
  3. What is the primary protocol used to access Amazon EFS?
  4. Which AWS Storage Gateway type should be used to replace physical tape backup systems?
Click to see answers
  1. Amazon FSx for Lustre.
  2. False (EBS is replicated within a single AZ; use snapshots or Multi-Attach for different patterns).
  3. NFSv4 (Network File System).
  4. Tape Gateway.

Muddy Points & Cross-Refs

  • EFS vs. S3 for Shared Files: Use EFS if your application needs to use standard OS commands (like ls, cd, fopen) and needs to modify parts of files. Use S3 if you are accessing whole files via API and need global scale.
  • EBS vs. Instance Store: Remember that Instance Store is ephemeral (data is lost on stop/terminate), whereas EBS is persistent. For DevOps exams, always lean toward EBS unless "maximum possible IOPS/temporary data" is specified.
  • Cross-Reference: For security, see AWS KMS for encrypting all these storage types at rest.

Comparison Tables

S3 Storage Classes

FeatureS3 StandardS3 Standard-IAS3 Glacier Flexible
Durability99.999999999%99.999999999%99.999999999%
Availability99.99%99.9%N/A (Archive)
Min. DurationNone30 days90 days
Retrieval FeeNonePer GBPer GB
Best ForActive dataLong-term/InfrequentLong-term Archival

[!TIP] Use S3 Intelligent-Tiering if you have unknown or changing access patterns; it automatically moves data between tiers to save costs without operational overhead.

Hands-On Lab942 words

Lab: Automating Security Controls and Data Protection with AWS Secrets Manager and Config

Apply automation for security controls and data protection

Read full article

Lab: Automating Security Controls and Data Protection

This hands-on lab focuses on Domain 6 of the AWS Certified DevOps Engineer Professional exam: Security and Compliance. You will implement automation for data protection and security controls using AWS Secrets Manager, AWS KMS, and AWS Config.

[!WARNING] Remember to run the teardown commands at the end of this lab to avoid ongoing charges for AWS KMS keys and AWS Config recorders.


Prerequisites

To successfully complete this lab, you will need:

  • An AWS Account with Administrative access.
  • AWS CLI configured on your local machine with appropriate credentials.
  • A target region (e.g., us-east-1).
  • Basic familiarity with JSON and Bash/PowerShell.

Learning Objectives

  • Automate Data Protection: Provision an AWS KMS Customer Managed Key (CMK) and use it to encrypt S3 storage.
  • Automate Credential Rotation: Configure a secret in AWS Secrets Manager with placeholders for rotation logic.
  • Implement Compliance Automation: Deploy an AWS Config rule to monitor and report on S3 bucket encryption status.
  • Defense in Depth: Understand how these services layer together to secure a multi-service environment.

Architecture Overview

In this lab, you will build a simplified secure environment where data is encrypted at rest, and infrastructure compliance is automatically monitored.

Loading Diagram...
Figure 1 — Mermaid diagram

Step-by-Step Instructions

Step 1: Create a Customer Managed Key (CMK)

AWS KMS is the foundation for data protection. Using a CMK allows you to control the key policy and rotation separately from AWS Managed keys.

bash
# Generate a unique CMK aws kms create-key --description "Lab Key for S3 and Secrets"

[!IMPORTANT] Note the KeyId (UUID) from the output. You will use it in the following steps.

Console alternative
  1. Navigate to KMS > Customer managed keys.
  2. Click Create key.
  3. Choose Symmetric and click Next.
  4. Provide an Alias (e.g., brainybee-lab-key) and click Next through the defaults to Finish.

Step 2: Create a Secure S3 Bucket

Next, we will create an S3 bucket and enforce server-side encryption using the KMS key created in Step 1.

bash
# Replace <YOUR_UNIQUE_BUCKET_NAME> with a unique string # Replace <YOUR_KMS_KEY_ID> with the ID from Step 1 aws s3api create-bucket --bucket brainybee-lab-data-<YOUR_UNIQUE_BUCKET_NAME> --region us-east-1 aws s3api put-bucket-encryption \ --bucket brainybee-lab-data-<YOUR_UNIQUE_BUCKET_NAME> \ --server-side-encryption-configuration '{ "Rules": [{ "ApplyServerSideEncryptionByDefault": { "SSEAlgorithm": "aws:kms", "KMSMasterKeyID": "<YOUR_KMS_KEY_ID>" } }] }'
Console alternative
  1. Navigate to S3 > Create bucket.
  2. Name the bucket (e.g., brainybee-lab-data-123).
  3. Under Default encryption, select Enable.
  4. Choose AWS Key Management Service key (SSE-KMS).
  5. Select the key you created in Step 1.
  6. Click Create bucket.

Step 3: Automate Secret Management

Secrets Manager allows for the automation of credential rotation. We will create a secret that uses our KMS key for encryption.

bash
aws secretsmanager create-secret --name "brainybee/lab/db-creds" \ --description "Database credentials for automation lab" \ --kms-key-id <YOUR_KMS_KEY_ID> \ --secret-string '{"username":"admin","password":"P@ssw0rd123!"}'

[!TIP] In a real-world DevOps scenario, you would attach a Lambda function to this secret to handle the RotationRules.

Console alternative
  1. Navigate to Secrets Manager > Store a new secret.
  2. Choose Other type of secret.
  3. Enter Key/Value pairs (e.g., username / admin).
  4. Select your CMK from the encryption key dropdown.
  5. Name the secret brainybee/lab/db-creds and click Store.

Step 4: Implement AWS Config for Compliance

AWS Config continuously monitors resources. We will enable the s3-bucket-server-side-encryption-enabled rule to ensure all buckets are encrypted.

bash
# Note: This assumes AWS Config is already initialized in your account. aws configservice put-config-rule \ --config-rule '{ "ConfigRuleName": "s3-bucket-encryption-check", "Description": "Checks if S3 buckets have encryption enabled", "Source": { "Owner": "AWS", "SourceIdentifier": "S3_BUCKET_SERVER_SIDE_ENCRYPTION_ENABLED" } }'
Console alternative
  1. Navigate to AWS Config > Rules.
  2. Click Add rule.
  3. Search for s3-bucket-server-side-encryption-enabled.
  4. Click Next and Add rule.

Checkpoints

  1. KMS Verification: Run aws kms describe-key --key-id <YOUR_KMS_KEY_ID> and confirm KeyState is Enabled.
  2. S3 Encryption: Run aws s3api get-bucket-encryption --bucket <YOUR_BUCKET_NAME>. You should see SSEAlgorithm: aws:kms.
  3. Config Compliance: Navigate to the Config console. Within 2-3 minutes, the s3-bucket-encryption-check rule should show your bucket as Compliant.

Teardown

To avoid charges, delete the resources created in this lab:

bash
# 1. Delete the S3 Bucket (must be empty) aws s3 rb s3://brainybee-lab-data-<YOUR_UNIQUE_BUCKET_NAME> --force # 2. Delete the Secret aws secretsmanager delete-secret --secret-id "brainybee/lab/db-creds" --force-deletion-without-recovery # 3. Delete the Config Rule aws configservice delete-config-rule --config-rule-name "s3-bucket-encryption-check" # 4. Schedule KMS Key Deletion (7-day minimum waiting period) aws kms schedule-key-deletion --key-id <YOUR_KMS_KEY_ID> --pending-window-in-days 7

Troubleshooting

ErrorLikely CauseSolution
AccessDeniedExceptionIAM user lacks KMS or S3 permissions.Attach the AdministratorAccess or specific KMS/S3/Config managed policies.
BucketAlreadyExistsS3 bucket names are globally unique.Change the bucket suffix to something random (e.g., date-time).
ConfigRuleNotAvailableAWS Config is not enabled in the region.Run aws configservice subscribe or enable it via the Console first.

Stretch Challenge

Automated Remediation: Enhance your AWS Config rule by adding a Remediation Action. Configure AWS Config to trigger an SSM Document that automatically enables encryption on any bucket found to be non-compliant.

Cost Estimate

ServiceUsageEstimated Cost (USD)
AWS KMS1 CMK$1.00 / month (pro-rated)
AWS Secrets Manager1 Secret$0.40 / month (pro-rated)
AWS Config1 Rule / 1 Evaluation< $0.10
Total30 Min Lab<$0.05 (if deleted promptly)

Concept Review

ServiceRole in AutomationKey Benefit
AWS KMSCentralized Key ManagementDecouples encryption logic from application code.
Secrets ManagerLifecycle ManagementEnables automatic rotation of DB passwords without downtime.
AWS ConfigContinuous AuditingProvides a detective control to ensure security standards are met.
S3 EncryptionData ProtectionEnsures data at rest is unreadable to unauthorized parties even if physical media is accessed.

Theoretical Model: The Shared Responsibility Pipeline

Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds
Figure 2 — TikZ diagram
Study Guide1,184 words

Master Study Guide: Automating Security Controls & Data Protection (AWS DOP-C02)

Apply automation for security controls and data protection

Read full article

Master Study Guide: Automating Security Controls & Data Protection

This guide covers Domain 6: Security and Compliance for the AWS Certified DevOps Engineer Professional (DOP-C02). It focuses on the transition from manual security configurations to automated, scalable, and self-healing security architectures.


Learning Objectives

After studying this guide, you should be able to:

  • Automate credential rotation and identity management at scale.
  • Implement network security components including WAF, Shield, and Network Firewall using IaC.
  • Design multi-account security governance using AWS Control Tower and Organizations.
  • Orchestrate data protection workflows including encryption and sensitive data discovery with Amazon Macie.
  • Apply defense-in-depth strategies across multi-region environments.

Key Terms & Glossary

  • SCP (Service Control Policy): A type of organization policy used to manage permissions in your organization, acting as a guardrail for member accounts.
  • AWS STS (Security Token Service): A web service that enables you to request temporary, limited-privilege credentials for users.
  • ACM (AWS Certificate Manager): A service that lets you easily provision, manage, and deploy public and private SSL/TLS certificates.
  • Amazon Macie: A fully managed data security and data privacy service that uses machine learning to discover and protect sensitive data.
  • AWS Security Hub: A security center that provides a comprehensive view of your security state and helps you check your environment against security industry standards.

The "Big Idea"

[!IMPORTANT] The fundamental shift in the DevOps Professional domain is from reactive security (responding to incidents) to proactive automation (preventing incidents through code). In a multi-account environment, manual security is impossible. Automation ensures that every account, regardless of when it was created, inherits a baseline security posture (guardrails) automatically.


Formula / Concept Box

IAM Policy Evaluation Logic

In AWS, the evaluation of permissions follows a specific hierarchy. If a single policy contains an explicit Deny, the request is denied, regardless of how many Allow statements exist.

Evaluation StepRuleDescription
1. Explicit DenyDeny>AllowDeny > AllowAny explicit Deny override any Allow.
2. SCPGuardrailGuardrailIf the SCP doesn't allow it, the IAM user cannot perform it.
3. Permission BoundaryLimitLimitSets the maximum permissions an entity can have.
4. Explicit AllowAccessAccessMust exist for the action to succeed.
5. Implicit DenyDefaultDefaultIf no Allow is found, access is denied.

Hierarchical Outline

  1. Identity and Access at Scale
    • Machine Identities: Automating rotation via AWS Secrets Manager (e.g., RDS credentials).
    • Federation: Using IAM Identity Center for centralized SSO.
    • Guardrails: Implementing SCPs to restrict regions or sensitive API calls (e.g., s3:DeleteBucket).
  2. Infrastructure and Network Security
    • Edge Protection: Deploying AWS WAF for Layer 7 and AWS Shield for DDoS protection.
    • VPC Security: Layering Security Groups (stateful) and Network ACLs (stateless).
    • Centralized Inspection: Using AWS Network Firewall for deep packet inspection across VPCs.
  3. Data Protection & Encryption
    • Discovery: Scaling Amazon Macie to identify PII (Personally Identifiable Information) in S3.
    • At Rest: Using AWS KMS (Key Management Service) with automated key rotation.
    • In Transit: Automating certificate renewal via ACM.

Visual Anchors

Automated Security Governance Flow

This diagram illustrates how a new account is secured automatically when joined to the Organization.

Loading Diagram...
Figure 1 — Mermaid diagram

Defense in Depth (TikZ)

Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds
Figure 2 — TikZ diagram

Definition-Example Pairs

  • Credential Rotation: The process of changing a password or key at regular intervals.
    • Example: Configuring AWS Secrets Manager to rotate an RDS database password every 30 days using a Lambda function.
  • Data Classification: Categorizing data based on its sensitivity level.
    • Example: Using Amazon Macie to tag S3 buckets as "Internal" or "Confidential" based on the presence of credit card numbers.
  • Stateful Inspection: A firewall feature that tracks the state of active connections.
    • Example: A Security Group that automatically allows return traffic for an outgoing request without needing an explicit inbound rule.

Worked Examples

Example 1: Automating Remediation of Public S3 Buckets

Scenario: You need to ensure no S3 bucket is ever public.

  1. Detection: Create an AWS Config Rule s3-bucket-public-read-prohibited.
  2. Trigger: When the rule detects a non-compliant bucket, it triggers an Amazon EventBridge event.
  3. Action: The event targets an AWS Systems Manager (SSM) Automation Document.
  4. Remediation: The SSM document runs a script to set the bucket access to private.

Example 2: Cross-Account KMS Encryption

Scenario: Account A needs to encrypt data that Account B will decrypt.

  1. In Account A, create a Customer Managed Key (CMK).
  2. Update the Key Policy in Account A to grant kms:Decrypt and kms:DescribeKey permissions to the IAM Role in Account B.
  3. In Account B, ensure the IAM Role has the necessary identity-based permissions to call Account A's KMS Key ARN.

Checkpoint Questions

  1. What is the main difference between an IAM Policy and an SCP in an AWS Organization?
  2. Which service should you use to automatically discover unencrypted S3 buckets across 50 AWS accounts?
  3. How does AWS Secrets Manager differ from Systems Manager Parameter Store regarding credentials?
  4. True/False: A Network ACL is stateful, meaning it remembers connection states.
Click for Answers
  1. IAM Policies grant permissions to users/roles; SCPs act as guardrails that limit the maximum possible permissions for an account.
  2. AWS Security Hub (aggregated findings) or AWS Config (multi-account/multi-region aggregator).
  3. Secrets Manager supports built-in rotation and secret generation; Parameter Store is primarily for configuration storage (though it can store encrypted strings).
  4. False. Network ACLs are stateless; Security Groups are stateful.

Muddy Points & Cross-Refs

  • ACM Public vs. Private: Remember that ACM can provide free public certificates for CloudFront/ALB, but for internal microservices, you often need ACM Private CA, which has a monthly cost.
  • KMS Key Policy vs. IAM: A KMS key must have a key policy. Even if an IAM policy allows access, if the key policy doesn't explicitly allow the account (or the specific user), access is denied.
  • WAF vs. Network Firewall: WAF is for Web (HTTP/S) Layer 7. Network Firewall is for the VPC level (IP/Port/Protocols) and can filter non-web traffic like SSH or SMTP.

Comparison Tables

Security Groups vs. Network ACLs

FeatureSecurity Group (SG)Network ACL (NACL)
LevelInstance / ENI LevelSubnet Level
StateStateful (Returns allowed)Stateless (Return must be explicit)
RulesAllow onlyAllow and Deny
OrderAll rules evaluatedEvaluated in numerical order

AWS KMS vs. AWS CloudHSM

FeatureAWS KMSAWS CloudHSM
TenancyShared Multi-tenantDedicated Hardware
ManagementAWS ManagedUser Managed
StandardFIPS 140-2 Level 2FIPS 140-2 Level 3
CostLow ($1/key/mo)High (Hourly instance fee)

More Study Notes (188)

Mastering AWS CloudFormation StackSets: Multi-Account & Multi-Region Orchestration

Applying CloudFormation stack sets across multiple accounts and AWS Regions

895 words

Mastering System Configuration Changes in AWS

Applying configuration changes to systems

945 words

IAM Solutions for Multi-Account and Complex Organizations

Applying IAM solutions for multi-account and complex organization structures (for example, SCPs, assuming roles)

985 words

Mastering Scaling Metrics: AWS DevOps Professional Study Guide

Appropriate metrics for scaling services

940 words

AWS IAM: Mastering Entities and Access Control at Scale

Appropriate usage of different IAM entities for human and machine access (for example, users, groups, roles, identity providers, identity-based policies, resource-based policies, session policies)

1,054 words

Artifact Lifecycle Considerations: Generation, Storage, and Management

Artifact lifecycle considerations

820 words

Artifact Use Cases and Secure Management

Artifact use cases and secure management

875 words

Mastering Amazon CloudWatch Alarms: Standard and Custom Metrics

Associating CloudWatch alarms with CloudWatch metrics (standard and custom)

1,350 words

Examining Observability: Auditing, Monitoring, and Analyzing Logs and Metrics

Audit, monitor, and analyze logs and metrics to detect issues

925 words

Lab: Detecting Issues through Log Analysis and Metric Monitoring

Audit, monitor, and analyze logs and metrics to detect issues

1,050 words

Automating Monitoring and Event Management in Complex Environments

Automate monitoring and event management of complex environments

1,050 words

Lab: Automating Event-Driven Monitoring and Remediation

Automate monitoring and event management of complex environments

845 words

Mastering Automated Image Builds: EC2 Image Builder for DevOps Professional

Automating Amazon EC2 instance and container image build processes (for example, EC2 Image Builder)

945 words

Study Guide: Automating Credential Rotation for Machine Identities

Automating credential rotation for machine identities (for example, AWS Secrets Manager)

1,085 words

Mastering Automated System Inventory, Configuration, and Patching

Automating system inventory, configuration, and patch management (for example, Systems Manager, AWS Config)

920 words

Automating Security Controls in Multi-Account AWS Environments

Automating the application of security controls in multi-account and multi-Region environments (for example, AWS Security Hub, AWS Organizations, AWS Control Tower, AWS Systems Manager)

1,142 words

Configuration Management & Desired State Automation

Automating the configuration of software applications to the desired state (for example, OpsWorks, Systems Manager State Manager)

980 words

Automating Unit Tests and Code Coverage in AWS CI/CD

Automating unit tests and code coverage

880 words

Mastering AWS Multi-Account Structures and Governance

AWS account structures, best practices, and related AWS services

1,182 words

AWS Backup and Recovery Strategies: Disaster Recovery for DevOps Professionals

AWS Backup and recovery strategies (for example, pilot light, warm standby)

920 words

Mastering AWS CloudTrail: Log Events & Security Auditing

AWS CloudTrail log events

820 words

AWS Config and Rules: Governance, Compliance, and Remediation

AWS Config rules

890 words

AWS Metrics and Logging Mastery: CloudWatch, X-Ray, and Beyond

AWS metrics and logging services (for example, Amazon CloudWatch, AWS X-Ray)

1,350 words

AWS Service Health & Operational Monitoring Guide

AWS service health services (for example, AWS Health, CloudWatch, Systems Manager OpsCenter)

915 words

Mastering AWS Automation: Services, Tools, and Orchestration

AWS services and solutions to automate tasks and processes

985 words

AWS Security: Vulnerability Identification and Event Detection

AWS services for identifying security vulnerabilities and events (for example, GuardDuty, Amazon Inspector, IAM Access Analyzer, AWS Config)

925 words

Comprehensive Study Guide: AWS Event Management and Response

AWS services that generate, capture, and process events (for example, AWS Health, Amazon EventBridge, AWS CloudTrail)

892 words

Build and Manage Artifacts: AWS DevOps Professional Study Guide

Build and manage artifacts

920 words

Lab: Managing Artifact Lifecycles with AWS CodeBuild and S3

Build and manage artifacts

1,145 words

Mastering AWS Monitoring Visualizations: CloudWatch & QuickSight

Building CloudWatch dashboards and Amazon QuickSight visualizations

875 words

Mastering Event Processing Workflows for AWS DevOps Professional

Building event processing workflows (for example, Amazon Simple Queue Service [Amazon SQS], Amazon Kinesis, Amazon Simple Notification Service [Amazon SNS], AWS Lambda, AWS Step Functions)

920 words

AWS Multi-Service Auto Scaling: Architecture and Implementation

Capabilities of auto scaling for a variety of AWS services (for example, EC2 Auto Scaling groups, RDS storage auto scaling, Amazon DynamoDB, Amazon Elastic Container Service [Amazon ECS] capacity provider, Amazon Elastic Kubernetes Service [Amazon EKS] autoscalers)

1,050 words

Certificates and Public Key Infrastructure (PKI) in AWS

Certificates and public key infrastructure (PKI)

945 words

Study Guide: Change Management Processes for IaC-based Platforms

Change management processes for IaC-based platforms

1,084 words

AWS CloudWatch Agent: Collecting Custom Metrics (Study Guide)

Collecting custom metrics (for example, using the CloudWatch agent)

875 words

Mastering Defense in Depth: Orchestrating AWS Security Controls

Combining security controls to apply defense in depth (for example, AWS Certificate Manager [ACM], AWS WAF, AWS Config, AWS Config rules, Security Hub, Amazon GuardDuty, security groups, network ACLs, Amazon Detective, Network Firewall)

1,184 words

AWS Cloud Security Threats & Mitigation Study Guide

Common cloud security threats (for example, insecure web traffic, exposed AWS access keys, S3 buckets with public access enabled or encryption disabled)

920 words

AWS Monitoring: Common CloudWatch Metrics and Logs for EC2, RDS, and ALB

Common CloudWatch metrics and logs (for example, CPU utilization with Amazon EC2, queue length with Amazon RDS, 5xx errors with an Application Load Balancer [ALB])

875 words

AWS Infrastructure as Code (IaC): CloudFormation, SAM, and CDK

Composing and deploying IaC templates (for example, AWS Serverless Application Model [AWS SAM], AWS CloudFormation, AWS Cloud Development Kit [AWS CDK])

920 words

AWS Certified DevOps Engineer Professional: Configuration Management and IaC Study Guide

Configuration management services and strategies

1,150 words

Mastering AWS Configuration Management: AWS Config & Strategy

Configuration management services (for example, AWS Config)

920 words

AWS DevOps: Collection, Aggregation, and Storage of Logs and Metrics

Configure the collection, aggregation, and storage of logs and metrics.

875 words

AWS DevOps Pro Lab: Advanced Log and Metric Aggregation

Configure the collection, aggregation, and storage of logs and metrics.

945 words

Configuring Load Balancers for Backend Recovery and Resiliency

Configuring a load balancer to recover from backend failure

1,084 words

Mastering High Availability: Multi-AZ and Multi-Region Architectures

Configuring applications and related services to support multiple Availability Zones and AWS Regions while minimizing downtime

945 words

AWS Config: Automated Remediation and Governance

Configuring AWS Config rules to remediate issues

1,145 words

Mastering AWS X-Ray Configuration for Distributed Architectures

Configuring AWS X-Ray for different services (for example, containers, Amazon API Gateway, Lambda)

1,142 words

Configuring Build Tools & Artifact Generation: AWS DevOps Professional Guide

Configuring build tools for generating artifacts (for example, CodeBuild, AWS Lambda)

1,085 words

Configuring Code, Image, and Artifact Repositories

Configuring code, image, and artifact repositories

920 words

Mastering Deployment Agents: AWS CodeDeploy and Beyond

Configuring deployment agents (for example, CodeDeploy agent)

920 words

Mastering Log Data Encryption with AWS KMS

Configuring encryption of log data (for example, AWS KMS)

890 words

Study Guide: Configuring Amazon EventBridge for Pattern-Based Notifications

Configuring EventBridge to send notifications based on a particular event pattern

1,085 words

Mastering AWS Health Checks: Route 53, ELB, and Auto Scaling

Configuring health checks (for example, Route 53, ALB)

1,350 words

Configuring S3 Event-Driven Log Processing and Delivery

Configuring S3 events to process log files (for example, by using Lambda) and deliver log files to another destination (for example, OpenSearch Service, CloudWatch Logs)

875 words

Securing Artifact Repositories: IAM and AWS CodeArtifact

Configuring security permissions to allow access to artifact repositories (for example, AWS Identity and Access Management [IAM], CodeArtifact)

1,145 words

Master Class: Configuring Resilient Serverless Architectures

Configuring serverless applications (for example, Amazon API Gateway, AWS Lambda, AWS Fargate)

820 words

AWS DevOps Professional: Service and Application Logging Strategy

Configuring service and application logging (for example, CloudTrail, Amazon CloudWatch Logs)

925 words

AWS Auto Scaling Solutions: Architecting for Elasticity

Configuring solutions for auto scaling (for example, DynamoDB, EC2 Auto Scaling groups, RDS storage auto scaling, ECS capacity provider)

940 words

Mastering AWS Container Platforms for DevOps Professionals

Container platforms

925 words

Mastering Artifact Repositories: AWS CodeArtifact, ECR, and S3

Creating and configuring artifact repositories (for example, AWS CodeArtifact, Amazon S3, Amazon Elastic Container Registry [Amazon ECR])

945 words

Mastering Amazon CloudWatch: Custom Metrics, Filters, and Automated Response

Creating CloudWatch custom metrics and metric filters, alarms, and notifications (for example, Amazon SNS, Lambda)

1,050 words

CloudWatch Metric Filters: Turning Logs into Actionable Metrics

Creating CloudWatch metrics from log events by using metric filters

1,105 words

Mastering CloudWatch Metric Streams for AWS DevOps

Creating CloudWatch metric streams (for example, Amazon S3 or Amazon Kinesis Data Firehose options)

845 words

Mastering Multi-Account Management: AWS Organizations & Control Tower

Creating, consolidating, and centrally managing accounts (for example, AWS Organizations, AWS Control Tower)

940 words

Data Management and Security: Classification, Encryption, and Access Control

Data management (for example, data classification, encryption, key management, access controls)

945 words

Cloud Infrastructure & Reusable IaC Components

Define cloud infrastructure and reusable components to provision and manage systems throughout their lifecycle

940 words

Mastering Reusable Infrastructure: AWS CloudFormation Nested Stacks

Define cloud infrastructure and reusable components to provision and manage systems throughout their lifecycle

782 words

Automating Multi-Account Governance and Security

Deploy automation to create, onboard, and secure AWS accounts in a multi-account or multi-Region environment

1,150 words

Lab: Automating Multi-Account Governance and Account Provisioning

Deploy automation to create, onboard, and secure AWS accounts in a multi-account or multi-Region environment

912 words

AWS Container Deployment: ECS and EKS Deep Dive

Deploying container-based applications (for example, Amazon Elastic Container Service [Amazon ECS], Amazon Elastic Kubernetes Service [Amazon EKS])

1,150 words

AWS Global Scalability: Multi-Region Deployment Strategies

Deploying workloads in multiple Regions for global scalability

920 words

AWS Deployment Methodologies: EC2, Containers, and Serverless

Deployment methodologies for various platforms (for example, Amazon EC2, Amazon Elastic Container Service [Amazon ECS], Amazon Elastic Kubernetes Service [Amazon EKS], Lambda)

925 words

Lab: Building Automated Compliance Remediation for Large-Scale Environments

Design and build automated solutions for complex tasks and large-scale environments

920 words

Mastering Large-Scale Automation for DevOps Professionals

Design and build automated solutions for complex tasks and large-scale environments

920 words

Designing Policies for Least Privilege Access

Designing policies to enforce least privilege access

880 words

AWS Certified DevOps Engineer - Professional: Deployment Strategies & AWS CodeDeploy

Determining appropriate deployment strategies (for example, AWS CodeDeploy)

1,120 words

AWS Configuration Management: Choosing the Right Service

Determining optimal configuration management services (for example, AWS OpsWorks, AWS Systems Manager, AWS Config, AWS AppConfig)

1,054 words

AWS Lambda & Step Functions: Automating Complex Scenarios

Developing AWS Lambda function automations for complex scenarios (for example, AWS SDKs, Lambda, AWS Step Functions)

890 words

Mastery Guide: Automated Testing in AWS CI/CD Pipelines

Different types of tests (for example, unit tests, integration tests, acceptance tests, user interface tests, security scans)

912 words

Disaster Recovery Strategies: RTO, RPO, and AWS Implementation

Disaster recovery concepts (for example, RTO, RPO)

1,050 words

AWS Masterclass: Enabling Cross-Region Solutions for Global Resiliency

Enabling cross-Region solutions where available (for example, Amazon DynamoDB, Amazon RDS, Amazon Route 53, Amazon S3, Amazon CloudFront)

985 words

AWS Security: Data Protection at Rest and in Transit

Encrypting data in transit and data at rest (for example, AWS Key Management Service [AWS KMS], AWS CloudHSM, ACM)

1,124 words

Mastering Encryption for Logs and Metrics in AWS

Encryption options for at-rest and in-transit logs and metrics (for example, client-side and server-side, AWS Key Management Service [AWS KMS])

945 words

Mastering Event-Driven Architectures: Fan-out, Streaming, and Queuing

Event-driven architectures (for example, fan out, event streaming, queuing)

925 words

Mastering Event-Driven & Asynchronous Design Patterns on AWS

Event-driven, asynchronous design patterns (for example, S3 Event Notifications or Amazon EventBridge events to Amazon Simple Notification Service [Amazon SNS] or Lambda)

945 words

Mastering Fleet Management: AWS Systems Manager & Auto Scaling

Fleet management services (for example, AWS Systems Manager, AWS Auto Scaling)

1,184 words

Mastering AWS Health Checks: ALB, Route 53, and Auto Scaling

Health check capabilities in AWS services (for example, ALB target groups, Amazon Route 53)

925 words

Comprehensive Monitoring and Logging for AWS DevOps Engineers

How to monitor applications and infrastructure

1,284 words

Scalable and Resilient Architectures: Scaling, Balancing, and Caching

Identifying and implementing appropriate auto scaling, load balancing, and caching solutions

1,184 words

Cross-Region Resilience: AWS Backup & Recovery Strategies

Identifying and implementing appropriate cross-Region AWS Backup and recovery strategies (for example, AWS Backup, Amazon S3, AWS Systems Manager)

920 words

Identifying and Remediating Scaling Issues: AWS DevOps Professional Study Guide

Identifying and remediating scaling issues

1,184 words

Mastering Resiliency: Identifying and Remediating Single Points of Failure (SPOF)

Identifying and remediating single points of failure in existing workloads

1,085 words

Mastering Identity Federation: AWS IAM Identity Center & Identity Providers

Identity federation techniques (for example, using IAM identity providers and AWS IAM Identity Center)

940 words

Lab: Automating Multi-Region Disaster Recovery for RTO/RPO Compliance

Implement automated recovery processes to meet RTO and RPO requirements

820 words

Mastering Automated Recovery: RTO/RPO and DR Strategies on AWS

Implement automated recovery processes to meet RTO and RPO requirements

1,245 words

AWS Certified DevOps Engineer Professional: Implementing CI/CD Pipelines

Implement CI/CD pipelines

1,150 words

Hands-On Lab: Implementing Multi-Stage CI/CD Pipelines with AWS CodePipeline

Implement CI/CD pipelines

1,050 words

Incident and Event Response: Implementing Automated Configuration Changes

Implement configuration changes in response to events

860 words

Lab: Auto-Remediating Non-Compliant S3 Buckets with AWS Config

Implement configuration changes in response to events

890 words

AWS Certified DevOps Pro: Deployment Strategies for Instance, Container, and Serverless Environments

Implement deployment strategies for instance, container, and serverless environments

940 words

Lab: Implementing Serverless Canary Deployments with AWS CodeDeploy

Implement deployment strategies for instance, container, and serverless environments

820 words

AWS DevOps: Implementing Highly Available & Resilient Solutions

Implement highly available solutions to meet resilience and business requirements

920 words

Lab: Building a High-Availability 3-Tier Web Stack on AWS

Implement highly available solutions to meet resilience and business requirements

1,142 words

Governance and Security Controls at Scale: AWS DevOps Professional Study Guide

Implementing and developing governance and security controls at scale (AWS Config, AWS Control Tower, AWS Security Hub, Amazon Detective, Amazon GuardDuty, Service Catalog, SCPs)

1,050 words

Mastering Reusable Infrastructure: Patterns, Governance, and Security in IaC

Implementing infrastructure patterns, governance controls, and security standards into reusable IaC templates (for example, AWS Service Catalog, CloudFormation modules, AWS CDK)

865 words

Mastering Robust Security Auditing on AWS

Implementing robust security auditing

1,080 words

Mastering Access Control Patterns: RBAC and ABAC for AWS DevOps

Implementing role-based and attribute-based access control patterns

925 words

AWS DevOps Professional: Security Monitoring and Auditing Solutions

Implement security monitoring and auditing solutions

1,145 words

Lab: Implementing Automated Security Monitoring and Auditing with AWS Config and GuardDuty

Implement security monitoring and auditing solutions

985 words

Scalable Solutions for Business Requirements: A DevOps Study Guide

Implement solutions that are scalable to meet business requirements

1,150 words

Scaling Serverless Architectures: Implementing Scalable API Solutions

Implement solutions that are scalable to meet business requirements

920 words

Scaling Identity and Access Management in AWS

Implement techniques for identity and access management at scale

1,180 words

Scaling Identity: Implementing Permissions Boundaries and Delegated Administration

Implement techniques for identity and access management at scale

945 words

Mastering Infrastructure as Code (IaC) and Configuration Management on AWS

Infrastructure as code (IaC) options and tools for AWS

1,050 words

Mastering EC2 Agents: SSM and CloudWatch Configuration

Installing and configuring agents on EC2 instances (for example, AWS Systems Manager Agent [SSM Agent], CloudWatch agent)

950 words

Integration of Automated Testing in CI/CD Pipelines: AWS DevOps Professional Guide

Integrate automated testing into CI/CD pipelines

1,145 words

Lab: Integrating Automated Testing into AWS CI/CD Pipelines

Integrate automated testing into CI/CD pipelines

820 words

AWS Event Source Integration: Proactive & Reactive Automation

Integrating AWS event sources (for example, AWS Health, EventBridge, CloudTrail)

948 words

Invoking AWS Services in a Pipeline for Testing

Invoking AWS services in a pipeline for testing

945 words

Mastering Loosely Coupled and Distributed Architectures for AWS DevOps

Loosely coupled and distributed architectures

945 words

Comprehensive Compliance and Patch Management with AWS Systems Manager

Maintaining software compliance (for example, Systems Manager)

948 words

Lab: Automating Event-Driven Security Notifications with Amazon EventBridge

Manage event sources to process, notify, and take action in response to events

1,050 words

Mastering Event-Driven Response: Processing, Notification, and Action

Manage event sources to process, notify, and take action in response to events

875 words

AWS Secret Management: Secrets Manager & Parameter Store

Managing build and deployment secrets (for example, AWS Secrets Manager, AWS Systems Manager Parameter Store)

890 words

AWS DevOps Pro: Managing Log Storage Lifecycles

Managing log storage lifecycles (for example, Amazon S3 lifecycles, CloudWatch log group retention)

985 words

Identity and Access Management for DevOps: Managing Human and Machine Permissions

Managing permissions to control access to human and machine identities (for example, enabling multi-factor authentication [MFA], AWS Security Token Service [AWS STS], IAM profiles)

1,250 words

Mastering Application Health via Exit Codes

Measuring application health based on application exit codes

820 words

Interacting with AWS Software-Defined Infrastructure

Methods and strategies to interact with the AWS software-defined infrastructure

924 words

Artifact Generation and Management in AWS CI/CD

Methods to create and generate artifacts

862 words

Modifying Infrastructure in Response to Events: DOP-C02 Study Guide

Modifying infrastructure configurations in response to events

925 words

AWS Resiliency: Multi-AZ and Multi-Region Architectures

Multi-AZ and multi-Region deployments (for example, compute layer, data layer)

1,050 words

AWS DevOps: Mutable vs. Immutable Deployment Patterns

Mutable deployment patterns in contrast to immutable deployment patterns

890 words

AWS Network Security Components: Defense in Depth

Network security components (for example, security groups, network ACLs, routing, AWS Network Firewall, AWS WAF, AWS Shield)

1,080 words

Comprehensive Study Guide: AWS Organizational Service Control Policies (SCPs)

Organizational SCPs

948 words

IAM Permissions Boundaries: Secure Delegation in AWS

Permission management delegation by using IAM permissions boundaries

920 words

AWS Pipeline Deployment Patterns: Single- and Multi-Account Strategies

Pipeline deployment patterns for single- and multi-account environments

1,085 words

CloudWatch Logs Subscriptions & Real-Time Processing Guide

Processing log data by using CloudWatch log subscriptions (for example, Amazon Kinesis, AWS Lambda, Amazon OpenSearch Service)

820 words

Mastering Real-Time Log Ingestion in AWS

Real-time log ingestion

925 words

Mastering Automated Testing in AWS CI/CD Pipelines

Reasonable use of different types of tests at different stages of the CI/CD pipeline

945 words

AWS Certified DevOps Professional: Automated Recovery Procedures Study Guide

Recovery procedures

985 words

Remediating a Non-Desired System State

Remediating a non-desired system state

820 words

Mastering Replication and Failover for Stateful Services

Replication and failover methods for stateful services

945 words

Mastering Root Cause Analysis (RCA) in AWS DevOps

Root cause analysis

980 words

Automating Pull Request Validation with AWS CodeBuild

Running builds or tests when generating pull requests or code merges (for example, CodeBuild)

945 words

DOP-C02: Performance Benchmarking and Testing at Scale

Running load/stress tests, performance benchmarking, and application testing at scale

820 words

AWS CloudWatch: Advanced Log Searching and Analysis

Searching log data by using filter and pattern syntax or Amazon CloudWatch Logs Insights

820 words

Secure Log Storage and Management: AWS DevOps Professional Study Guide

Securely storing and managing logs

1,150 words

AWS Security Auditing & Compliance Mastery

Security auditing services and features (for example, AWS CloudTrail, AWS Config, VPC Flow Logs, AWS CloudFormation drift detection)

1,050 words

Security Configurations for Log Collection: IAM & Permissions

Security configurations (for example, IAM roles and permissions to allow for log collection)

985 words

Comprehensive Study Guide: Serverless Architectures in AWS

Serverless architectures

1,184 words

Mastering AWS CodeBuild for CI/CD Pipelines

Setting up build processes (for example, AWS CodeBuild)

842 words

AWS Certified DevOps Engineer - Professional: Automated Operations & Incident Response

Skills in:

920 words

AWS Certified DevOps Engineer - Professional: Core Implementation Skills Guide

Skills in:

1,050 words

AWS Certified DevOps Engineer - Professional (DOP-C02): Automation, Resiliency, and Security Study Guide

Skills in:

1,182 words

AWS Certified DevOps Engineer Professional (DOP-C02): Core Skills & Implementation

Skills in:

945 words

AWS Certified DevOps Engineer - Professional (DOP-C02): Core Skills Study Guide

Skills in:

1,145 words

AWS Certified DevOps Engineer Professional (DOP-C02): Master Study Guide

Skills in:

985 words

AWS Certified DevOps Engineer - Professional (DOP-C02): Practical Skills & Automation Study Guide

Skills in:

1,184 words

AWS Certified DevOps Engineer Professional: Incident Response, Resilience, and Security

Skills in:

920 words

AWS Certified DevOps Engineer - Professional: Mastery of Advanced Operations and Security

Skills in:

1,150 words

AWS Certified DevOps Engineer Professional: Monitoring, Event Response, and Security Mastery

Skills in:

1,184 words

AWS Certified DevOps Engineer Professional: Operational Excellence & Resilient Solutions

Skills in:

1,084 words

AWS DevOps Professional: Event Response, Monitoring, and Scalability

Skills in:

945 words

AWS DOP-C02: Incident Response, Scalability, and Security Automation

Skills in:

1,050 words

AWS DOP-C02: Monitoring, Event-Driven Automation, and High Availability

Skills in:

895 words

AWS DOP-C02: Monitoring, Event Response, and Security Automation

Skills in:

1,342 words

AWS DOP-C02 Professional Study Guide: Automation, Resiliency, and Security

Skills in:

1,342 words

DOP-C02 Master Study Guide: Applied DevOps Skills for the AWS Professional

Skills in:

1,485 words

Mastering Incident Response and Event-Driven Monitoring (AWS DOP-C02)

Skills in:

1,184 words

Mastery of Implementation Skills for AWS DevOps Engineer Professional (DOP-C02)

Skills in:

1,150 words

Comprehensive Guide to Service Level Agreements (SLAs)

SLAs

1,085 words

Comprehensive Study Guide: SDLC Concepts, Phases, and Models

Software development lifecycle (SDLC) concepts, phases, and models

890 words

Standardizing and Automating AWS Account Provisioning

Standardizing and automating account provisioning and configuration

820 words

High Availability and Fault Tolerance: Multi-AZ and Multi-Region Strategies

Techniques to achieve high availability (for example, Multi-AZ, multi-Region)

925 words

Testing Failover: Multi-AZ & Multi-Region Workloads

Testing failover of Multi-AZ and multi-Region workloads (for example, Amazon RDS, Amazon Aurora, Route 53, CloudFront)

1,050 words

AWS Code Distribution: CodeDeploy and EC2 Image Builder

Tools and services available for distributing code (for example, CodeDeploy, Image Builder)

920 words

Translating Business Requirements into Technical Resiliency Needs

Translating business requirements into technical resiliency needs

845 words

Mastering Deployment Troubleshooting: AWS DevOps Professional Guide

Troubleshooting deployment issues

920 words

Lab: Troubleshooting System and Application Failures on AWS

Troubleshoot system and application failures

940 words

Mastering Incident & Event Response: Troubleshooting System and Application Failures

Troubleshoot system and application failures

1,054 words

Unit 1: SDLC Automation — AWS Certified DevOps Engineer Professional

Unit 1: SDLC Automation

940 words

Unit 2 Study Guide: Configuration Management and Infrastructure as Code (IaC)

Unit 2: Configuration Management and IaC

1,050 words

Unit 3: Resilient Cloud Solutions - Study Guide

Unit 3: Resilient Cloud Solutions

1,050 words

AWS DevOps Professional: Monitoring and Logging Study Guide

Unit 4: Monitoring and Logging

945 words

Unit 5: Incident and Event Response - DOP-C02 Study Guide

Unit 5: Incident and Event Response

1,150 words

AWS Certified DevOps Engineer Professional: Unit 6 – Security and Compliance Study Guide

Unit 6: Security and Compliance

1,150 words

AWS Deployment Strategies: Blue/Green, Canary, and Beyond

Using different deployment methods (for example, blue/green, canary)

895 words

Mastering CI/CD Integration: Connecting Version Control to Application Environments

Using version control to integrate pipelines with application environments

925 words

Ready to practice? Jump straight in — no sign-up needed.

Take practice tests, review flashcards, and read study notes right now.

Take a Practice Test

AWS Certified DevOps Engineer - Professional (DOP-C02) Practice Questions

Try 15 sample questions from a bank of 1,168. Answers and detailed explanations included.

Q1easy

Which action is the standard method for a DevOps engineer to manually initiate and test a failover for an Amazon RDS DB instance that is configured for Multi-AZ?

A.

Force a crash of the database engine using a SQL command.

B.

Manually update the DNS record of the DB endpoint to the IP of the standby.

C.

Temporarily modify the DB instance to a Single-AZ deployment.

D.

Reboot the instance with the "Reboot with failover" option selected.

Show answer & explanation

Correct Answer: D

Amazon RDS Multi-AZ deployments provide high availability by synchronously replicating data to a standby instance in a different Availability Zone. While failovers are typically automatic (e.g., during AZ outages or primary failures), you can manually trigger one for testing purposes by selecting "Reboot with failover" in the RDS console, AWS CLI, or RDS API. This process reboots the primary, promotes the standby, and updates the DNS CNAME record to point to the new primary, allowing engineers to verify application reconnection logic.

Q2medium

An organization in AWS is configured with the hierarchy shown in the diagram. A Service Control Policy (SCP) that explicitly denies the iam:CreateUser action is applied to the Finance OU. A second SCP that explicitly allows all IAM actions (iam:*) is applied to the child Payroll OU. If an administrator in the Member Account has an IAM policy granting AdministratorAccess, which of the following best explains their ability to create a new IAM user?

A.

The administrator can create the user because the SCP at the Payroll OU level is more specific and overrides the parent Finance OU policy.

B.

The administrator can create the user because IAM policies attached to identity principals always take precedence over Organization-level SCPs.

C.

The administrator cannot create the user because Service Control Policies do not support the Deny effect and will default to a global restricted state if one is used.

D.

The administrator cannot create the user because an explicit deny in a parent OU's SCP is inherited and overrides any allows at lower levels or in IAM policies.

Show answer & explanation

Correct Answer: D

Service Control Policies (SCPs) act as a filter to define the maximum available permissions for an account or OU. In AWS Organizations, permissions are governed by a hierarchy where an action must be allowed by the SCPs at every level (Root, every parent OU, and the account itself) and also by the local IAM policy. Crucially, an explicit Deny in any SCP in the hierarchy (such as at the Finance OU level) overrides any Allow statements in child OUs or local IAM policies (like AdministratorAccess). Therefore, even though the Payroll OU SCP allows the action, the parent's Deny takes precedence.

Q3medium

A developer is implementing a fan-out pattern using Amazon SNS to decouple an order processing system. The system must notify three downstream consumers: an Inventory SQS queue, a Shipping SQS queue, and a Wholesale Analytics SQS queue. The Inventory and Shipping queues must receive all order messages, but the Wholesale Analytics queue must only receive messages where the order_type message attribute is set to wholesale.

Which configuration correctly applies the SNS fan-out pattern to meet these requirements with the least amount of custom application logic?

A.

Subscribe all three SQS queues to the SNS topic. Configure the Wholesale Analytics service to inspect the message body and discard non-wholesale orders.

B.

Subscribe the Inventory and Shipping queues to the SNS topic. Create a second SNS topic for wholesale orders and have the publisher send messages to both topics when a wholesale order is placed.

C.

Subscribe all three SQS queues to the SNS topic. Apply an SNS subscription filter policy to the Wholesale Analytics queue subscription that evaluates the order_type attribute.

D.

Subscribe a single SQS queue to the SNS topic. Use a Lambda function to poll the queue and synchronously invoke the Inventory, Shipping, and Analytics services based on the order value.

Show answer & explanation

Correct Answer: C

The Amazon SNS fan-out pattern involves sending a message to a topic and having it replicated to multiple subscribers. To handle conditional requirements (like only sending wholesale orders to a specific queue), the most efficient method is to use SNS Subscription Filter Policies. This offloads the filtering logic from the downstream consumer (Option A) or the publisher (Option B) to the SNS service itself, reducing compute costs and code complexity. Option D is incorrect as it introduces a synchronous bottleneck and tightly couples the services together.

Q4hard

A manufacturing plant is investigating a recurring failure in an automated assembly line. The team conducts a 5 Whys analysis to determine the cause of a critical motor burnout:

  1. Why did the motor burn out? The motor overheated significantly during the second shift.
  2. Why did it overheat? The internal cooling fan failed to engage when the temperature threshold was reached.
  3. Why did the fan fail to engage? The control circuit's relay was stuck in the 'open' position due to physical obstruction.
  4. Why was the relay stuck? Metallic debris from the nearby grinding station had accumulated inside the non-sealed relay housing.

At this point, the team decides to replace the relay with a sealed unit and install a localized dust shield. Which of the following best analyzes the effectiveness of this Root Cause Analysis (RCA)?

A.

The analysis is successful because it reached a 'Physical Root Cause' and provided a targeted engineering solution to prevent recurrence at that specific failure point.

B.

The analysis is over-extended; in industrial RCA, identifying the 'Point of Failure' (the relay) is sufficient to close the investigation and initiate an Equipment Maintenance (EM) update.

C.

The analysis is flawed because the 5 Whys technique is only statistically valid when all five levels are populated; stopping at four levels invalidates the logical chain in Six Sigma methodology.

D.

The analysis is incomplete because it stopped at a physical cause and failed to address the systemic reason (a 'Latent Root Cause') why debris was migrating from the grinding station or why maintenance protocols failed to detect the accumulation.

Show answer & explanation

Correct Answer: D

Effective Root Cause Analysis (RCA) distinguishes between Physical Root Causes (the tangible mechanism of failure, such as debris in a relay) and Latent or Systemic Root Causes (the process or organizational failures that allowed the condition to exist). By stopping at Step 4, the team implemented a 'patch' for one specific component but ignored the broader systemic issue: the grinding station's debris containment failure. Without addressing the system-level cause, other nearby electronics remain at risk.

Q5medium

An organization in AWS has a hierarchy consisting of a Root, a Production Organizational Unit (OU), and an AWS Account within that OU. The following Service Control Policies (SCPs) and permissions are in place: 1. The Root has the default FullAWSAccess SCP. 2. The Production OU has an SCP that explicitly denies dynamodb:* actions. 3. The AWS Account has an SCP that explicitly allows dynamodb:* actions. 4. An IAM user within the AWS Account has an IAM policy granting AdministratorAccess. Which of the following best explains whether the IAM user can perform a dynamodb:PutItem action?

A.

The user cannot perform the action because the explicit deny at the OU level overrides any allows at the account or IAM level.

B.

The user can perform the action because the AWS Account SCP explicitly allows it, which overrides the OU-level restriction.

C.

The user can perform the action because the IAM AdministratorAccess policy provides full permissions that bypass SCP filters.

D.

The user cannot perform the action because the Root SCP must explicitly list every allowed action to enable it for sub-entities.

Show answer & explanation

Correct Answer: A

In AWS Organizations, Service Control Policies (SCPs) act as a filter. For an action to be permitted, it must be allowed at every level of the hierarchy (Root, OU, and Account) and not explicitly denied at any level. An explicit Deny in any SCP applicable to the account (including parent OUs) overrides any Allow statement. Since the Production OU has an explicit deny for DynamoDB, the user is blocked regardless of the Account-level SCP or the IAM AdministratorAccess policy.

Q6easy

Which security principle should be applied when configuring IAM policies to restrict access to sensitive log data stored in Amazon CloudWatch or Amazon S3?

A.

The principle of implicit allow

B.

The principle of maximum availability

C.

The principle of transitive trust

D.

The principle of least privilege

Show answer & explanation

Correct Answer: D

The principle of least privilege is a fundamental security concept that involves granting users only the minimum levels of access—or permissions—needed to perform their job functions. When managing log access, this ensures that only authorized personnel (such as security auditors or system administrators) can view or manage sensitive log data, thereby reducing the risk of unauthorized data exposure.

Q7hard

A DevOps engineer is optimizing the artifact lifecycle for a microservices application that uses Amazon S3 for build binaries and Amazon ECR for container images. The current system is incurring high costs due to thousands of development snapshots. The following requirements must be met:

  1. Production releases must be available for immediate rollback for 90 days.
  2. Production releases must be archived for 5 years to satisfy regulatory compliance.
  3. Development and feature branch artifacts should be automatically purged after 30 days to minimize storage costs.
  4. Deployment velocity must not be impacted by recovery times for recent releases.

Which lifecycle management strategy represents the most effective analysis of these considerations?

A.

Configure a single S3 Lifecycle policy to transition all objects to S3 Glacier Deep Archive after 30 days. For ECR, implement a lifecycle policy to delete all images older than 30 days.

B.

Utilize S3 Lifecycle rules based on object tags: expire artifacts tagged environment: dev after 30 days; transition artifacts tagged environment: prod to S3 Glacier Flexible Retrieval after 90 days with a total retention of 5 years. Apply ECR lifecycle policies to expire images with the dev- prefix after 30 days.

C.

Enable S3 Versioning and set a lifecycle policy to expire non-current versions after 30 days. For ECR, use a lifecycle policy to retain only the 100 most recent images regardless of their tags or environment.

D.

Implement S3 Lifecycle policies based on prefixes: expire /builds/dev/ after 30 days; transition /builds/prod/ to S3 Glacier Instant Retrieval after 90 days and then to S3 Glacier Deep Archive after 5 years. Use ECR lifecycle policies to expire untagged images and those with feature-* tags after 30 days.

Show answer & explanation

Correct Answer: D

Option D is the most effective because it addresses all requirements while optimizing for cost and performance. Keeping production artifacts in S3 Standard for 90 days ensures immediate availability for rollbacks without the retrieval latency associated with Glacier. Transitioning to Glacier Instant Retrieval or Deep Archive after that period satisfies the 5-year compliance requirement at a lower cost. Using prefixes (/dev/ vs /prod/) or tags is a standard way to differentiate lifecycle paths. Expiring untagged or feature-tagged images in ECR specifically targets the high-churn development artifacts without risking production stability.

Q8medium

A DevOps Engineer needs to ensure that a fleet of Amazon EC2 instances consistently maintains a specific software configuration. All instances tagged with Role: WebServer must have a specific version of a monitoring agent installed and configured. If any instance deviates from this configuration or if new instances are launched with the same tag, the configuration must be automatically reapplied with minimal administrative effort. Which AWS Systems Manager feature should be used to achieve this?

A.

Create a State Manager association that uses an SSM document to install and configure the agent, targeting instances by the Role: WebServer tag.

B.

Configure an SSM Run Command task within a Maintenance Window to execute an SSM document every 24 hours on the tagged instances.

C.

Use Systems Manager Inventory to monitor the software state and configure an Amazon EventBridge rule to trigger a Lambda function for remediation.

D.

Create an SSM Automation document that checks for the agent and execute it manually whenever a new instance is launched.

Show answer & explanation

Correct Answer: A

AWS Systems Manager State Manager is specifically designed to define and maintain a 'desired state' for your managed instances. By creating an association, you link an SSM document (which defines the configuration) to a set of targets (defined by tags, IDs, or resource groups). State Manager automatically applies the configuration when the association is created, periodically according to a schedule, and importantly, to new instances as soon as they match the target criteria. While Run Command (Option B) can be scheduled, it is intended for ad-hoc tasks and does not provide the same built-in state-persistence and auto-remediation logic as State Manager. Option C is a complex architectural workaround, and Option D involves manual intervention, which does not meet the requirement for automation.

Q9medium

A DevOps engineer is configuring cross-account access to allow an IAM user in Account B (111122223333) to access an S3 bucket in Account A (444455556666). Which of the following configurations correctly implements the trust relationship and the necessary permissions using AWS STS?

A.

In Account A, create an IAM role with a trust policy that allows the Account B principal to perform sts:AssumeRole. In Account B, attach an identity-based policy to the IAM user that allows sts:AssumeRole on the role's ARN.

B.

In Account A, attach a bucket policy to the S3 bucket that allows the sts:AssumeRole action for the IAM user in Account B. In Account B, use the sts:GetSessionToken API to generate credentials.

C.

In Account A, create an IAM user and share the access keys with the Account B user. In Account B, update the Service Control Policy (SCP) to allow cross-account sts:AssumeRole actions for all users.

D.

In Account B, create an IAM role with a trust policy for Account A. In Account A, create an IAM group containing the Account B user and attach an S3 full access policy to the group.

Show answer & explanation

Correct Answer: A

To enable cross-account access via AWS STS, a two-way permission structure is required: 1. The Trust Policy (attached to the role in the resource account, Account A) must explicitly allow the principal in Account B to perform the sts:AssumeRole action. 2. The Identity-based Policy (attached to the user in the identity account, Account B) must grant the user permission to call sts:AssumeRole on the specific ARN of the role in Account A. When the user calls the STS API, they receive temporary security credentials to access resources in Account A.

Q10hard

During a security audit of a container-based CI/CD pipeline, a DevOps engineer identifies that the team is relying solely on unit and integration tests to ensure application quality. The auditor recommends implementing security scans to mitigate risks such as hardcoded secrets, vulnerable third-party libraries, and insecure base images. Which combination of security scanning techniques, when integrated into the pipeline, provides the most comprehensive analysis for these specific vulnerabilities?

A.

Use Static Application Security Testing (SAST) for secrets detection; use Software Composition Analysis (SCA) to identify vulnerable dependencies; and use Amazon Inspector to scan container images.

B.

Use Dynamic Application Security Testing (DAST) during the build phase; use Amazon Macie to scan the application source code; and use AWS Config to monitor container runtime security.

C.

Use Unit Testing to validate encryption logic; use Integration Testing to check connectivity to security services; and use Amazon GuardDuty to identify vulnerabilities in the build environment.

D.

Use Acceptance Testing to verify security requirements; use IAM Access Analyzer to detect hardcoded secrets; and use AWS Systems Manager Patch Manager to update container images during deployment.

Show answer & explanation

Correct Answer: A

To analyze and mitigate the specific risks mentioned: 1. Hardcoded secrets are best identified using Static Application Security Testing (SAST) tools. These tools perform a static analysis of the source code to find patterns matching credentials or API keys. 2. Vulnerable third-party libraries are identified using Software Composition Analysis (SCA). SCA tools analyze the project's dependency manifest (e.g., package.json, pom.xml) and cross-reference versions against known vulnerability databases (like CVE). 3. Insecure base images (and OS-level vulnerabilities within the container) are identified by scanning the built image. Amazon Inspector provides automated scanning for images stored in Amazon ECR. Other options are incorrect because DAST is typically performed on a running application, Amazon Macie targets sensitive data in S3 rather than source code, and Amazon GuardDuty is a runtime threat detection service rather than a build-time vulnerability scanner.

Q11medium

An AWS Organization uses the hierarchical structure shown in the diagram. The following policies are applied:

  1. Root: Attached with the default FullAWSAccess Service Control Policy (SCP).
  2. OU_Management: Attached with an SCP that explicitly allows only $ec2:*$ and $s3:*$ actions.
  3. Account_Dev: A developer has an identity-based IAM policy granting AdministratorAccess ($*:*$).

If the developer attempts to create an Amazon RDS instance in Account_Dev, which of the following describes the outcome?

A.

The request is allowed because the Root allows all actions and the user has `$AdministratorAccess$$.

B.

The request is denied because the FullAWSAccess policy at the Root level is overridden by the user's specific IAM policy.

C.

The request is allowed because Service Control Policies cannot restrict the permissions of the root user or administrators in a member account.

D.

The request is denied because the SCP at OU_Management does not explicitly allow RDS actions.

Show answer & explanation

Correct Answer: D

In AWS Organizations, Service Control Policies (SCPs) act as a filter for the maximum available permissions in an account. For an action to be successful, it must be permitted by the SCP at every level of the hierarchy (Root, OUs, and the Account itself) AND by the user's IAM policy. Because the SCP at OU_Management restricts allowed actions to only EC2 and S3, it effectively blocks RDS actions for all principals in Account_Dev, even if they have AdministratorAccess in their IAM policy.

Q12easy

When performing an in-place deployment on Amazon EC2 using AWS CodeDeploy, which of the following describes how the update is applied to the instances?

A.

A new set of replacement instances is provisioned and the old instances are terminated after a traffic swap.

B.

The application revision is deployed to a staging environment first, and then the environment URLs are swapped via Route 53.

C.

A new Auto Scaling group is created with the new version, and the old group is deleted once the new group is healthy.

D.

The application on each instance is stopped, the latest revision is installed, and the application is then started and validated.

Show answer & explanation

Correct Answer: D

In an in-place deployment, AWS CodeDeploy installs the application revision on the existing instances in the deployment group. Each instance is taken offline briefly: the service is stopped, the new version is installed, and the service is restarted. This is distinct from a blue/green deployment, where a new environment (Green) is provisioned to replace the old one (Blue).

Q13easy

In the context of high availability for stateful services, which of the following best defines the concept of failover?

A.

The process of creating read-only copies of a database to reduce latency for global users.

B.

The manual restoration of a system state using point-in-time snapshots stored in a separate region.

C.

The automated switch to a redundant or standby instance when the primary component becomes unavailable.

D.

The periodic synchronization of application logs between different availability zones for auditing.

Show answer & explanation

Correct Answer: C

Failover is defined as the process—typically automated in modern managed services—whereby a redundant standby or replica instance assumes the role of the primary instance following a failure. For example, Amazon RDS Multi-AZ uses synchronous replication to a standby instance and provides automatic failover to minimize downtime.

Q14easy

According to the 'Skills in' section of the AWS Certified DevOps Engineer – Professional curriculum regarding configuration management, which of the following is a tool used for composing and deploying Infrastructure as Code (IaC) templates?

A.

Amazon S3

B.

AWS CloudFormation

C.

AWS Trusted Advisor

D.

Amazon Route 53

Show answer & explanation

Correct Answer: B

In Unit 2 (Configuration Management and IaC) of the DOP-C02 curriculum, the 'Skills in' section specifically identifies composing and deploying IaC templates using tools such as AWS CloudFormation, AWS Serverless Application Model (AWS SAM), and AWS Cloud Development Kit (AWS CDK) as a core requirement for defining cloud infrastructure.

Q15easy

Which AWS Systems Manager capability is primarily used to collect and view metadata from managed instances, such as installed applications, OS versions, and network configurations?

A.

State Manager

B.

Patch Manager

C.

Inventory

D.

Explorer

Show answer & explanation

Correct Answer: C

AWS Systems Manager Inventory is designed to collect and display metadata about the software and configuration of your managed instances. This includes details like installed applications, operating system versions, network configurations, and running services. State Manager (Option A) is used to maintain a consistent configuration; Patch Manager (Option B) automates the process of patching managed instances; and Explorer (Option D) is an operations dashboard that summarizes data across AWS accounts and Regions.

These are 15 of 1,168 questions available. Take a practice test →

AWS Certified DevOps Engineer - Professional (DOP-C02) Flashcards

851 flashcards for spaced-repetition study. Showing 30 sample cards below.

Alert Notification and Action Capabilities(5 cards shown)

Question

EC2 Automatic Recovery

Answer

A CloudWatch alarm action that automatically recovers an EC2 instance if it becomes impaired due to an underlying hardware failure.

[!NOTE] The recovered instance is identical to the original instance, including its Instance ID, Private IP, Elastic IP, and all instance metadata.

Condition: Triggered by the StatusCheckFailed_System metric.

Question

What are the five common targets for an Amazon EventBridge rule triggered by an AWS Health event?

Answer

According to the AWS Health workflow, common targets include:

  1. AWS Lambda functions (e.g., to send a notification to Slack)
  2. Amazon SNS topics (e.g., for email or SMS alerts)
  3. Amazon SQS queues
  4. Amazon Kinesis Data Streams
  5. Built-in targets (e.g., CloudWatch alarm actions)

[!TIP] Use Lambda if you need to transform the event data before sending it to a third-party tool like Slack or PagerDuty.

Question

In CloudWatch, you can configure an alarm to send a notification to an ___ topic or trigger an ___ function when the alarm state changes.

Answer

Amazon SNS; AWS Lambda

Context:

  • SNS is typically used for human notifications or fan-out patterns.
  • Lambda is used for custom automated remediation logic, such as updating a security group or restarting a service.

Question

Comparison of CloudWatch Alarm Actions

Answer

CloudWatch Alarms can trigger various automated responses:

Action CategoryService/FeatureUse Case
NotificationsAmazon SNSEmail, SMS, or triggering HTTPS endpoints.
Auto ScalingEC2 Auto ScalingScaling groups in or out based on demand.
EC2 ActionsStop, Terminate, Reboot, RecoverManaging instance state based on health.
Systems ManagerOpsCenter / Incident ManagerCreating OpsItems or starting Incident response.

[!WARNING] Standard resolution metrics are 60 seconds; high-resolution metrics can be as low as 1 second, affecting how quickly an alarm triggers.

Question

Diagram a typical event-driven remediation workflow for an EC2 disk space issue.

Answer

This workflow uses the CloudWatch Agent to monitor internal OS metrics and trigger an automated fix.

Loading Diagram...
Figure 1 — Mermaid diagram

[!TIP] For the DOP-C02 exam, remember that CloudWatch cannot see disk space or memory without the CloudWatch Agent installed.

Amazon CloudWatch Metrics Fundamentals(4 cards shown)

Question

CloudWatch Namespace

Answer

A Namespace is a container for CloudWatch metrics.

Key characteristics:

  • Metrics in different namespaces are isolated from each other.
  • There is no default namespace.
  • AWS namespaces follow the convention: AWS/service (e.g., AWS/EC2, AWS/S3).

[!TIP] Use namespaces to group metrics for different applications or departments to prevent data collision.

Question

Why are Memory Utilization and Disk Space metrics not available for Amazon EC2 by default in CloudWatch?

Answer

CloudWatch only collects hypervisor-level metrics (like CPU, Network, and Status Checks) automatically.

To collect OS-level metrics like memory and disk usage, you must:

  1. Install the CloudWatch Agent on the EC2 instance.
  2. Configure the agent to push these specific custom metrics to CloudWatch.
Metric TypeCollection MethodExamples
StandardHypervisor (Default)CPUUtilization, NetworkIn
CustomCloudWatch AgentMem_used, Disk_used_percent

[!NOTE] CloudWatch is a regional service; metrics cannot be aggregated across different AWS Regions.

Question

Explain the difference between Standard Resolution and High Resolution metrics.

Answer

CloudWatch metrics are distinguished by how frequently data is published and stored.

Comparison Table

FeatureStandard ResolutionHigh Resolution
Interval1-minute (60s)1-second
Use CaseGeneral monitoringHigh-frequency / Sub-minute monitoring
AlarmsCan be 60s or moreCan be as low as 10s or 30s
Loading Diagram...
Figure 1 — Mermaid diagram

[!NOTE] When you publish a high-resolution metric, CloudWatch stores it with a resolution of 1 second, and you can read and retrieve it with a period of 1 second, 5 seconds, 10 seconds, 30 seconds, or any multiple of 60 seconds.

Question

How does CloudWatch handle Metric Math and what is its primary benefit?

Answer

Metric Math allows you to query multiple CloudWatch metrics and use mathematical expressions to create new time series based on these metrics.

Common Use Cases:

  • Calculating the sum of CPUUtilization across a cluster of instances.
  • Computing the percentage of failed requests: (Errors / TotalRequests) * 100.
  • Visualizing the delta or rate of change between two metrics.
Compiling TikZ diagram…
Running TeX engine…
This may take a few seconds
Figure 1 — TikZ diagram

[!TIP] Metric Math can be used in CloudWatch Dashboards and when defining CloudWatch Alarms.

Amazon CloudWatch Metric Streams(5 cards shown)

Question

CloudWatch Metric Streams

Answer

A fully managed feature that allows you to continuously stream CloudWatch metrics to a destination of your choice with low latency and high scale.

[!TIP] Use Metric Streams for near real-time dashboards in third-party tools like Datadog or New Relic, rather than polling the GetMetricData API.

Question

What are the two primary output formats supported by CloudWatch Metric Streams for data delivery?

Answer

Metric Streams support the following formats:

  1. OpenTelemetry (OTLP v0.7.0): The industry standard for observability data, ideal for third-party providers.
  2. JSON: A structured text format useful for custom processing or long-term storage in Amazon S3.
FormatPrimary Use Case
OTLPPartner integrations (e.g., Dynatrace, Splunk)
JSONCustom analytics and S3 data lakes

Question

To stream metrics to an Amazon S3 bucket, CloudWatch Metric Streams must use ___ as the delivery intermediary.

Answer

Amazon Kinesis Data Firehose

Metric Streams do not write directly to S3. Instead, they send data to a Kinesis Data Firehose delivery stream, which then batches and delivers the data to S3, Amazon Redshift, or Amazon OpenSearch Service.

[!NOTE] Ensure the IAM role associated with the Metric Stream has permissions to put records into the Firehose stream.

Question

Concept: Metric Streams vs. API Polling

Answer

Compare continuous streaming with traditional polling methods:

  • Metric Streams (Push): Continuous flow, lower latency, scales automatically with metric volume. Billed per metric update.
  • Polling (Pull/GetMetricData): Request-based, can hit API rate limits at scale, often results in data staleness. Billed per API call.

[!WARNING] For large-scale environments with thousands of metrics, polling can become cost-prohibitive and slow compared to Metric Streams.

Question

How does the architecture for a CloudWatch Metric Stream look when sending data to a cross-account S3 bucket? (Identify the flow)

Answer

The flow involves metrics being streamed from CloudWatch to a Firehose stream, which then assumes a role to write to the destination S3 bucket.

Loading Diagram...
Figure 1 — Mermaid diagram

[!IMPORTANT] You can use Filters to specify exactly which namespaces (e.g., AWS/EC2, AWS/Lambda) or specific metrics should be included or excluded from the stream.

Amazon Inspector and Assessment Templates(3 cards shown)

Question

How does Amazon Inspector initiate vulnerability scans across a fleet of Amazon EC2 instances?

Answer

Amazon Inspector automatically discovers and begins scanning eligible EC2 instances without requiring manual scan scheduling or configuration. Inspector continuously assesses resources throughout their lifecycle and automatically rescans them in response to changes or newly published CVEs.

Question

How does Amazon Inspector perform assessment scans on eligible AWS resources?

Answer

Amazon Inspector automatically discovers and continually scans eligible resources without requiring manually scheduled or configured assessment scans. Justification: Documentation specifies that Amazon Inspector continuously assesses resources throughout their lifecycle and automatically rescans them when resource changes occur or new CVEs are published.

Question

Explain the relationship between the Inspector Agent and Telemetry.

Answer

The Inspector Agent is software installed on EC2 instances within the assessment target.

Telemetry is the actual data (configuration and behavior) collected by the agent during an assessment run. This data is passed back to the Inspector service engine for analysis against specified rules packages.

Loading Diagram...
Figure 1 — Mermaid diagram

Analyzing Failed Deployments (AWS DOP-C02)(5 cards shown)

Question

MinimumHealthyHosts (AWS CodeDeploy)

Answer

A parameter in a CodeDeploy Deployment Configuration that defines the minimum number or percentage of instances that must remain in the Healthy state during a deployment.

[!WARNING] If the number of healthy instances falls below this threshold, CodeDeploy immediately marks the deployment as Failed.

Common Settings:

  • FLEET_PERCENT: e.g., 50% must stay up.
  • HOST_COUNT: e.g., at least 2 instances must stay up.

Question

How can you automate real-time notifications for AWS CodeBuild failures to a Slack channel?

Answer

The most efficient architectural pattern involves Amazon EventBridge and AWS Lambda:

  1. Event Source: Create an EventBridge rule where the source is aws.codebuild and the detail-type is CodeBuild Build State Change.
  2. Filter: Set the state to FAILED.
  3. Target: Trigger an AWS Lambda function.
  4. Action: The Lambda function parses the build ID and sends the formatted message to a Slack Webhook.
ComponentRole
CloudWatch LogsStores the actual stdout/stderr for Root Cause Analysis (RCA).
EventBridgeOrchestrates the event-driven notification.
SNS/LambdaDelivers the alert to the end-user.

Question

To identify if resources in a stack have been modified outside of the original template, you should use AWS CloudFormation ___ ___.

Answer

Drift Detection

Drift detection identifies unmanaged configuration changes (e.g., someone manually changing a Security Group rule in the Console) that cause the stack to diverge from its intended template state.

[!NOTE] Drift detection does not automatically fix the drift; it only reports the difference between the expected and actual property values.

Question

Automated Rollback Strategy in CodeDeploy

Answer

CodeDeploy can be configured to automatically roll back a deployment when a CloudWatch Alarm is triggered or when a deployment fails.

Loading Diagram...
Figure 1 — Mermaid diagram

Configuration Steps:

  1. Create a CloudWatch Alarm (e.g., 5xx Errors > 5%).
  2. In the CodeDeploy Deployment Group, enable Rollback configuration.
  3. Select "Roll back when a deployment fails" OR "Roll back when a CloudWatch alarm threshold is met".

Question

What is the primary benefit of using CloudWatch Synthetics (Canaries) for analyzing failed deployments compared to standard CloudWatch Alarms?

Answer

CloudWatch Synthetics provides "outside-in" proactive monitoring.

  • Standard Alarms: Usually monitor internal metrics (CPU, Memory, 5xx counts) which might not catch client-side UI failures or broken user workflows.
  • Canaries: Run modular scripts (Node.js/Python) that simulate user behavior (clicking buttons, logging in) 24/7.

[!TIP] Use Canaries to verify that a deployment is successful from the customer's perspective, even if the underlying infrastructure reports as "Healthy".

Analyzing Incidents: Failed Processes in Auto Scaling, ECS, and EKS(5 cards shown)

Question

ECS Capacity Provider

Answer

A logical construct that links an Amazon ECS cluster with an Auto Scaling Group (ASG). It enables managed scaling of the infrastructure by automatically adjusting the ASG size based on the resource requirements of the ECS tasks.

[!TIP] Use Capacity Providers to avoid 'manual' scaling of EC2 instances; they ensure the cluster has enough capacity to run your tasks without over-provisioning.

Question

What permissions and mechanism are required for the Kubernetes Cluster Autoscaler to function on Amazon EKS?

Answer

The Cluster Autoscaler requires IAM permissions to describe and modify (e.g., SetDesiredCapacity, TerminateInstanceInAutoScalingGroup) EC2 Auto Scaling Groups.

Key Requirements:

  • Mechanism: IAM roles for service accounts (IRSA) via an IAM OIDC provider is the recommended approach for granting permissions.
  • Policy: The IAM policy must specifically allow actions on the ASG resources utilized by the EKS nodes.

[!WARNING] If the Cluster Autoscaler lacks these permissions, it will fail to launch new nodes when pods are in a 'Pending' state due to insufficient resources.

Question

To perform root cause analysis on a failed process across distributed containerized microservices, a DevOps engineer should use ___ for end-to-end request tracing and ___ for log aggregation and metric monitoring.

Answer

AWS X-Ray; Amazon CloudWatch

  • AWS X-Ray helps identify bottlenecks and failures in distributed systems by providing a visual map of service requests.
  • CloudWatch Logs Insights allows for rapid searching of container logs (e.g., from Fluent Bit or the AWS Logs driver) to find specific error signatures.

Question

Troubleshooting Workflow: EC2 Auto Scaling Launch Failures

Explain the primary steps to analyze an Auto Scaling Group that is not launching instances despite high demand.

Answer

The first step is always checking the Activity History in the EC2 Auto Scaling console. Common failure causes include:

CauseVerification Step
Service LimitsCheck Service Quotas for EC2 instance types in the specific Region.
IAM PermissionsEnsure the Service-Linked Role for Auto Scaling is present and has correct permissions.
VPC CapacityCheck that the subnets have available IP addresses.
Invalid ConfigurationVerify the Launch Template/Configuration for incorrect AMI IDs or Instance Types.
Loading Diagram...
Figure 1 — Mermaid diagram

Question

Based on the diagram below, which AWS component is missing (labeled '???') that evaluates the metric and triggers the scaling action?

Loading Diagram...
Figure 1 — Mermaid diagram

Answer

CloudWatch Alarms

CloudWatch Alarms evaluate metrics against a static threshold or anomaly detection band. When the metric stays above/below the threshold for a specified number of periods, the alarm enters the ALARM state and triggers the configured scaling policy.

[!NOTE] For ECS, you can use Target Tracking Scaling, which creates the CloudWatch Alarms automatically based on a metric like ECSServiceAverageCPUUtilization.

Analyzing logs, metrics, and security findings(3 cards shown)

Question

CloudWatch Metric Filters

Answer

Metric filters allow you to extract metric data from log events in CloudWatch Logs as they are ingested.

[!TIP] Use these to turn log patterns (like "ERROR" or "404") into numerical data that you can graph or use to trigger CloudWatch Alarms.

Question

What is the primary difference between CloudWatch Logs Insights and Amazon Athena for log analysis?

Answer

FeatureCloudWatch Logs InsightsAmazon Athena
Data SourceData stored in CloudWatch Log GroupsData stored in Amazon S3
Query LanguageCustom purpose-built syntaxStandard SQL
SpeedHighly optimized for log groupsHigh-performance for large S3 datasets
Use CaseQuick troubleshooting and real-time analysisLong-term trend analysis and large-scale data lakes

Question

To identify potential security threats like malicious IP addresses or anomalous API calls in an AWS environment, you should use ___, while ___ is better suited for scanning EC2 instances and container images for software vulnerabilities.

Answer

Amazon GuardDuty; Amazon Inspector

  • GuardDuty: Threat detection service that monitors for malicious activity (e.g., crypto-mining, IAM unauthorized access) using machine learning and threat intelligence.
  • Inspector: Automated vulnerability management service that scans workloads for software vulnerabilities and unintended network exposure.

Showing 30 of 851 flashcards. Study all flashcards →

Ready to ace AWS Certified DevOps Engineer - Professional (DOP-C02)?

Access all 1,168 practice questions, study notes, and flashcards — no sign-up required.

Start Studying — Free