BrainyBeeBrainyBee
ExploreBlogStart Studying
Home›Explore›AWS Certified DevOps Engineer - Professional (DOP-C02)

☁️ 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,159
Practice Questions
14
Mock Exams
198
Study Notes
837
Flashcard Decks
67
Source Materials
Start Studying — Free

On This Page

  • Study Notes (198)
  • Practice Questions (15)
  • Flashcards (30)
  • Related Study Resources

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 (parseparseparse, filterfilterfilter, statsstatsstats).
  • 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\\sigmasigma): 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: MMM out of NNN 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 > AllowDeny>AllowAny explicit Deny override any Allow.
2. SCPGuardrailGuardrailGuardrailIf the SCP doesn't allow it, the IAM user cannot perform it.
3. Permission BoundaryLimitLimitLimitSets the maximum permissions an entity can have.
4. Explicit AllowAccessAccessAccessMust exist for the action to succeed.
5. Implicit DenyDefaultDefaultDefaultIf 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,159. Answers and detailed explanations included.

Q1easy

A DevOps Engineer is tasked with setting up an automated system to notify the administration team via email whenever the average CPU utilization of a production web server fleet exceeds 80%. Which AWS service is the standard target for an Amazon CloudWatch alarm action to facilitate this type of notification?

A.

Amazon Simple Notification Service (Amazon SNS)

B.

Amazon Simple Queue Service (Amazon SQS)

C.

AWS Systems Manager OpsCenter

D.

Amazon CloudWatch Logs Insights

Show answer & explanation

Correct Answer: A

Amazon CloudWatch alarms are designed to monitor metrics and trigger automated actions based on state changes. To send human-readable notifications like email, SMS, or push messages, the standard procedure is to configure the alarm to publish a message to an Amazon SNS topic. SNS then handles the fan-out and delivery to its subscribers. While other targets like Lambda or EC2 Auto Scaling are possible for functional responses, SNS is the primary service for alerting personnel. Answer: A

Q2medium

An administrator needs to encrypt an existing CloudWatch Log Group named Production/Web/Access using a customer-managed AWS KMS key. Which AWS CLI command correctly performs this association?

A.
bash
aws logs put-kms-key --log-group-name Production/Web/Access --key-id <kms-key-id>
B.
bash
aws logs associate-kms-key --log-group-name Production/Web/Access --kms-key-id <kms-key-id>
C.
bash
aws cloudwatch set-encryption --resource Production/Web/Access --kms-key-arn <kms-key-arn>
D.
bash
aws logs create-log-group --log-group-name Production/Web/Access --kms-key-id <kms-key-id>
Show answer & explanation

Correct Answer: B

To associate a KMS key with an existing CloudWatch Log Group, you must use the associate-kms-key command within the logs service namespace. The command requires the --log-group-name and the --kms-key-id (which can be the key ARN, ID, or alias). Option D is incorrect because create-log-group is used for initialization, and it would fail if the log group already exists. Options A and C are not valid AWS CLI commands. Answer: B

Q3easy

Which statement best identifies the primary function of Service Control Policies (SCPs) within AWS Organizations for managing security controls?

A.

They are used to grant specific resource-level permissions to IAM users and roles in a member account.

B.

They define the maximum available permissions for all accounts within an organization or organizational unit (OU).

C.

They aggregate security findings from multiple AWS Regions into a single dashboard for compliance monitoring.

D.

They provide automated remediation of security vulnerabilities identified by Amazon GuardDuty.

Show answer & explanation

Correct Answer: B

Service Control Policies (SCPs) are a type of organization policy that you can use to manage permissions in your organization. SCPs offer central control over the maximum available permissions for all accounts in your organization, acting as guardrails. They do not grant permissions; rather, they limit the actions that users and roles (including the root user) can take in the affected accounts. Even if an IAM policy grants a permission, if an SCP denies it, the action is blocked. Answer: B

Q4easy

In Amazon CloudWatch Logs, which of the following filter patterns correctly identifies log events that contain either the term ERROR or the term CRITICAL?

A.

ERROR CRITICAL

B.

?ERROR ?CRITICAL

C.

-ERROR -CRITICAL

D.

{ ERROR || CRITICAL } Paradise

Show answer & explanation

Correct Answer: B

In CloudWatch Logs filter pattern syntax, terms are combined using a logical AND by default if they are separated by spaces (e.g., ERROR CRITICAL matches logs containing both). To perform a logical OR operation, you must prefix each term with a question mark (?). Therefore, ?ERROR ?CRITICAL matches logs that contain at least one of these terms. The minus sign (-) is used for exclusion (NOT). Answer: B

Q5medium

An engineer is defining a deployment workflow in an appspec.yml file for an in-place deployment to Amazon EC2. The engineer needs to execute a shell script that updates environment-specific configuration files and modifies folder permissions. This script must run after the application revision files have been successfully copied to their destination folders on the instance, but before the application service is restarted.

Which lifecycle hook should the engineer use to execute this script?

A.

BeforeInstall

B.

AfterInstall

C.

ApplicationStart

D.

ValidateService

Show answer & explanation

Correct Answer: B

In a CodeDeploy EC2/On-Premises deployment, the lifecycle events occur in a specific order. The Install event (which is reserved for CodeDeploy operations) is when the agent copies the revision files from the temporary location to the final destination. The AfterInstall hook is specifically designed for tasks that must occur once the files are in place, such as configuring the application or changing file permissions.

  • BeforeInstall (A) occurs before the files are copied.
  • ApplicationStart (C) is typically used to restart services after configuration is complete.
  • ValidateService (D) is the final step used to verify the health of the deployment. Answer: B
Q6hard

A DevOps Engineer is designing an automated remediation strategy for a multi-account environment using AWS Organizations. An AWS Config rule is deployed to all member accounts to detect Amazon S3 buckets that allow public read access. The engineer intends to use the integrated AWS Config remediation feature with the AWS Systems Manager (SSM) Automation runbook AWS-PublishPublicS3BucketNotification (or a similar corrective runbook).

To ensure that non-compliant buckets are automatically remediated across all accounts while adhering to the principle of least privilege, which configuration approach should the engineer analyze and implement?

A.

Configure the remediation action in the central AWS Config aggregator account to target all member accounts. Specify a central IAM role ARN for the AutomationAssumeRole and map the BucketName parameter to the RESOURCE_ID placeholder.

B.

Configure the remediation action for the rule in each member account. Provide an IAM role ARN for the AutomationAssumeRole that has specific S3 permissions (e.g., s3:PutBucketPublicAccessBlock). In the remediation settings, map the SSM document's BucketName parameter to the RESOURCE_ID placeholder.

C.

Implement an Amazon EventBridge rule in the central security account that monitors for 'Config Rules Compliance Change' events from the aggregator. Trigger an SSM Automation execution in the member accounts via a cross-account IAM role, passing the resourceId from the event.

D.

Update the AWS Config service-linked role in each member account to include ssm:StartAutomationExecution and s3:* permissions. In the remediation configuration, leave the AutomationAssumeRole parameter blank so that AWS Config uses its own service-linked role for execution.

Show answer & explanation

Correct Answer: B

Integrated automated remediation in AWS Config is associated directly with the Config rule. In a multi-account setup, even if compliance is aggregated, the remediation action must be configured on the rule within the account where the resource resides (often managed via CloudFormation StackSets for consistency). The AutomationAssumeRole is the IAM role that Systems Manager assumes to perform the remediation tasks; it must be provided with a policy following least privilege for the specific remediation action (e.g., modifying S3 bucket settings). Mapping the SSM document parameter (like BucketName) to the RESOURCE_ID placeholder is critical because it tells AWS Config to pass the specific non-compliant resource identifier to the SSM execution. Answer: B

Q7hard

A DevOps engineer is using AWS CodeDeploy to perform a blue/green deployment for an Amazon ECS service running on AWS Fargate. The service is configured with a healthCheckGracePeriodSeconds of 30. The Application Load Balancer's (ALB) target group is configured with a health check interval of 20 seconds and an unhealthy threshold of 2 consecutive failures. During the deployment, the engineer observes that the replacement tasks are provisioned and transition to the RUNNING state. However, exactly 50 seconds after entering the RUNNING state, each replacement task is terminated and replaced by a new one, causing the deployment to hang. The application logs indicate that the service requires approximately 80 seconds to complete its internal initialization. Which of the following changes will most effectively address this deployment failure while maintaining health check integrity?

A.

Increase the healthCheckGracePeriodSeconds for the ECS service to 90 seconds.

B.

Modify the Target Group health check interval to 10 seconds and increase the unhealthy threshold to 10.

C.

Update the Target Group health check path to a static /warmup.html file that is served by the container's web server immediately upon startup.

D.

Increase the Target Group's healthy threshold to 5 to provide a longer window for the application to reach a stable state.

Show answer & explanation

Correct Answer: A

The failure occurs because the ECS service health check grace period (30s) expires before the application is ready (80s). In Amazon ECS, the scheduler ignores a task's health status from the load balancer until the healthCheckGracePeriodSeconds has elapsed. In this scenario, the load balancer performs checks at 20-second intervals. The first check evaluated after the grace period ends is at t=30t=30t=30, and the second is at t=50t=50t=50. Since the application is not ready until t=80t=80t=80, both checks fail. With an unhealthy threshold of 2, the task is marked unhealthy at t=50t=50t=50 and subsequently terminated by ECS. Increasing the grace period to 90s ensures the application is fully initialized ($80 < 90$) before ECS starts enforcing the health status. Answer: A

Q8medium

A DevOps engineer is implementing a deployment strategy for a serverless application using AWS CodeDeploy. The team selects the CodeDeployDefault.LambdaLinear10PercentEvery2Minutes configuration for the update. If the deployment process is initiated at exactly 11:00 AM, calculate the percentage of the total traffic that will be directed to the original version of the Lambda function at 11:05 AM.

A.

30%

B.

60%

C.

70%

D.

80%

Show answer & explanation

Correct Answer: C

The LambdaLinear10PercentEvery2Minutes configuration shifts traffic in equal 10% increments every 2 minutes, with the first increment occurring immediately upon initiation.

Calculated timeline of the traffic shift:

  • 11:00 AM (T=0): First 10% shift to the new version (90% remains on the original).
  • 11:02 AM (T=2): Second 10% shift (20% total on new, 80% on original).
  • 11:04 AM (T=4): Third 10% shift (30% total on new, 70% on original).
  • 11:06 AM (T=6): Fourth 10% shift (40% total on new, 60% on original).

At 11:05 AM, the deployment is in the state established at 11:04 AM. Therefore, 30% of traffic is routed to the new version and 70% is routed to the original version. Answer: C

Q9easy

In the context of troubleshooting system and application failures, which AWS feature is specifically used to identify and analyze failed deployments by performing synthetic monitoring of application endpoints?

A.

Amazon CloudWatch Synthetics

B.

AWS CloudTrail

C.

AWS Trusted Advisor

D.

Amazon GuardDuty

Show answer & explanation

Correct Answer: A

According to the AWS Certified DevOps Engineer - Professional (DOP-C02) curriculum, troubleshooting failures involves skills in analyzing failed deployments using specific tools. Amazon CloudWatch Synthetics allows you to create canaries to monitor your endpoints and APIs, providing synthetic monitoring to proactively identify and analyze deployment or availability issues. Answer: A

Q10medium

A DevOps engineer needs to implement an automated solution for a fleet of 500 Amazon EC2 instances to ensure they meet corporate security standards. The solution must automate the collection of installed software data, apply critical security patches during a specific weekly window, and provide a historical record of configuration changes for compliance auditing. Which approach best satisfies these requirements?

A.

Configure SSM Inventory to collect metadata, use SSM Patch Manager with a Maintenance Window for scheduled patching, and enable AWS Config to track configuration history and compliance.

B.

Use SSM State Manager to inventory instances, SSM Run Command to manually trigger patches, and Amazon CloudWatch Logs to maintain a history of configuration states.

C.

Deploy Amazon Inspector to collect software inventory, use SSM Automation to manage patching, and use AWS CloudTrail to audit configuration changes over time.

D.

Use SSM Distributor to install inventory software, use SSM Patch Manager with ad-hoc Patch Baselines, and use AWS Trusted Advisor to track long-term configuration compliance.

Show answer & explanation

Correct Answer: A

AWS Systems Manager (SSM) Inventory is the primary feature for collecting software and configuration metadata on a schedule. For patching, SSM Patch Manager provides automated patching based on defined Patch Baselines, and when associated with a Maintenance Window, it ensures patches are applied only during specific times (e.g., low-traffic windows). Finally, AWS Config is the standard service for recording configuration changes and providing a searchable history of resource states and compliance over time, integrating directly with SSM for patch compliance views. Answer: A

Q11easy

Which of the following interaction methods allows developers to programmatically access and manage AWS services using language-specific APIs in programming languages such as Python, Java, or JavaScript?

A.

AWS Management Console

B.

AWS Command Line Interface (CLI)

C.

AWS Software Development Kits (SDKs)

D.

AWS CloudShell

Show answer & explanation

Correct Answer: C

AWS SDKs provide programming interfaces and development tools that allow developers to build applications on AWS using popular programming languages. They handle complex tasks like authentication, request signing, and error handling automatically. Answer: C

Q12medium

A large organization uses AWS Organizations to manage over 100 AWS accounts. The security team needs to implement a federation solution that allows users to authenticate using an external SAML 2.0 Identity Provider (IdP). The solution must provide a way to centrally manage permission sets and assign them to specific users or groups across the entire organization from a single management console. Which approach meets these requirements with the least administrative effort?

A.

Configure a SAML 2.0 IAM Identity Provider in each individual AWS account and create matching IAM roles for federation.

B.

Enable AWS IAM Identity Center and connect it to the external SAML 2.0 IdP to manage centralized Permission Sets.

C.

Deploy AWS Directory Service for Microsoft Active Directory and establish a two-way forest trust with the on-premises IdP.

D.

Use Amazon Cognito Identity Pools to exchange SAML assertions for temporary AWS credentials for each account.

Show answer & explanation

Correct Answer: B

AWS IAM Identity Center (formerly AWS Single Sign-On) is the recommended service for managing single sign-on access to multiple AWS accounts at scale. It allows for the central creation of 'Permission Sets,' which are essentially role templates that can be assigned to users or groups from an external IdP (connected via SAML 2.0 or OIDC) across all accounts in an AWS Organization. Option A is technically possible but requires significant manual overhead to manage IdPs and roles in 100+ accounts. Option C is specific to Active Directory and does not provide the centralized Permission Set management found in IAM Identity Center. Option D is primarily used for providing access to mobile or web application users rather than administrative access to the AWS Management Console and CLI. Answer: B

Q13medium

A DevOps Engineer is tasked with implementing a security monitoring and auditing solution to mitigate common cloud security threats, specifically focusing on insecure web traffic and S3 buckets with public access. Which strategy explains the most effective approach for both detecting these threats and ensuring automated remediation?

A.

Implement AWS WAF to inspect and block insecure web traffic patterns, and configure AWS Config managed rules with AWS Systems Manager Automation to automatically remediate buckets with public access.

B.

Deploy Amazon Inspector to monitor network traffic for insecure protocols, and use AWS CloudTrail logs to automatically revert any S3 bucket policy changes that allow unauthorized public access.

C.

Enable VPC Flow Logs to encrypt insecure traffic in transit, and use Amazon GuardDuty to automatically delete any S3 buckets that are found to have public read or write permissions enabled.

D.

Utilize AWS Shield Advanced to protect against insecure web traffic at the network edge, and rely on IAM Access Analyzer to generate reports for the manual remediation of S3 bucket configurations.

Show answer & explanation

Correct Answer: A

AWS WAF is the correct service for protecting against insecure web traffic by filtering and monitoring HTTP/HTTPS requests. AWS Config is the standard tool for configuration auditing, and when integrated with AWS Systems Manager Automation, it can automatically remediate non-compliant states such as public S3 buckets. Other services like Amazon Inspector and VPC Flow Logs do not provide the combined detection and automated remediation capabilities required for these specific configuration and traffic threats. Answer: A

Q14easy

When configuring server-side encryption for an Amazon CloudWatch Log Group using AWS Key Management Service (AWS KMS), which type of KMS key must be used?

A.

Asymmetric KMS key

B.

Symmetric KMS key

C.

HMAC KMS key

D.

Custom Key Store with CloudHSM only

Show answer & explanation

Correct Answer: B

CloudWatch Logs supports encryption using symmetric KMS keys only. When you associate a KMS key with a log group, AWS KMS uses that symmetric key to encrypt the log data. Asymmetric keys (which use public/private key pairs) and HMAC keys are not currently supported for log group encryption. Answer: B

Q15medium

A DevOps engineer is configuring a CI/CD pipeline in AWS CodeBuild that requires access to two types of sensitive information: a GitHub Personal Access Token (PAT) used to pull private repositories and a database password for an Amazon RDS instance. The security policy requires the database password to be rotated every 30 days using a native AWS solution to minimize custom administrative code, while the GitHub PAT is considered relatively static. Which configuration provides the most secure and cost-effective method for managing these build secrets?

A.

Store the GitHub PAT as a SecureStringSecureStringSecureString parameter in AWS Systems Manager Parameter Store and the database password in AWS Secrets Manager with managed rotation enabled.

B.

Store both the GitHub PAT and the database password in AWS Secrets Manager to centralize management and leverage the built-in rotation functionality for both secrets.

C.

Store both the GitHub PAT and the database password in AWS Systems Manager Parameter Store to take advantage of the free tier available for Standard parameters.

D.

Embed the GitHub PAT in the buildspec.yml file as an environment variable and store the database password in AWS Secrets Manager.

Show answer & explanation

Correct Answer: A

AWS Secrets Manager is specifically designed for secrets that require automated rotation, providing native integration for services like Amazon RDS without requiring custom Lambda code. However, it incurs a monthly cost per secret. AWS Systems Manager Parameter Store (Standard) is cost-effective (free for Standard parameters) and supports encryption via AWS KMS (SecureStringSecureStringSecureString), making it ideal for sensitive but static configuration data like a GitHub PAT. Combining both services optimizes for both security requirements (rotation) and cost (using Parameter Store for non-rotating secrets). Answer: A

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

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

837 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(1 cards shown)

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(5 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.

Question

Describe the workflow for real-time log analysis and visualization using AWS native services.

Answer

The typical high-scale real-time workflow involves:

  1. Ingestion: CloudWatch Logs / CloudWatch Agent collects logs.
  2. Streaming: A Subscription Filter pushes data to Kinesis Data Firehose.
  3. Storage/Search: Firehose delivers logs to Amazon OpenSearch Service.
  4. Visualization: Use OpenSearch Dashboards or QuickSight.
Loading Diagram...

Question

Identify the missing component (???) in this log processing architecture:

Loading Diagram...

Answer

CloudWatch Logs Subscription Filter

A Subscription Filter is required to deliver real-time log events from a CloudWatch log group to a destination such as an Amazon Kinesis stream, an Amazon Kinesis Data Firehose stream, or an AWS Lambda function.

[!NOTE] This allows for real-time processing and offloading of log data for archival or complex analysis.

Showing 30 of 837 flashcards. Study all flashcards →

Related Study Resources

Explore other free certification prep and study materials on BrainyBee.

AWS Certified Cloud Practitioner (CLF-C02)

854 questions · 163 notes

AWS Certified Solutions Architect - Associate (SAA-C03)

833 questions · 204 notes

AWS Certified Machine Learning Engineer - Associate (MLA-C01)

724 questions · 160 notes

Microsoft Azure AI Fundamentals (AI-900)

255 questions · 54 notes

AWS Certified CloudOps Engineer - Associate (SOA-C03)

840 questions · 148 notes

AWS Certified Advanced Networking - Specialty (ANS-C01)

1156 questions · 231 notes

AWS Certified Security - Specialty (SCS-C03)

980 questions · 130 notes

Microsoft Azure Fundamentals (AZ-900)

680 questions · 96 notes

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

Access all 1,159 practice questions, 14 timed mock exams, study notes, and flashcards — no sign-up required.

Start Studying — Free
Explore All HivesBlogHome

© 2026 BrainyBee. Free AI-powered exam prep.

Loading Diagram...
Flowchart, top to bottom. AWS Resource (EC2/RDS) connects to CloudWatch Alarm ("Metrics"). B connects to Action Router ("ALARM State"). C connects to Amazon SNS ("Notify"). C connects to AWS Lambda ("Remediate"). C connects to EC2 Auto Recovery ("Recover"). D connects to Slack/Email/PagerDuty.
Loading Diagram...
Flowchart, top to bottom. Source Change connects to CodeBuild. B connects to CodeDeploy ("Success"). B connects to CloudWatch Logs ("Failure"). C connects to Alarm Triggered? ("Metric Threshold Exceeded"). E connects to Automatic Rollback ("Yes"). E connects to Traffic Shifting Continues ("No"). F connects to SNS Notification to Slack. D connects to Root Cause Analysis.
Loading Diagram...
Flowchart, top to bottom. CloudWatch Alarm Triggers connects to Action Valid?. B connects to Check IAM Permissions (No). B connects to Capacity Available? (Yes). D connects to Check Service Quotas / AZ Limits (No). D connects to Instance/Task Launching (Yes). F connects to Health Check Passes?. G connects to Rolling Back / Terminating (No). G connects to Steady State reached (Yes).
Loading Diagram...
Flowchart, left to right. Log Sources (EC2, Lambda, VPC) connects to CloudWatch Logs. B connects to Subscription Filter?. C connects to Kinesis Data Streams (Yes). C connects to AWS Lambda (Yes). D connects to Amazon OpenSearch. E connects to Automated Remediation. B connects to Logs Insights Query.
Loading Diagram...
Flowchart, left to right. Source: EC2/Lambda connects to CloudWatch Logs. B connects to CloudWatch Alarms (Metric Filter). B connects to Ad-hoc Analysis (Logs Insights). B connects to Kinesis Data Firehose (Subscription). E connects to Amazon S3. E connects to Amazon OpenSearch. F connects to Amazon Athena (SQL Query). H connects to Amazon QuickSight.
Loading Diagram...
Flowchart, left to right. EC2 / App Logs connects to CloudWatch Logs Group. B connects to Kinesis Data Stream ("Subscription Filter"). C connects to AWS Lambda (Real-time Alerting). C connects to Kinesis Firehose (Storage/Archive). E connects to ("Amazon S3 / Redshift").
Loading Diagram...
Flowchart, top to bottom. Metric Data Ingested connects to Model Exists?. B connects to State: INSUFFICIENT_DATA (No). B connects to Is Metric in Band? (Yes). D connects to State: OK (Yes). D connects to M of N reached? (No). F connects to State: ALARM (Yes). F connects to E (No).
Loading Diagram...
Flowchart, top to bottom. Need Shared Access? connects to Amazon EBS (Block) (No). Need Shared Access?"] -->|No| B["Amazon EBS (Block connects to Interface Type? (Yes). C connects to Amazon S3 ("Object (API)"). C connects to OS Type? ("File (POSIX/NFS)"). E connects to Amazon EFS (Linux). E connects to Amazon FSx for Windows (Windows). E connects to Amazon FSx for Lustre ("HPC/Lustre").
Loading Diagram...
Flowchart, top to bottom. DevOps Engineer connects to AWS KMS (CMK). B connects to S3 Bucket (Data at Rest). B connects to AWS Secrets Manager (Secrets). AWS Config connects to Compliance Check. F connects to C ("Audits"). Lambda (Rotation Stub) connects to D ("Rotates").
Loading Diagram...
Flowchart, top to bottom. AWS Control Tower connects to New Member Account (Provision). B connects to Baseline Applied?. C connects to Apply SCPs & Config Rules (Yes). C connects to Enable Security Hub & GuardDuty (Yes). D connects to Compliance Monitoring. E connects to F. F connects to Systems Manager Automation Remediation (Non-compliant).
Loading Diagram...
Mermaid diagram. B connects to CloudWatch Alarm. C connects to Amazon SNS Topic (ALARM State). D connects to AWS Lambda. E connects to SSM Run Command. F connects to EC2 Instance] -->|CloudWatch Agent| B(CloudWatch Metric: disk_used_percent (Clean Logs).
Loading Diagram...
Flowchart, top to bottom. Metric Data Point connects to Storage Resolution. B connects to Standard: 1 Min (StorageResolution: 60). B connects to High Res: 1 Sec (StorageResolution: 1). D connects to Sub-minute Alarms.
Loading Diagram...
Flowchart, left to right. AWS Services connects to CloudWatch Metrics. B connects to Metric Stream. C connects to Kinesis Data Firehose. D connects to S3 Bucket / 3rd Party.
Loading Diagram...
Sequence diagram. EC2 sends INS: Send Telemetry (System Data). INS sends INS: Generate Finding.
Loading Diagram...
Flowchart, top to bottom. Start Deployment connects to Health Check / Alarms. B -- Alarms Triggered connects to Stop Deployment. C connects to Initiate Rollback. D connects to Redeploy Last Known Good Revision. B -- Success connects to Complete Deployment.
Loading Diagram...
Flowchart, top to bottom. Incident: ASG Scaling Failure connects to Check Activity History. B connects to Error: LimitExceeded] D[Request Limit Increase. B connects to Error: Client.InvalidParameter] F[Check Launch Template AMI/Networking. B connects to Error: IAM Role Missing] H[Verify Service Linked Role.
Loading Diagram...
Flowchart, left to right. A[ECS Task] -- Metrics connects to CloudWatch. B -- Threshold Evaluation connects to ???. C -- Notification/Action connects to Scaling Policy. D connects to Capacity Provider/ASG.
Loading Diagram...
Mermaid diagram. B connects to Kinesis Data Firehose (Subscription Filter). C connects to Amazon OpenSearch (Stream). D connects to OpenSearch Dashboards (Visualize).
Loading Diagram...
Mermaid diagram. B connects to ???. C connects to Amazon Kinesis Data Firehose. D connects to Amazon S3.