Courseiva

CCNA Monitoring Logging Questions

75 of 129 questions · Page 1/2 · Monitoring Logging topic · Answers revealed

1
MCQhard

An e-commerce application runs on Amazon ECS with Fargate. The operations team notices that the application's latency increases during peak hours. The engineer needs to correlate high CPU usage with increased request latency to identify the root cause. Which approach should be used?

A.Use CloudWatch Logs Insights to query container logs
B.Enable Container Insights and ServiceLens to correlate metrics and traces
C.Configure CloudWatch Synthetics canaries to measure latency
D.Set up a Prometheus server on an EC2 instance to scrape container metrics
AnswerB

Container Insights provides CPU metrics; ServiceLens integrates X-Ray traces.

Why this answer

Container Insights for Amazon ECS with Fargate collects CPU, memory, and other metrics, while ServiceLens integrates CloudWatch metrics with AWS X-Ray traces to provide end-to-end visibility. This correlation allows the engineer to identify high CPU usage and its impact on request latency. Option A is incorrect because CloudWatch Logs Insights only analyzes log data, not metrics or traces.

Option C is incorrect because CloudWatch Synthetics canaries monitor endpoint availability and performance from outside, but do not provide internal CPU metrics. Option D is incorrect because setting up a Prometheus server on an EC2 instance adds operational overhead and does not integrate with ECS Fargate natively; Container Insights and ServiceLens are the recommended AWS-native solution.

2
MCQhard

Refer to the exhibit. A security team reviews this CloudTrail log entry. Which finding is most concerning?

A.The event occurred in us-east-1.
B.The instance was terminated by an assumed role.
C.The source IP is from a public IP.
D.The user did not authenticate with MFA.
AnswerD

Correct; lack of MFA reduces security.

Why this answer

The session was created without MFA (mfaAuthenticated: false). This is a security concern because the role allows console access and the user did not use MFA, increasing risk of unauthorized access. The termination is the action, but the lack of MFA is a security gap.

3
Multi-Selecthard

A DevOps engineer is designing a centralized logging solution for 10 AWS accounts. Logs must be stored in a central S3 bucket with encryption and access logging. Which THREE services/resources are required to meet these requirements?

Select 3 answers
A.AWS Config.
B.AWS CloudTrail.
C.AWS KMS customer managed key.
D.Amazon CloudWatch Logs.
E.Amazon S3 server access logs.
AnswersB, C, E

CloudTrail can deliver logs to a central S3 bucket.

Why this answer

To meet the requirements, three services are needed: AWS CloudTrail for logging API activity across accounts and delivering logs to a central S3 bucket; AWS KMS customer managed key to encrypt the logs at rest in S3; and Amazon S3 server access logs to record requests made to the central S3 bucket for auditing. Option A (AWS Config) is not required for centralized logging; it focuses on resource configuration compliance, not log delivery. Option D (Amazon CloudWatch Logs) is not directly required for storage in S3, as CloudTrail can deliver directly to S3 without CloudWatch Logs.

4
Multi-Selectmedium

A DevOps team is designing a monitoring solution for a multi-tier web application running on AWS. The application consists of an Application Load Balancer, EC2 instances in an Auto Scaling group, and an RDS database. Which TWO approaches provide centralized logging and monitoring across all tiers?

Select 2 answers
A.Enable AWS CloudTrail for all accounts and regions.
B.Configure all services to send logs to Amazon S3 and use Amazon Athena for ad-hoc querying.
C.Use AWS Config rules to monitor configuration changes across resources.
D.Enable VPC Flow Logs to capture network traffic.
E.Deploy the unified CloudWatch agent on all EC2 instances to collect system and application logs.
AnswersB, E

S3 can serve as a central log repository, and Athena can query logs across tiers using SQL.

Why this answer

Options B and E are correct. Option B: Sending logs to Amazon S3 and using Athena for ad-hoc queries allows centralized log storage and analysis across all tiers (ALB, EC2, RDS). Option E: Deploying the unified CloudWatch agent on EC2 instances collects system and application logs, sending them to CloudWatch Logs for centralized monitoring.

Option A is wrong because CloudTrail only records API calls, not application logs. Option C is wrong because AWS Config monitors resource configuration changes, not operational logs. Option D is wrong because VPC Flow Logs capture only network traffic metadata, not application logs.

5
Multi-Selecteasy

A DevOps engineer is designing a monitoring solution for a multi-tier web application hosted on AWS. The application consists of an Application Load Balancer (ALB), a fleet of EC2 instances in an Auto Scaling group, and an Amazon RDS database. The engineer needs to monitor the health of each component and receive alerts when any component becomes unhealthy. Which of the following CloudWatch metrics should the engineer monitor? (Select THREE.)

Select 3 answers
A.RDS's ReadLatency metric.
B.Application Load Balancer's RequestCount metric.
C.EC2's StatusCheckFailed metric.
D.Application Load Balancer's HealthyHostCount metric.
E.RDS's DatabaseConnections metric.
AnswersC, D, E

Detects instance-level issues like hardware or software problems.

Why this answer

(EC2's StatusCheckFailed metric) is correct because it directly indicates whether an EC2 instance is healthy (e.g., hardware or OS issues). Option D (ALB's HealthyHostCount metric) is correct because it shows the number of registered targets that are considered healthy. Option E (RDS's DatabaseConnections metric) is correct because it can indicate if the database is overwhelmed or unavailable (e.g., reaching max connections).

Option A (RDS's ReadLatency) is incorrect because it measures performance, not health directly; a database can have high read latency but still be operational. Option B (ALB's RequestCount metric) is incorrect because it measures traffic volume, not the health of targets.

6
MCQeasy

A DevOps engineer sets up a CloudWatch dashboard to monitor an application's performance. The application runs on EC2 instances in an Auto Scaling group. The engineer wants to display the average CPU utilization across all instances in the group. Which CloudWatch metric and statistic should be used?

A.CPUUtilization metric with the Sum statistic, filtered by Auto Scaling group.
B.CPUUtilization metric with the Average statistic, filtered by Auto Scaling group.
C.StatusCheckFailed metric with the Average statistic, filtered by Auto Scaling group.
D.NetworkOut metric with the Average statistic, filtered by Auto Scaling group.
AnswerB

Average statistic with the Auto Scaling group dimension gives the average CPU across all instances.

Why this answer

The CPUUtilization metric with the Average statistic across the Auto Scaling group provides the desired average. Option A is wrong because the Sum statistic would total the CPU across instances, not average. Option C is wrong because NetworkOut is not CPU-related.

Option D is wrong because StatusCheckFailed is a different metric.

7
MCQmedium

A company runs a serverless application using AWS Lambda, Amazon API Gateway, and Amazon DynamoDB. The application is used by thousands of users. Recently, the operations team noticed an increase in 5xx errors from API Gateway. The team has enabled CloudWatch Logs for the Lambda functions and API Gateway. They see the errors are sporadic and not correlated with high traffic. The Lambda function's error count in CloudWatch is also increasing. The team wants to identify the specific requests that are failing and understand the error details. Which solution should the team implement?

A.Use CloudWatch Logs Insights to query the Lambda logs for ERROR messages and correlate with API Gateway logs
B.Enable VPC Flow Logs for the Lambda function's VPC to capture network traffic
C.Enable AWS X-Ray active tracing on the Lambda functions and API Gateway to capture detailed request traces and error details
D.Enable AWS CloudTrail to log API Gateway API calls and analyze the logs
AnswerC

X-Ray provides end-to-end visibility and error identification.

Why this answer

AWS X-Ray provides end-to-end tracing for requests through API Gateway and Lambda, capturing error details and metadata for individual requests. This allows the team to identify specific failing requests and understand error causes. Option A is wrong because CloudWatch Logs Insights can query logs, but it lacks automated tracing and correlation for distributed requests, making it less efficient.

Option B is wrong because VPC Flow Logs capture network traffic metadata, not application-level errors. Option D is wrong because CloudTrail logs API calls at the AWS account level, not application request details.

8
MCQeasy

A DevOps engineer is setting up an alarm to notify the team when the average CPU utilization of an EC2 instance exceeds 80% for 5 consecutive minutes. Which CloudWatch alarm configuration should be used?

A.Metric: CPUUtilization, Statistic: Average, Period: 300 seconds, Threshold: 80, Evaluation Periods: 1
B.Metric: CPUUtilization, Statistic: Average, Period: 300 seconds, Threshold: 80, Evaluation Periods: 1, Comparison: LessThanThreshold
C.Metric: CPUUtilization, Statistic: Average, Period: 60 seconds, Threshold: 80, Evaluation Periods: 5
D.Metric: CPUUtilization, Statistic: Sum, Period: 60 seconds, Threshold: 80, Evaluation Periods: 5
AnswerA

This matches the requirement: 5 consecutive minutes = 1 evaluation period of 300 seconds.

Why this answer

It configures a CloudWatch alarm with a 300-second (5-minute) period and 1 evaluation period, meaning the alarm triggers when the average CPU utilization exceeds 80% for a single 5-minute data point. This directly matches the requirement of 'exceeds 80% for 5 consecutive minutes' since the metric is evaluated over a 5-minute window.

Exam trap

The trap here is confusing 'Evaluation Periods' with 'Period' — candidates often think 5 evaluation periods with a 60-second period is needed for 5 consecutive minutes, but that actually requires 5 separate 1-minute data points all breaching the threshold, not a single 5-minute average.

How to eliminate wrong answers

Option B is wrong because it uses the comparison operator 'LessThanThreshold', which would trigger the alarm when CPU utilization is below 80%, not above. Option C is wrong because it uses a 60-second period with 5 evaluation periods, which would require the condition to be met for 5 consecutive minutes (5 data points), but the alarm would evaluate each 1-minute data point individually, not a single 5-minute average; this is a common misinterpretation of 'consecutive minutes'. Option D is wrong because it uses the 'Sum' statistic instead of 'Average', which would aggregate CPU utilization over the period rather than providing the mean value, and the threshold of 80 is meaningless for a sum statistic on CPU utilization.

9
MCQmedium

A DevOps engineer executes the above CloudWatch Logs Insights query. What will the output contain?

A.The count of ERROR messages per 1-minute interval for the most recent 20 intervals
B.The count of ERROR messages per 5-minute interval for the most recent 20 intervals
C.The total count of ERROR messages in the log group
D.A list of the 20 most recent log entries that contain the word 'ERROR'
AnswerB

The query groups by 5-minute bins and returns 20 rows.

Why this answer

The CloudWatch Logs Insights query filters for log entries containing 'ERROR', then uses the `stats count() by bin(5m)` command to count the number of ERROR messages per 5-minute interval, orders the results by bin timestamp in descending order, and limits the output to 20 rows, thus returning the count of ERROR messages per 5-minute interval for the most recent 20 intervals. Option A is incorrect because the bin interval is 5 minutes, not 1 minute. Option C is incorrect because the query bins the counts into intervals rather than returning a single total count.

Option D is incorrect because the query produces aggregated counts, not a list of individual log entries.

10
Multi-Selectmedium

A company is using Amazon CloudWatch Logs to collect logs from multiple applications. The DevOps team wants to create a metric filter to count the number of ERROR log entries and trigger an alarm when the count exceeds 10 in 5 minutes. Which TWO steps must the team take? (Choose TWO.)

Select 2 answers
A.Create a subscription filter to stream logs to Amazon Kinesis Data Firehose.
B.Create a metric filter on the log group that extracts ERROR count.
C.Create a CloudWatch alarm on the metric with the threshold of 10.
D.Set a log group retention policy to retain logs indefinitely.
E.Create a CloudWatch dashboard to visualize the ERROR count.
AnswersB, C

Metric filters extract metrics from log events.

Why this answer

Options B and C are correct. A metric filter must be created on the log group to extract the count of ERROR log entries (B), and then a CloudWatch alarm must be created on that metric with a threshold of 10 (C). Option A is incorrect because a subscription filter is used to stream logs to another service, not for metric filtering.

Option D is incorrect because setting a log group retention policy does not help count ERROR entries or trigger alarms. Option E is incorrect because a dashboard is for visualization, not triggering alarms.

11
MCQmedium

A company is using AWS Lambda functions for data processing. The operations team needs to monitor the number of invocations, duration, and error counts for each function. They also want to set alarms when the error rate exceeds 5% in a 5-minute period. Which combination of AWS services should the team use to achieve this with minimal effort?

A.Use AWS CloudTrail to log Lambda invocations and configure CloudWatch alarms on the log events.
B.Enable Lambda Insights to collect detailed metrics and use CloudWatch dashboards to monitor error rates.
C.Stream Lambda logs to CloudWatch Logs and use CloudWatch Logs Insights to query error rates, then create alarms.
D.Use CloudWatch metrics published by Lambda and create a CloudWatch alarm on the ErrorCount metric with a math expression to calculate error rate.
AnswerD

Lambda emits metrics automatically; alarms can be set directly.

Why this answer

Lambda automatically publishes invocations, duration, and error metrics to CloudWatch. You can create a CloudWatch alarm with a math expression that divides the ErrorCount by the Invocations metric to calculate the error rate, then set a threshold of 5% over a 5-minute period. This requires minimal effort as the metrics are built-in.

Option A is incorrect because CloudTrail logs API calls to Lambda, not function execution metrics. Option B is incorrect because Lambda Insights is an optional feature for detailed performance monitoring, but it is not required for basic metrics and alarms. Option C is incorrect because while Lambda logs are sent to CloudWatch Logs, using Logs Insights to query error rates is more complex than using the pre-existing CloudWatch metrics; moreover, creating alarms on log events requires additional configuration and is not as straightforward as using metric math on the standard ErrorCount metric.

12
Multi-Selectmedium

A company is using Amazon CloudWatch to monitor its production environment. The operations team receives alerts for the same underlying issue from multiple alarms, causing alert fatigue. The team wants to reduce noise and consolidate alerts into actionable notifications. Which TWO steps should the team take? (Choose two.)

Select 2 answers
A.Configure the CloudWatch alarms to publish to an SNS topic, and use SNS subscription filter policies to route only critical notifications.
B.Use CloudWatch Evidently to run experiments and filter out false alarms.
C.Use CloudWatch composite alarms to combine multiple alarms into a single alarm that triggers only when certain conditions are met.
D.Use CloudWatch Logs Insights to query logs and create alarms based on the query results.
E.Use AWS Config rules to automatically suppress alarms that are not compliant.
AnswersA, C

SNS filter policies can reduce noise by sending only relevant messages.

Why this answer

You can configure CloudWatch alarms to publish to an SNS topic and use SNS subscription filter policies to route only critical notifications, thereby reducing noise. Option C is correct because CloudWatch composite alarms allow you to combine multiple alarms into a single alarm that triggers only when specific conditions (e.g., AND/OR logic) are met, consolidating alerts for the same underlying issue. Option B is incorrect because CloudWatch Evidently is used for running experiments and feature flags, not for alert consolidation.

Option D is incorrect because CloudWatch Logs Insights is a tool for querying log data, not for combining alarms. Option E is incorrect because AWS Config rules are designed to evaluate resource compliance, not to suppress alarms.

13
MCQeasy

A company wants to receive real-time notifications when their Auto Scaling group launches or terminates EC2 instances. Which AWS service should they use?

A.Amazon CloudWatch alarm on the GroupTotalInstances metric.
B.AWS Config rules to detect changes in Auto Scaling groups.
C.AWS CloudTrail to monitor Auto Scaling API calls.
D.Amazon SNS notifications from the Auto Scaling group.
AnswerD

Auto Scaling can publish to SNS on instance launch/terminate.

Why this answer

Auto Scaling groups can send lifecycle notifications directly to Amazon SNS topics, enabling real-time notifications via email, SMS, or Lambda functions. Option A is wrong because the GroupTotalInstances metric is a CloudWatch metric that reflects the total number of instances, but it does not provide real-time lifecycle event notifications; CloudWatch alarms would only alert based on threshold breaches. Option B is wrong because AWS Config rules evaluate resource configurations and compliance, not real-time instance launch/terminate events.

Option C is wrong because AWS CloudTrail records API calls for auditing and governance, but it does not provide real-time event-driven notifications.

14
MCQmedium

A company uses AWS Lambda functions for data processing. The operations team notices that some functions are taking longer to execute than expected. They want to analyze the execution durations to identify functions that exceed the 75th percentile latency. Which CloudWatch feature should be used?

A.Use AWS X-Ray to trace the Lambda functions and analyze latency percentiles.
B.Use CloudWatch metrics with the percentile statistic for 'Duration'.
C.Use CloudWatch dashboards with a percentile widget on the 'Duration' metric.
D.Use CloudWatch Logs Insights to query the Lambda log groups and calculate custom percentiles using the `stats` command.
AnswerD

CloudWatch Logs Insights can parse duration from logs and calculate percentiles using the `stats` command.

Why this answer

CloudWatch Logs Insights can query Lambda log groups and use the `stats` command to compute arbitrary percentiles, such as p75, from the 'Duration' field in Lambda logs. This allows the operations team to identify functions exceeding the 75th percentile latency. Option A is incorrect because AWS X-Ray traces requests and provides latency distributions, but it does not directly compute custom percentiles from logs.

Option B is incorrect because CloudWatch metrics for Lambda's 'Duration' metric only support fixed percentiles (e.g., p50, p90, p99) and do not allow custom percentiles like p75. Option C is incorrect because CloudWatch dashboards can display percentile widgets, but they rely on metrics with precomputed percentiles and cannot calculate new percentiles from raw log data.

15
Multi-Selectmedium

A company is using Amazon CloudWatch to monitor a production environment. The DevOps team wants to receive notifications when the CPU utilization of an EC2 instance exceeds 90% for 5 consecutive minutes. Which TWO steps should the team take to achieve this? (Choose TWO.)

Select 2 answers
A.Enable detailed monitoring on the EC2 instance to get 1-minute metrics.
B.Configure an Amazon SNS topic and subscribe the team's email address to it, then set the alarm to send notifications to the SNS topic.
C.Create a CloudWatch alarm on the CPUUtilization metric with a threshold of 90% and an evaluation period of 5 consecutive minutes.
D.Create a CloudWatch Logs metric filter to count CPU utilization errors.
E.Create a CloudWatch dashboard to visualize CPU utilization.
AnswersB, C

SNS provides the notification channel for the alarm.

Why this answer

(Configure an SNS topic) and Option C (Create a CloudWatch alarm) are correct. To receive notifications when CPU utilization exceeds 90% for 5 consecutive minutes, you need a CloudWatch alarm that monitors the CPUUtilization metric with the specified threshold and evaluation period. The alarm must be configured to send notifications to an SNS topic, which then delivers the message to subscribed email addresses.

Option A (Enable detailed monitoring) is not required because the evaluation period is 5 minutes, and basic monitoring (5-minute intervals) is sufficient. Option D (Create a CloudWatch Logs metric filter) is for log data, not EC2 metrics. Option E (Create a CloudWatch dashboard) is for visualization, not notification.

16
MCQeasy

A company is using AWS CloudTrail to track API calls. They want to be notified immediately when an IAM user creates a new access key. Which combination of AWS services should be used?

A.Amazon CloudWatch Logs with a metric filter and alarm.
B.AWS Config with an AWS Lambda function.
C.Amazon CloudWatch Events (Amazon EventBridge) with an AWS Lambda function that sends an email via Amazon SES.
D.Amazon CloudWatch Events (Amazon EventBridge) with an Amazon SNS topic.
AnswerD

EventBridge can match CloudTrail events and trigger SNS for immediate notification.

Why this answer

To be notified immediately when an IAM user creates a new access key, the most efficient approach is to use Amazon CloudWatch Events (Amazon EventBridge) with an Amazon SNS topic. CloudTrail records the 'CreateAccessKey' API call as an event. An EventBridge rule can be configured to match this specific event pattern and send the event to an SNS topic, which can then send notifications via email, SMS, etc.

This provides real-time notification without additional services. Option A (CloudWatch Logs with metric filter and alarm) requires sending CloudTrail logs to CloudWatch Logs, which adds latency and complexity; it is not as direct as EventBridge. Option B (AWS Config with Lambda) is not designed for real-time event notification.

Option C (EventBridge with Lambda and SES) adds unnecessary Lambda processing since SNS can directly send email when subscribed to the topic.

17
Multi-Selectmedium

A company uses Amazon CloudWatch Logs to store application logs. They have a requirement to retain logs for 90 days for operational analysis and then archive them to Amazon S3 for compliance purposes for an additional 5 years. Which of the following steps are necessary to meet this requirement? (Select TWO.)

Select 2 answers
A.Set the CloudWatch Logs retention policy on the log group to 90 days.
B.Set an S3 lifecycle policy on the destination bucket to transition objects to Glacier after 90 days.
C.Create a CloudWatch Logs subscription filter to stream logs to Amazon S3 in real time.
D.Configure a CloudWatch Logs lifecycle policy to transition logs to Amazon S3 after 90 days.
E.Create a CloudWatch Logs export task to export logs to Amazon S3 before the retention period expires.
AnswersA, E

This ensures logs are deleted after 90 days.

Why this answer

Setting the CloudWatch Logs retention policy on the log group to 90 days ensures logs are retained for operational analysis and then automatically expire (deleted) after 90 days. Option E is correct because to archive logs to Amazon S3 for compliance, you must use a CloudWatch Logs export task to export logs to S3 before the retention period expires. Option B is incorrect because an S3 lifecycle policy applies to objects already in S3, not to logs in CloudWatch.

Option C is incorrect because subscription filters can stream logs in real time to destinations like Lambda or Kinesis, but not directly to S3 for archival. Option D is incorrect because CloudWatch Logs does not have a lifecycle policy to transition logs directly to S3; export is required.

Exam trap

Don't confuse CloudWatch Logs retention policies with S3 lifecycle policies. Retention only controls deletion from CloudWatch, not export to S3.

18
MCQeasy

A company uses Amazon RDS for PostgreSQL and wants to monitor database performance metrics such as CPU utilization, memory, and disk I/O. Which AWS service should be used to set up custom dashboards and alarms for these metrics?

A.AWS X-Ray
B.Amazon VPC Flow Logs
C.AWS CloudTrail
D.Amazon CloudWatch
AnswerD

CloudWatch collects RDS metrics and supports dashboards and alarms.

Why this answer

Amazon CloudWatch (Option D) is the correct service for monitoring Amazon RDS performance metrics such as CPU utilization, memory, and disk I/O. CloudWatch provides built-in metrics for RDS, allows creation of custom dashboards to visualize these metrics, and supports setting alarms for proactive notifications. Option A (AWS X-Ray) is used for tracing and analyzing requests through applications, not for infrastructure metrics.

Option B (Amazon VPC Flow Logs) captures IP traffic information for network troubleshooting, not database performance. Option C (AWS CloudTrail) logs API calls for auditing, not performance monitoring. Therefore, CloudWatch is the appropriate choice for this use case.

19
Multi-Selecthard

A company runs a microservices architecture on Amazon EKS. The DevOps team wants to monitor application performance and detect anomalies in request latency. They need to collect metrics, logs, and traces from all services. Which THREE AWS services should the team use together to implement a complete observability solution? (Choose three.)

Select 3 answers
A.AWS X-Ray
B.AWS CloudWatch ServiceLens
C.AWS CloudTrail
D.Amazon Managed Service for Prometheus
E.Amazon CloudWatch Container Insights
AnswersA, B, E

Provides distributed tracing to trace requests across services.

Why this answer

Options A, B, and E are correct. AWS X-Ray (Option A) provides distributed tracing to trace requests across microservices. Amazon CloudWatch Container Insights (Option E) collects, aggregates, and summarizes metrics and logs from containerized applications on EKS.

AWS CloudWatch ServiceLens (Option B) unifies CloudWatch metrics and logs with X-Ray traces to provide a single view for observability. Option C (AWS CloudTrail) is for auditing API calls, not application performance. Option D (Amazon Managed Service for Prometheus) is a separate monitoring service but is not part of the native AWS observability stack as described; the combination of X-Ray, Container Insights, and ServiceLens provides a complete solution.

20
MCQhard

A DevOps team is using Amazon CloudWatch Logs to collect application logs from multiple EC2 instances. They notice that some log entries are missing and that the CloudWatch agent is consuming high CPU. The log group has a retention policy of 30 days. Which action should the team take to reduce CPU usage without losing log data?

A.Increase the batch size in the CloudWatch agent configuration.
B.Use JSON format for logs instead of plain text.
C.Set the agent's timezone to UTC.
D.Change the log group retention policy to 7 days.
AnswerA

Correct: Larger batch size reduces API calls and CPU usage.

Why this answer

Increasing the batch size in the CloudWatch agent configuration reduces the number of HTTP API calls made to CloudWatch Logs, which lowers CPU overhead from frequent network I/O and serialization. The agent buffers log events and sends them in larger, less frequent batches, directly addressing high CPU consumption without discarding any log data.

Exam trap

The trap here is that candidates may confuse log retention policies with operational performance tuning, incorrectly assuming that reducing retention frees resources, when in fact it only deletes historical data and has no impact on agent CPU usage.

How to eliminate wrong answers

Option B is wrong because using JSON format instead of plain text does not reduce CPU usage; it may increase parsing overhead and does not affect the agent's batching or transmission behavior. Option C is wrong because setting the agent's timezone to UTC only affects timestamp interpretation, not CPU consumption or log delivery efficiency. Option D is wrong because reducing the log group retention policy from 30 to 7 days deletes older log data permanently, which violates the requirement to not lose log data and does not reduce CPU usage.

21
Multi-Selecthard

A company uses Amazon CloudWatch to monitor a fleet of EC2 instances. The DevOps team wants to receive notifications when the CPU utilization exceeds 90% for 5 minutes and also when the status check fails. Which THREE steps should be taken to set up these alerts?

Select 3 answers
A.Create a CloudWatch alarm on the CPUUtilization metric with a period of 300 seconds and threshold 90
B.Set the CPUUtilization alarm with a period of 60 seconds and 5 evaluation periods
C.Create a CloudWatch alarm on the StatusCheckFailed metric
D.Create a single composite alarm that combines both conditions
E.Create an Amazon SNS topic and subscribe the team's email addresses to it
AnswersA, C, E

300 seconds = 5 minutes, triggering on average CPU > 90%.

Why this answer

The correct steps are A, C, and E. Option A creates a CloudWatch alarm on the CPUUtilization metric with a period of 300 seconds (5 minutes) and threshold 90%, which directly meets the requirement of exceeding 90% for 5 minutes. Option C creates an alarm on the StatusCheckFailed metric to notify when EC2 status checks fail.

Option E creates an SNS topic and subscribes the team's email, which is necessary to receive notifications from the alarms. Option B is incorrect because a period of 60 seconds with 5 evaluation periods would trigger after 5 minutes only if each 1-minute period is above threshold, but the simpler and intended solution is a single period of 300 seconds. Option D is incorrect because composite alarms are not required; separate alarms for different conditions are standard practice.

22
MCQeasy

A company wants to monitor CPU utilization of its EC2 instances and receive an alert when utilization exceeds 80% for 5 consecutive minutes. Which AWS service should be used to create this alarm?

A.AWS CloudTrail
B.VPC Flow Logs
C.Amazon CloudWatch Alarms
D.AWS Config
AnswerC

CloudWatch Alarms monitor metrics and trigger actions based on thresholds.

Why this answer

Amazon CloudWatch Alarms are the appropriate service to monitor CPU utilization metrics and trigger an alert when utilization exceeds 80% for 5 consecutive minutes. CloudWatch Alarms can be set on the CPUUtilization metric of EC2 instances to take actions such as sending notifications. Option A (AWS CloudTrail) is incorrect because it logs API calls, not performance metrics.

Option B (VPC Flow Logs) captures network traffic information, not CPU usage. Option D (AWS Config) tracks resource configuration changes, not real-time utilization.

23
MCQmedium

An application running on AWS Lambda is experiencing cold starts. The team wants to monitor the cold start duration. What should they do?

A.Monitor the 'InitDuration' metric in CloudWatch for the Lambda function.
B.Use CloudWatch Logs Insights to query log groups for 'REPORT' lines and calculate duration.
C.Publish a custom metric from the Lambda code that measures initialization time.
D.Enable AWS X-Ray and trace the Lambda invocation to see cold start duration.
AnswerA

Lambda automatically reports cold start duration as InitDuration.

Why this answer

AWS Lambda automatically publishes the 'InitDuration' metric in CloudWatch for cold starts, which measures the time spent initializing the runtime and code. Option B is incorrect because while CloudWatch Logs Insights can query for 'REPORT' lines, it is more complex and unnecessary since the metric is already available. Option C is incorrect because publishing a custom metric from the Lambda code is redundant; the InitDuration metric is automatically provided.

Option D is incorrect because AWS X-Ray can trace cold starts, but the dedicated metric is simpler and directly available.

24
MCQeasy

A company wants to receive notifications when an EC2 instance's CPU utilization exceeds 90% for 10 consecutive minutes. Which AWS service should be used?

A.Amazon CloudWatch alarm
B.AWS Config rule
C.AWS CloudTrail event
D.Amazon Inspector
AnswerA

CloudWatch alarms can trigger SNS notifications on metric thresholds.

Why this answer

Amazon CloudWatch alarms monitor specified metrics (like CPU utilization) and trigger actions (e.g., SNS notification) when a threshold is breached for a given period. Option A is correct. Option B is incorrect because AWS Config rules evaluate configuration compliance, not metric thresholds.

Option C is incorrect because AWS CloudTrail records API activity, not metric monitoring. Option D is incorrect because Amazon Inspector assesses security vulnerabilities, not performance metrics.

25
MCQmedium

A company is running a critical web application on Amazon EC2 instances behind an Application Load Balancer (ALB) with Auto Scaling. The operations team notices that the application's error rate spiked for 10 minutes last night, but no CloudWatch alarm was triggered. The team has a CloudWatch alarm on the ALB's 'HTTPCode_Target_5XX_Count' metric with a threshold of 100 over 5 consecutive periods of 1 minute. What is the MOST likely reason the alarm did not trigger?

A.The ALB publishes metrics only at 5-minute granularity.
B.The ALB sends metrics to CloudWatch Logs instead of CloudWatch Metrics.
C.The alarm's period is set to 5 minutes instead of 1 minute.
D.The alarm is configured on the wrong metric namespace.
AnswerC

If the period is 5 minutes, the alarm would require data over 25 minutes to trigger, missing the 10-minute spike.

Why this answer

The alarm is configured to evaluate 'HTTPCode_Target_5XX_Count' over 5 consecutive periods of 1 minute, meaning it requires 5 minutes of data above the threshold to trigger. The spike lasted 10 minutes, which should have met this condition. However, if the alarm's period is set to 5 minutes instead of 1 minute, the alarm would evaluate 5 consecutive periods of 5 minutes each, requiring 25 minutes of sustained errors.

A 10-minute spike would not be enough to trigger the alarm. Therefore, option C is correct. Option A is incorrect because ALB metrics are published at 1-minute granularity.

Option B is incorrect because ALB sends metrics to CloudWatch Metrics, not CloudWatch Logs. Option D is incorrect because the metric 'HTTPCode_Target_5XX_Count' is in the correct namespace (AWS/ApplicationELB) and is specific to target groups.

26
MCQmedium

Refer to the exhibit. A DevOps engineer checks the CloudWatch alarm configuration and state. The alarm is in ALARM state for CPUUtilization averaging 90% over 5 minutes, but no notification was received. What is the most likely reason?

A.The SNS topic does not have any confirmed subscriptions.
B.The EC2 instance is stopped.
C.The alarm period is set to 300 seconds, which is too long.
D.The alarm has insufficient data to evaluate.
AnswerA

Without confirmed subscriptions, notifications are not sent.

Why this answer

The alarm is in ALARM state, indicating that CPUUtilization exceeded the threshold, and data is present. However, no notification was received because the SNS topic specified in the alarm actions likely has no confirmed subscriptions. For SNS to deliver a notification (e.g., email), each subscription must be confirmed by the recipient; otherwise, messages are not sent.

Exam trap

Even if an SNS topic ARN is correctly configured in alarm actions, notifications will not be sent unless at least one subscription is confirmed. Candidates may overlook the importance of confirming SNS subscriptions.

27
MCQeasy

A DevOps engineer needs to monitor the number of 4xx and 5xx HTTP errors returned by an Application Load Balancer (ALB). They want to set up a dashboard that shows the error count over the last 24 hours. Which CloudWatch metrics should they use?

A.Use the 'HTTPCode_Target_4XX_Count' and 'HTTPCode_Target_5XX_Count' metrics.
B.Use the 'RequestCount' metric with a statistic of 'ErrorCount'.
C.Use the 'HTTPCode_ELB_4XX_Count' and 'HTTPCode_ELB_5XX_Count' metrics.
D.Use the 'TargetResponseTime' metric and count the number of responses above 4 seconds.
AnswerA

These metrics track the HTTP error codes returned by the targets.

Why this answer

The correct metrics are 'HTTPCode_Target_4XX_Count' and 'HTTPCode_Target_5XX_Count', which track HTTP errors returned by the targets behind the Application Load Balancer. Option B is incorrect because 'RequestCount' does not have an 'ErrorCount' statistic. Option C is incorrect because 'HTTPCode_ELB_4XX_Count' and 'HTTPCode_ELB_5XX_Count' are load balancer-level metrics that track errors generated by the ALB itself (e.g., due to misconfiguration), not the errors returned by targets.

Option D is incorrect because 'TargetResponseTime' measures latency, not error counts.

28
Multi-Selectmedium

A company is using Amazon CloudWatch Logs to store application logs. The security team requires that logs are encrypted at rest using a customer-managed KMS key. Which TWO steps must be taken to achieve this?

Select 2 answers
A.Recreate the log group after associating the key.
B.Add a statement to the KMS key policy that allows CloudWatch Logs to use the key.
C.Create a KMS grant to allow CloudWatch Logs to use the key.
D.Specify the KMS key ARN when creating each log stream.
E.Use the put-log-group-encryption API to associate the KMS key with the log group.
AnswersB, E

The key policy must grant the CloudWatch Logs service principal permissions to encrypt/decrypt.

Why this answer

To encrypt CloudWatch Logs at rest with a customer-managed KMS key, you must add a statement to the KMS key policy granting CloudWatch Logs permission to use the key (option B). Then, use the put-log-group-encryption API to associate the KMS key with the log group (option E). Option C is incorrect because CloudWatch Logs uses key policies, not grants.

Option D is incorrect because you specify the key ARN at the log group level, not per log stream. Option A is incorrect because you do not need to recreate the log group; you can associate the key with an existing log group.

29
MCQhard

A DevOps team is troubleshooting a performance issue where an Amazon RDS for PostgreSQL instance's CPU utilization spikes every hour. The team suspects a specific query from an application. Which combination of tools can identify the problematic query?

A.CloudWatch Logs Insights and CloudWatch metrics.
B.Amazon RDS Performance Insights and Enhanced Monitoring.
C.VPC Flow Logs and Lambda.
D.CloudTrail and CloudWatch alarms.
AnswerB

Performance Insights identifies top queries; Enhanced Monitoring shows resource usage.

Why this answer

Amazon RDS Performance Insights identifies the top SQL queries consuming database load, and Enhanced Monitoring provides OS-level metrics (CPU, memory, etc.) to correlate with query performance. Option A is wrong because CloudWatch Logs Insights can analyze application logs if the query logs are shipped, but CloudWatch metrics alone do not show individual queries. Option C is wrong because VPC Flow Logs capture network traffic metadata, not database queries.

Option D is wrong because CloudTrail records AWS API calls (e.g., RDS Start/Stop), not SQL queries within the database.

30
MCQmedium

A DevOps engineer is setting up monitoring for an Amazon S3 bucket that stores sensitive data. The engineer needs to be notified whenever an object in the bucket is accessed by a user or application, including read and write operations. Which AWS service should the engineer use to capture these events and trigger notifications?

A.Configure S3 event notifications to send events to an SNS topic for object-level operations.
B.Enable AWS CloudTrail data events for the S3 bucket and configure CloudWatch alarms on the log group.
C.Use AWS Config to record S3 resource changes and trigger an SNS notification.
D.Use Amazon CloudWatch metrics for the S3 bucket and set an alarm on the NumberOfObjects metric.
AnswerA

S3 event notifications provide real-time alerts for specific operations.

Why this answer

Amazon S3 can be configured to send event notifications to SNS, SQS, or Lambda for object-level operations (e.g., PutObject, GetObject). This provides real-time notifications for read and write access. Option B is incorrect because CloudTrail data events capture object-level API calls but do not provide real-time notifications; they require additional setup with CloudWatch Logs and alarms.

Option C is incorrect because AWS Config records configuration changes, not individual object access events. Option D is incorrect because CloudWatch metrics track bucket-level statistics, not per-object access, and cannot trigger notifications for individual object access.

31
MCQhard

Refer to the exhibit. An AWS Lambda function has the IAM policy shown. The function is intended to write logs to CloudWatch Logs and publish custom metrics to CloudWatch. However, the function is failing to publish custom metrics. What is the MOST likely cause?

A.The function does not have permission to perform logs:PutLogEvents for the specific log stream.
B.The function does not have permission to perform cloudwatch:PutMetricData.
C.The function is trying to put metrics to a CloudWatch namespace that is not allowed by the resource constraint.
D.The function's execution role is missing the necessary trust policy to allow Lambda to assume the role.
AnswerD

Without a trust policy, the Lambda service cannot assume the role, causing all actions to fail.

Why this answer

The IAM policy shown grants the necessary permissions for `cloudwatch:PutMetricData` and `logs:PutLogEvents`. However, the Lambda function also requires a trust policy on the execution role that allows the Lambda service to assume the role. If this trust policy is missing, the function cannot obtain permissions to perform any actions, including publishing custom metrics.

Option D correctly identifies this missing trust policy as the most likely cause.

32
Multi-Selecteasy

A company is using Amazon CloudWatch Logs to collect application logs. They need to search and analyze the logs in near real-time. Which TWO AWS services can be used to achieve this?

Select 2 answers
A.Amazon CloudWatch Logs Insights
B.Amazon CloudWatch Synthetics
C.Amazon Kinesis Data Analytics
D.Amazon Athena
E.Amazon OpenSearch Service
AnswersA, E

CloudWatch Logs Insights enables interactive querying of log data stored in CloudWatch Logs.

Why this answer

A and E are correct: CloudWatch Logs Insights allows querying logs directly in CloudWatch Logs, and Amazon OpenSearch Service can ingest logs via a subscription filter for near real-time search and analysis. B (Synthetics) is for synthetic monitoring, not log analysis. C (Kinesis Data Analytics) processes streaming data but not directly from CloudWatch Logs without additional setup; it can analyze data from Kinesis streams but not directly query CloudWatch Logs.

D (Athena) queries data in S3, not directly from CloudWatch Logs, so it is not suitable for near real-time analysis.

33
MCQeasy

A DevOps engineer needs to set up a centralized logging solution for multiple AWS accounts. The logs must be stored in a central Amazon S3 bucket for long-term retention and analysis. Which combination of services should the engineer use?

A.Use AWS CloudTrail to deliver logs to the central S3 bucket.
B.Use Amazon Athena and Amazon QuickSight to query logs across accounts.
C.Use Amazon CloudWatch Logs and Amazon Kinesis Data Firehose to deliver logs to the central S3 bucket.
D.Use Amazon VPC Flow Logs to send logs to the central S3 bucket.
AnswerC

CloudWatch Logs can export logs to S3, and Kinesis Firehose can stream logs to S3 for centralized storage.

Why this answer

Amazon CloudWatch Logs can collect logs from various AWS services and applications. To centralize logs from multiple accounts into a single S3 bucket, you can use subscription filters to deliver log events to Amazon Kinesis Data Firehose, which then streams the data to the central S3 bucket. Alternatively, you can use CloudWatch Logs export tasks.

This combination enables centralized logging. Option A is incorrect because CloudTrail only captures API activity, not application or system logs. Option B is incorrect because Athena and QuickSight are analytics services, not log ingestion services.

Option D is incorrect because VPC Flow Logs capture only network traffic metadata, not all logs.

34
MCQeasy

An organization wants to ensure that all API calls made in their AWS account are logged for security analysis. Which AWS service should be enabled to meet this requirement?

A.AWS CloudTrail
B.AWS Config
C.Amazon CloudWatch Logs
D.VPC Flow Logs
AnswerA

CloudTrail records API activity for governance and audit.

Why this answer

(AWS CloudTrail) is correct because it records all API calls made in the AWS account, providing a log of actions for security analysis. Option B (AWS Config) is incorrect because it tracks resource configuration changes, not API calls. Option C (Amazon CloudWatch Logs) is incorrect because it stores logs from various sources but does not natively capture API calls; CloudTrail is the service designed for that purpose.

Option D (VPC Flow Logs) is incorrect because it captures IP traffic information for network interfaces, not API calls.

35
Multi-Selecthard

A company is running a production application on Amazon ECS with Fargate. The DevOps team needs to monitor the application's performance and set up alerts for high memory usage. Which THREE steps should the team take to achieve this?

Select 3 answers
A.Configure CloudWatch to automatically collect memory metrics from Fargate tasks
B.Create a custom CloudWatch metric and publish memory usage data from the application
C.Set up a CloudWatch alarm on the custom memory metric with appropriate threshold and actions
D.Enable the ECS task metadata endpoint and configure the application to publish memory metrics to CloudWatch
E.Enable Amazon CloudWatch Container Insights for the ECS cluster
AnswersB, C, D

Custom metrics allow monitoring of memory usage in Fargate.

Why this answer

Options B, C, and D are correct. To monitor memory usage in ECS Fargate, you must enable the ECS task metadata endpoint (option D), which allows the container to access task metadata and publish custom memory metrics to CloudWatch. Then create a custom CloudWatch metric (option B) and set up a CloudWatch alarm on that metric (option C).

Option A is incorrect because CloudWatch does not automatically collect memory metrics from Fargate tasks; custom metrics are required. Option E is incorrect because CloudWatch Container Insights provides visibility into container-level metrics but does not collect memory metrics from Fargate tasks without additional configuration; custom metrics are still needed for memory monitoring.

36
Multi-Selecthard

A DevOps engineer needs to set up a monitoring solution for an application running on Amazon EKS. The application emits custom metrics that need to be stored in Amazon CloudWatch and visualized on a dashboard. Which THREE steps should the engineer take? (Choose THREE.)

Select 3 answers
A.Configure the CloudWatch agent to emit custom metrics to CloudWatch.
B.Use CloudWatch Logs Insights to analyze the custom metrics.
C.Create a CloudWatch dashboard to visualize the collected metrics.
D.Install the CloudWatch agent on the EKS cluster using a DaemonSet.
E.Use Amazon Managed Service for Prometheus to scrape the metrics.
AnswersA, C, D

The agent must be configured to send custom metrics.

Why this answer

The CloudWatch agent can be configured to emit custom application metrics to Amazon CloudWatch, which is the required destination for storing the metrics. The agent uses the CloudWatch PutMetricData API to send these metrics, enabling centralized monitoring and alerting within CloudWatch.

Exam trap

The trap here is that candidates may confuse CloudWatch Logs Insights (for logs) with CloudWatch Metrics (for numeric data), or assume Amazon Managed Service for Prometheus is a direct replacement for CloudWatch metrics, when the question specifically requires storing custom metrics in CloudWatch.

37
Multi-Selecthard

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application logs show that some requests are timing out. The team needs to identify the source of the issue. Which TWO steps should they take?

Select 2 answers
A.Enable ALB access logs and analyze them.
B.Enable VPC Flow Logs to capture network traffic.
C.Enable AWS WAF logs to inspect HTTP requests.
D.Review CloudWatch metrics for the ALB, such as 'RequestCount' and 'TargetResponseTime'.
E.Enable AWS CloudTrail to log all API calls.
AnswersA, D

Access logs provide request-level details including response times.

Why this answer

A is correct because ALB access logs provide detailed information about each HTTP request, including the request method, URL, response status, and timing, which can help identify why requests are timing out. D is correct because CloudWatch metrics for the ALB, such as 'RequestCount' and 'TargetResponseTime', allow you to monitor the number of requests per target and the time it takes for targets to respond, helping pinpoint which targets are experiencing timeouts. B is wrong because VPC Flow Logs capture IP traffic metadata (source, destination, protocol) but do not provide application-level request details or timing information.

C is wrong because AWS WAF logs only record details about requests that are allowed or blocked by web ACL rules, not general request processing. E is wrong because CloudTrail logs API calls made to AWS services, not the application requests arriving at the ALB.

38
Multi-Selecteasy

A company uses AWS Lambda for data processing. The operations team wants to be alerted when a function fails. Which TWO methods can they use?

Select 2 answers
A.Configure S3 event notifications to trigger on Lambda errors.
B.Enable AWS CloudTrail to log Lambda invocations.
C.Configure a dead-letter queue (DLQ) for the Lambda function and monitor the queue.
D.Create a CloudWatch alarm on the 'Errors' metric for the Lambda function.
E.Use AWS Config to detect Lambda function failures.
AnswersC, D

Failed invocations are sent to the DLQ.

Why this answer

Options C and D are correct. Option C: Configuring a dead-letter queue (DLQ) for the Lambda function allows failed invocations to be sent to an SQS queue or SNS topic, which can then trigger alerts (e.g., via CloudWatch alarms on the queue). Option D: Creating a CloudWatch alarm on the 'Errors' metric for the Lambda function directly monitors the error count and can trigger an SNS notification.

Option A is wrong because S3 event notifications are triggered by S3 events, not Lambda errors. Option B is wrong because CloudTrail logs API calls to Lambda (e.g., Invoke), not the execution errors of the function. Option E is wrong because AWS Config is for tracking configuration changes, not runtime errors.

39
MCQeasy

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application uses a custom health check endpoint '/health'. The DevOps team notices that the ALB is marking some instances as unhealthy even though the application is running fine. The team checks the security groups and network ACLs and confirms they allow traffic. What should the team check next?

A.Ensure the health check path is case-insensitive.
B.Increase the health check interval and timeout values.
C.Confirm that the health check path is correctly configured to '/health' on the target group.
D.Verify that the health check port matches the application port.
AnswerC

Misconfigured path leads to non-200 responses.

Why this answer

The ALB health check uses the configured path; if it's not exactly '/health', the health check may fail even though the application is running. Option A is incorrect because the health check path is case-sensitive by default; changing to case-insensitive would not resolve a path mismatch. Option B is incorrect because increasing the interval or timeout only masks the symptom without addressing the root cause.

Option D is incorrect because the health check port is typically the same as the traffic port; the issue here is the path, not the port.

40
Multi-Selecteasy

A company wants to ensure that all changes to its Amazon S3 bucket policies are logged for auditing purposes. Which TWO AWS services should be enabled to capture these changes?

Select 2 answers
A.Amazon CloudWatch
B.AWS Config
C.Amazon GuardDuty
D.VPC Flow Logs
E.AWS CloudTrail
AnswersB, E

Config records changes to S3 bucket policies.

Why this answer

Options B and E are correct because AWS Config records resource configuration changes, including S3 bucket policies, and AWS CloudTrail logs API calls such as PutBucketPolicy. Option A is incorrect because Amazon CloudWatch monitors operational metrics and logs, not auditing of policy changes. Option C is incorrect because Amazon GuardDuty provides threat detection, not audit logging.

Option D is incorrect because VPC Flow Logs capture network traffic, not configuration changes.

41
Multi-Selectmedium

A DevOps engineer is designing a monitoring solution for a multi-tier web application hosted on AWS. The application consists of an Application Load Balancer (ALB), EC2 instances, and an RDS database. The engineer needs to capture and analyze HTTP request logs from the ALB to understand client behavior and troubleshoot errors. Which THREE steps are necessary to achieve this?

Select 3 answers
A.Install the CloudWatch Agent on the ALB
B.Enable AWS CloudTrail for the ALB
C.Use Amazon Athena to query the access logs in S3
D.Enable access logs on the ALB
E.Create an Amazon S3 bucket to store the access logs
AnswersC, D, E

Athena can query the log files directly.

Why this answer

Options C, D, and E are correct because to capture and analyze HTTP request logs from an ALB, you must first enable access logs on the ALB (D), specify an S3 bucket to store them (E), and then you can use Amazon Athena to query the logs directly from S3 (C). Option A is wrong because the CloudWatch Agent is not needed; ALB access logs are stored directly in S3, not sent to CloudWatch. Option B is wrong because CloudTrail captures API calls to AWS services, not HTTP requests to the ALB.

42
MCQhard

A company is migrating its on-premises applications to AWS and wants to maintain the same level of monitoring for its Linux-based EC2 instances. They currently use Nagios for monitoring. They want a managed AWS service that can monitor instance health, system metrics, and application logs. Which solution should they use?

A.Install the Amazon CloudWatch agent on each EC2 instance to collect system metrics and logs, and send them to CloudWatch.
B.Use AWS CloudTrail to monitor instance activity and capture log files.
C.Use AWS Systems Manager Inventory to collect system configuration and log files.
D.Use AWS Config to track instance configuration changes and trigger alerts.
AnswerA

The CloudWatch agent can collect both metrics and logs, replacing Nagios.

Why this answer

The Amazon CloudWatch agent (unified CloudWatch agent) can collect system metrics (CPU, memory, disk) and logs from EC2 instances and send them to CloudWatch, providing a managed monitoring solution similar to Nagios. Option B is incorrect because AWS CloudTrail is for auditing API calls, not for monitoring system metrics or logs. Option C is incorrect because AWS Systems Manager Inventory collects software inventory and configuration data, not real-time metrics or logs.

Option D is incorrect because AWS Config tracks resource configuration changes for compliance, not for monitoring system health.

43
MCQhard

A company runs a containerized application on Amazon ECS with Fargate launch type. The application consists of three microservices: frontend, backend, and database. The ECS cluster is in a VPC with public and private subnets. The frontend service is publicly accessible via an Application Load Balancer (ALB) in public subnets. The backend service communicates with the database service, which runs as a stateful service with persistent storage using Amazon EFS. The DevOps team is using CloudWatch Container Insights and has enabled Prometheus metrics for the ECS cluster. Recently, the team observed that the frontend service's response time has increased significantly, and some requests are timing out. The team checked the ALB metrics and saw an increase in 5xx errors. They also noticed that the backend service's CPU utilization is high, and the database service's disk I/O is high. The team suspects a bottleneck in the backend service. Which course of action should the team take FIRST to identify the root cause?

A.Disable the health check for the backend service in the ALB target group.
B.Migrate the database service to Amazon RDS for better performance.
C.Check the backend service's application logs in CloudWatch Logs to identify errors or slow database queries.
D.Increase the desired count of the backend service to reduce load per task.
AnswerC

Logs will help pinpoint the issue.

Why this answer

The first step is to analyze the backend service's application logs to identify any errors or slow operations. High CPU and disk I/O may be caused by inefficient queries or code issues. Option A is incorrect because disabling health checks would hide the problem and could route traffic to unhealthy tasks.

Option B is incorrect because migrating to RDS does not address the immediate issue and is a significant change without root cause analysis. Option D is incorrect because increasing the desired count without understanding the root cause may temporarily alleviate load but does not fix underlying performance issues and can increase costs.

44
MCQmedium

A DevOps engineer receives an alarm that an EC2 instance's StatusCheckFailed metric has been in ALARM state for 10 minutes. Which action should the engineer take first to investigate?

A.Review the instance's system log and application logs in CloudWatch Logs
B.Use AWS Config to check the instance's configuration compliance
C.Check AWS CloudTrail for any API calls that modified the instance
D.Restart the EC2 instance to clear the alarm
AnswerA

Correct. System logs help diagnose instance status check failures.

Why this answer

When an EC2 instance's StatusCheckFailed metric is in ALARM state, it indicates a problem with the instance itself (OS-level or application-level). Reviewing the instance's system log and application logs in CloudWatch Logs is the first step to diagnose the root cause. Option B (AWS Config) checks configuration compliance, which is not directly related to the health check failure.

Option C (CloudTrail) logs API calls but not OS-level issues. Option D (restart) may temporarily resolve the issue but does not provide investigation.

45
MCQmedium

A company uses AWS CloudTrail to log API activity across multiple accounts. The security team needs to ensure that all CloudTrail logs are delivered to a centralized S3 bucket in the audit account, and that any log file validation failures trigger an immediate notification. What should the engineer do to meet this requirement?

A.Enable CloudTrail log file validation and create a CloudWatch alarm on the DigestDeliveryFailed metric
B.Create a Lambda function that checks the integrity of logs and publishes to SNS
C.Configure CloudTrail to deliver logs to the S3 bucket and enable SNS notifications for all events
D.Send CloudTrail logs to CloudWatch Logs and create a metric filter for validation errors
AnswerA

Log file validation detects tampering; DigestDeliveryFailed metric triggers alarm.

Why this answer

Enabling CloudTrail log file validation triggers the generation of digest files that contain hash values for verifying log file integrity. CloudTrail also emits the DigestDeliveryFailed metric to CloudWatch when a digest file delivery fails. Creating a CloudWatch alarm on this metric allows you to send immediate notifications via SNS when a validation failure occurs.

Option B (Lambda function) is unnecessary because CloudTrail already provides the necessary metrics for this alerting. Option C (SNS notifications for all events) would generate excessive notifications and does not directly address log file validation failures. Option D (CloudWatch Logs and metric filter) is not the standard approach; CloudTrail directly emits the DigestDeliveryFailed metric, which is simpler and more reliable.

46
MCQmedium

A DevOps team needs to monitor failed API calls in their AWS account. They want to receive notifications when specific IAM actions, such as DeleteBucket, fail. Which service should they use?

A.AWS CloudTrail and Amazon EventBridge.
B.AWS Config rules.
C.Amazon S3 server access logs.
D.CloudWatch Logs and metric filters.
AnswerA

CloudTrail logs API calls, EventBridge can filter and route to SNS.

Why this answer

AWS CloudTrail captures API calls, and Amazon EventBridge (formerly CloudWatch Events) can be used to create rules that match specific failed API calls (e.g., DeleteBucket) and trigger notifications. Option B is incorrect because AWS Config rules monitor resource configuration compliance, not API call failures. Option C is incorrect because S3 server access logs log requests made to an S3 bucket, not IAM API calls.

Option D is incorrect because CloudWatch Logs and metric filters are used to monitor log data, but they are not the primary service for capturing API calls; CloudTrail is needed for that.

47
MCQhard

Refer to the exhibit. A CloudFormation template deploys a Lambda function with X-Ray tracing enabled. However, traces are not appearing in the X-Ray console. What is the most likely missing configuration?

A.The Lambda runtime (nodejs18.x) does not support X-Ray tracing.
B.The Lambda execution role does not have permissions to upload trace data to X-Ray.
C.The TracingConfig mode is set to 'Active' but should be 'PassThrough'.
D.The Lambda function code does not use the AWS X-Ray SDK.
AnswerB

The role needs xray:PutTraceSegments and xray:PutTelemetryRecords.

Why this answer

The Lambda function's execution role must have permissions to upload trace data to AWS X-Ray. The default AWSLambdaBasicExecutionRole only grants CloudWatch Logs permissions. To enable X-Ray tracing, the role needs the AWSXRayDaemonWriteAccess policy or equivalent permissions.

Option A is incorrect because the Node.js 18 runtime does support X-Ray tracing. Option C is incorrect because setting TracingConfig to 'Active' is correct for enabling tracing; 'PassThrough' would only send traces if the upstream request was sampled, which is not the issue here. Option D is incorrect because the function code does not need to explicitly use the X-Ray SDK to generate traces; when tracing is enabled at the service level, the X-Ray daemon automatically sends invocation traces.

The absence of traces points to a permissions issue, not a missing SDK.

48
Multi-Selectmedium

A company is using Amazon CloudWatch Logs to collect logs from multiple EC2 instances. They need to filter logs in real time and send specific log events to a custom application for processing. Which TWO services can they use to achieve this?

Select 2 answers
A.Use Amazon Kinesis Data Analytics to process the log stream.
B.Configure a CloudWatch Logs subscription filter that invokes an AWS Lambda function.
C.Create a CloudWatch Events rule to capture log events and send them to Amazon SQS.
D.Configure a CloudWatch Logs subscription filter that sends data to Amazon Kinesis Data Firehose.
E.Use Amazon S3 event notifications to trigger a Lambda function on new log files.
AnswersB, D

Lambda can process filtered log events in real time.

Why this answer

Correct: B (CloudWatch Logs subscription filter that invokes an AWS Lambda function) and D (CloudWatch Logs subscription filter that sends data to Amazon Kinesis Data Firehose). Both allow real-time filtering and forwarding of log events to a custom application. Option A is wrong because Kinesis Data Analytics is for analyzing streams, not forwarding.

Option C is wrong because CloudWatch Events is for events and cannot directly filter log events from CloudWatch Logs. Option E is wrong because S3 event notifications are for object-level events, not real-time log filtering; also, logs are not automatically sent to S3 in real time.

49
Multi-Selectmedium

A DevOps engineer needs to set up centralized logging for an application running on multiple EC2 instances across different AWS accounts. The logs must be aggregated in a single S3 bucket and also be analyzed in near real-time. Which TWO services should be used together to achieve this?

Select 2 answers
A.Amazon Simple Queue Service (SQS)
B.Amazon Kinesis Data Firehose
C.AWS CloudTrail
D.Amazon CloudWatch Logs subscription
E.AWS Lambda
AnswersB, D

Can receive logs from CloudWatch subscription and deliver to S3.

Why this answer

(Kinesis Data Firehose) and Option D (CloudWatch Logs subscription) are correct. CloudWatch Logs subscription can forward logs to Kinesis Data Firehose, which can then deliver to S3 in near real-time. Option A (SQS) is wrong because SQS is for decoupling, not for log aggregation.

Option C (CloudTrail) is wrong because CloudTrail is for API activity logging, not for application log aggregation. Option E (Lambda) is wrong because Lambda alone cannot efficiently aggregate logs from multiple accounts.

50
MCQeasy

A company uses Amazon CloudWatch to monitor its production environment. The DevOps team wants to receive an email notification whenever the average CPU utilization of any EC2 instance exceeds 90% for 5 consecutive minutes. Which steps should be taken to set up this notification?

A.Install the CloudWatch Logs agent on each EC2 instance and configure a metric filter to trigger an SNS notification
B.Create a CloudWatch alarm on CPUUtilization with a threshold of 90% for 5 consecutive periods, and configure an SNS topic to send email
C.Use AWS CloudTrail to monitor CPU utilization and send notifications via SNS
D.Use AWS Config to create a rule that triggers an SNS notification when CPU utilization exceeds 90%
AnswerB

Correct. This is the standard way to set up metric-based notifications.

Why this answer

Create a CloudWatch alarm on the CPUUtilization metric with a threshold of 90% for 5 consecutive periods (5 minutes assuming 1-minute periods), and configure an SNS topic to send email notifications. Option A is incorrect because the CloudWatch Logs agent collects log data, not metrics, and metric filters are for log analysis, not setting alarms on CPU utilization. Option C is incorrect because AWS CloudTrail logs API calls, not CPU utilization metrics.

Option D is incorrect because AWS Config is for resource configuration auditing and compliance, not for monitoring CPU utilization metrics.

51
MCQhard

A company uses AWS Lambda with an Amazon DynamoDB table to process high-volume clickstream data. The Lambda function writes the data to DynamoDB. Recently, the function has been experiencing throttling and timeouts during peak traffic. The DevOps team needs to set up monitoring to identify the root cause. Which combination of metrics should they analyze?

A.DynamoDB throttled write events and Lambda concurrent executions.
B.DynamoDB read and write capacity metrics and Lambda error count.
C.CloudWatch metrics for Lambda invocations and duration.
D.CloudWatch Logs for Lambda function logs and Lambda memory utilization.
AnswerA

Throttled write events indicate DynamoDB throttling, and concurrent executions show if Lambda is under-provisioned.

Why this answer

DynamoDB throttled write events and Lambda concurrent executions are directly related to the throttling and timeout issues. The throttled write events metric shows when DynamoDB is limiting write capacity, and Lambda concurrent executions indicate if the function is hitting its concurrency limit. Option B is wrong because read/write capacity metrics show provisioned vs consumed capacity but not throttling directly, and Lambda error count doesn't distinguish between timeout and other errors.

Option C is wrong because Lambda invocations and duration don't reveal throttling causes. Option D is wrong because CloudWatch Logs and memory utilization are not primary indicators for throttling and timeouts.

52
MCQmedium

A DevOps engineer runs the command above to retrieve CPU utilization for an EC2 instance, but gets no data points. The instance is running and has basic monitoring enabled. What is the most likely reason?

A.The dimension name should be 'InstanceId' with a different case.
B.The instance has basic monitoring disabled.
C.The period of 300 seconds is less than the minimum supported period.
D.The IAM user executing the command lacks 'cloudwatch:GetMetricStatistics' permission.
AnswerD

Without the proper permission, the API call returns no data.

Why this answer

The command likely fails because the IAM user executing it does not have the 'cloudwatch:GetMetricStatistics' permission. Basic monitoring publishes CPUUtilization metrics every 5 minutes (300 seconds), so a period of 300 seconds is valid. The dimension name 'InstanceId' is correct as shown.

Option A is wrong because the dimension name is case-sensitive and 'InstanceId' is correct. Option B is wrong because basic monitoring is enabled by default and publishes CPUUtilization. Option C is wrong because 300 seconds equals the default 5-minute interval, which is the minimum supported period for basic monitoring.

53
Multi-Selecteasy

A DevOps team is designing a centralized logging solution for multiple AWS accounts. The team needs to collect logs from EC2 instances, Lambda functions, and VPC Flow Logs, and store them in a central account for analysis. The solution must be cost-effective and support near real-time log aggregation. Which THREE steps should the team take? (Choose three.)

Select 3 answers
A.Configure VPC Flow Logs to deliver to a Lambda function in each account, which forwards logs to the central account.
B.Deliver logs from the central account's CloudWatch Logs to Amazon Kinesis Data Firehose, which writes to Amazon S3.
C.Use Amazon OpenSearch Service to index and search the logs in near real time.
D.Use Amazon Athena to query the logs stored in S3 for analysis.
E.Use CloudWatch cross-account subscription to stream logs from source accounts to a central account's CloudWatch Logs.
AnswersB, D, E

Kinesis Data Firehose provides near real-time delivery to S3 at low cost.

Why this answer

Options B, D, and E are correct. CloudWatch cross-account subscription (Option E) allows streaming logs from source accounts to a central account's CloudWatch Logs for near real-time aggregation. From the central account, logs can be delivered to Amazon Kinesis Data Firehose (Option B), which buffers and writes them to Amazon S3 at low cost.

Amazon Athena (Option D) can then query the S3 logs for analysis, supporting cost-effective ad-hoc queries. Option A is incorrect because VPC Flow Logs cannot be delivered directly to a Lambda function; they are delivered to CloudWatch Logs or S3. Option C (Amazon OpenSearch Service) is not one of the three required steps because the question specifies cost-effective storage and near real-time aggregation, and OpenSearch adds unnecessary cost and complexity for storage; the proposed solution uses S3 for cost-effective storage and Athena for querying.

54
MCQhard

A Lambda function is unable to write logs to CloudWatch Logs. The IAM policy attached to the function's execution role is shown above. What is the issue?

A.The resource ARN is incorrect; it should include the log stream name.
B.The region in the ARN does not match the Lambda function's region.
C.The action should be 'logs:PutLogEvents' but the resource is too restrictive.
D.The policy is missing the 'logs:CreateLogGroup' and 'logs:CreateLogStream' actions.
AnswerD

Lambda needs to create the log group and stream before writing events.

Why this answer

The Lambda function's execution role must include permissions for 'logs:CreateLogGroup' and 'logs:CreateLogStream' in addition to 'logs:PutLogEvents' to write logs to CloudWatch. The provided policy likely only grants 'logs:PutLogEvents', which allows writing to existing log streams but not creating the log group or stream. Option A is incorrect because the resource ARN can be generalized to the log group or stream without specifying the stream name.

Option B is incorrect because the region mismatch would cause a different error. Option C is incorrect because the action 'logs:PutLogEvents' is necessary but not sufficient; the missing create actions are the issue.

55
MCQmedium

A DevOps engineer needs to monitor the number of messages in an Amazon SQS queue and trigger an auto scaling action when the queue depth exceeds a threshold. Which combination of services should be used?

A.Amazon CloudWatch Logs and Amazon EC2 Auto Scaling
B.Amazon CloudWatch and Amazon EC2 Auto Scaling
C.Amazon EventBridge and Amazon EC2 Auto Scaling
D.Amazon SQS and AWS Lambda
AnswerB

CloudWatch monitors SQS queue depth and alarm triggers auto scaling policy.

Why this answer

Amazon CloudWatch monitors the ApproximateNumberOfMessagesVisible metric from SQS, and a CloudWatch alarm can trigger an Amazon EC2 Auto Scaling scaling policy when the queue depth exceeds a threshold. Option A is incorrect because CloudWatch Logs does not directly provide a metric for queue depth. Option C is incorrect because while EventBridge can capture SQS events, the standard method to trigger auto scaling based on queue depth is via CloudWatch alarms.

Option D is incorrect because SQS and Lambda are used for processing messages, not for triggering auto scaling directly.

56
MCQhard

Refer to the exhibit. A DevOps engineer runs this query to investigate a spike in errors. What is the most likely interpretation?

A.The error rate is increasing sharply in the last 15 minutes.
B.The error rate is decreasing over time.
C.The error rate is stable with no significant change.
D.The query is incorrectly filtering log streams.
AnswerA

Correct; the count jumps from 1 to 12 in the most recent bins.

Why this answer

The query counts ERROR messages per 5-minute bin for a specific log stream. The output shows a clear increasing trend from 1 to 12 errors over the last 20 minutes, indicating a recent escalation of errors.

57
Multi-Selecthard

A company runs a critical application on Amazon EKS. The operations team needs to monitor the health of the Kubernetes cluster and the applications running on it. Which THREE services can be used together to achieve comprehensive monitoring? (Choose THREE.)

Select 3 answers
A.AWS X-Ray
B.Amazon VPC Flow Logs
C.AWS CloudTrail
D.Amazon CloudWatch Container Insights
E.Amazon Managed Service for Prometheus
AnswersA, D, E

X-Ray traces requests through distributed applications, helping to identify performance issues.

Why this answer

Correct options: A, D, E. Option A (AWS X-Ray) provides distributed tracing to monitor requests across microservices, helping identify performance bottlenecks in applications running on EKS. Option D (Amazon CloudWatch Container Insights) collects, aggregates, and summarizes metrics and logs from containerized applications and microservices, offering pod-level metrics and logs for EKS clusters.

Option E (Amazon Managed Service for Prometheus) is a fully managed, scalable monitoring solution compatible with Prometheus, commonly used for Kubernetes monitoring and alerting. Option B (Amazon VPC Flow Logs) captures network traffic metadata but does not provide application or cluster health information. Option C (AWS CloudTrail) records API activity for governance and auditing, not real-time cluster monitoring.

Together, X-Ray, Container Insights, and Managed Prometheus provide comprehensive monitoring of application performance, container metrics, and Prometheus-based observability.

58
Multi-Selecthard

A company is running a critical application on Amazon EC2 instances behind an Application Load Balancer (ALB). They need to implement a monitoring strategy that provides detailed visibility into application performance, including request-level latency and error codes. Which THREE actions should they take?

Select 3 answers
A.Enable VPC Flow Logs to capture traffic patterns.
B.Enable ALB access logs and store them in Amazon S3.
C.Install the CloudWatch agent on EC2 instances to collect application logs and custom metrics.
D.Enable AWS CloudTrail to log API calls made to the load balancer.
E.Enable detailed CloudWatch metrics for the ALB (e.g., RequestCount, TargetResponseTime).
AnswersB, C, E

Access logs contain request-level details including latency and error codes.

Why this answer

The correct actions are B, C, and E. Option B (ALB access logs) provides request-level latency and error codes. Option C (CloudWatch agent on EC2) captures application logs and custom metrics for deeper visibility.

Option E (detailed CloudWatch metrics for ALB) includes RequestCount and TargetResponseTime, which are key for performance monitoring. Option A is incorrect because VPC Flow Logs capture network traffic metadata, not application performance. Option D is incorrect because CloudTrail logs API calls to the ALB, not application metrics.

59
MCQhard

A company has a microservices architecture with 50 services running on Amazon ECS. The DevOps team wants to collect and analyze logs from all services centrally. They need to query logs across services and set up alerts for error patterns. Which solution is the most scalable and cost-effective?

A.Use AWS CloudTrail to capture all log events and store them in an S3 bucket for analysis
B.Deploy an Amazon Elasticsearch cluster and configure the ECS Fargate agent to send logs directly to Elasticsearch
C.Use the awslogs driver to send logs to Amazon CloudWatch Logs and use CloudWatch Logs Insights for querying and metric filters for alerts
D.Send logs to Amazon S3 and use Amazon Athena for querying, with scheduled queries for alerts
AnswerC

Correct. This is scalable, integrates with ECS, and provides real-time alerts.

Why this answer

Using the awslogs driver to send logs to Amazon CloudWatch Logs provides a fully managed, scalable, and cost-effective solution. CloudWatch Logs Insights enables querying across all services, and metric filters can trigger alarms for error patterns. Option A (CloudTrail) captures API activity, not application logs.

Option B (Elasticsearch) requires managing infrastructure and is more expensive. Option D (S3 + Athena) is cheaper but lacks real-time alerting and has slower query performance.

60
MCQhard

A DevOps engineer manages a production environment with EC2 instances behind an Application Load Balancer (ALB). The application logs show intermittent 5xx errors from the ALB. The engineer needs to identify whether the errors originate from the targets or the ALB itself. Which CloudWatch metric should be examined to differentiate between these two sources?

A.TargetResponseTime
B.UnhealthyHostCount
C.HTTPCode_Target_5XX_Count
D.RequestCount
AnswerC

This metric counts 5xx responses from targets, distinguishing from ALB-originated 5xx.

Why this answer

HTTPCode_Target_5XX_Count, is the correct metric to identify 5xx errors originating from the targets (EC2 instances). The ALB has separate metrics for target errors (HTTPCode_Target_5XX_Count) and ALB errors (HTTPCode_ELB_5XX_Count). Option A (TargetResponseTime) measures latency, not error codes.

Option B (UnhealthyHostCount) counts unhealthy targets based on health checks, not specific HTTP errors. Option D (RequestCount) is total requests, not error codes.

61
MCQeasy

A DevOps engineer is tasked with setting up a centralized logging solution for a multi-account AWS environment. Which service should be used to aggregate logs from multiple accounts?

A.Amazon S3 with cross-region replication
B.AWS CloudTrail with organization trails
C.Amazon CloudWatch Logs with cross-account subscription
D.AWS Config with aggregated compliance rules
AnswerC

CloudWatch Logs supports cross-account subscriptions to centralize logs.

Why this answer

Amazon CloudWatch Logs can aggregate logs across accounts using cross-account subscriptions with a central destination (e.g., Kinesis or Lambda). Option C is correct. Option A is incorrect because S3 is a storage service, not for real-time aggregation.

Option B is incorrect as CloudTrail is for API activity, not application logs. Option D is incorrect because AWS Config is for configuration compliance.

62
MCQmedium

A DevOps engineer is troubleshooting a production issue where an application's response time has increased. The application is deployed on Amazon ECS with Fargate. The engineer wants to identify which microservice is causing the latency. Which AWS service should be used?

A.Amazon CloudWatch Synthetics canary to monitor the application endpoint.
B.AWS X-Ray to trace requests and analyze service latency.
C.Amazon CloudWatch Logs Insights to query application logs for errors.
D.Amazon CloudWatch ServiceLens to visualize service maps and traces.
AnswerB

X-Ray provides detailed traces and service maps to pinpoint latency.

Why this answer

AWS X-Ray is the correct service because it provides end-to-end tracing of requests as they travel through microservices, allowing the engineer to pinpoint which service is introducing latency. By analyzing trace segments and subsegments, X-Ray can break down response times for each component in the application, directly addressing the need to identify the specific microservice causing the delay.

Exam trap

The trap here is that candidates often confuse CloudWatch ServiceLens (which visualizes traces) with the actual tracing service itself, forgetting that ServiceLens depends on X-Ray to collect the trace data in the first place.

How to eliminate wrong answers

Option A is wrong because CloudWatch Synthetics canaries monitor endpoint availability and performance from the outside, but they cannot trace internal request paths across microservices to identify which specific service is causing latency. Option C is wrong because CloudWatch Logs Insights is designed for querying and analyzing log data, not for tracing request flows or measuring per-service latency; it would require manual correlation of timestamps across services. Option D is wrong because CloudWatch ServiceLens is a visualization layer that combines traces from X-Ray and metrics from CloudWatch, but it is not the primary service for tracing; the engineer must first use X-Ray to collect the trace data that ServiceLens visualizes.

63
MCQhard

A company is running a production microservices architecture on Amazon ECS with Fargate. The operations team wants to set up centralized logging across all services, including the ability to search logs in near real-time and retain them for 3 years. The logs are currently sent to CloudWatch Logs. Which combination of services would meet these requirements with the least operational overhead?

A.Stream logs to Amazon OpenSearch Service (Elasticsearch) using a CloudWatch Logs subscription filter.
B.Set a retention policy of 3 years on the CloudWatch Logs log groups and use CloudWatch Logs Insights for searching.
C.Export logs to Amazon S3 and use Amazon Athena to query them.
D.Use Amazon Kinesis Data Firehose to deliver logs to Amazon S3 with a 3-year lifecycle policy.
AnswerB

CloudWatch Logs Insights provides near real-time querying and retention policies are straightforward.

Why this answer

CloudWatch Logs supports near real-time search via CloudWatch Logs Insights and allows setting a retention policy of up to 10 years, which meets the 3-year retention requirement with minimal operational overhead since it's a managed service within AWS. Option A is wrong because Amazon OpenSearch Service adds operational overhead for cluster management and is not necessary for simple log search. Option C is wrong because exporting logs to S3 and querying with Athena introduces latency and is not near real-time.

Option D is wrong because Kinesis Firehose to S3 lacks built-in search capabilities and would require additional services for querying, increasing complexity.

64
MCQmedium

A company is using AWS CloudFormation to deploy infrastructure. They want to receive notifications when a stack operation fails, including the specific resource that caused the failure. Which approach should they use?

A.Create a CloudWatch alarm on the 'StackFailure' metric.
B.Configure an SNS topic as a notification option in the CloudFormation stack and subscribe to receive stack events.
C.Create an AWS Lambda function that polls the CloudFormation DescribeStackEvents API every minute and sends an email on failure.
D.Enable AWS CloudTrail to log CloudFormation API calls and configure an SNS notification on the trail.
AnswerB

CloudFormation can send stack events (including failures) to SNS.

Why this answer

CloudFormation allows you to specify an SNS topic ARN as a notification option when creating or updating a stack. When a stack operation fails, CloudFormation publishes a notification to that SNS topic, and the notification includes the logical resource ID and the status reason for the failure. This provides real-time, event-driven notifications without requiring polling or additional services.

Exam trap

The trap here is that candidates may confuse CloudWatch metrics or CloudTrail with CloudFormation's native notification capability, assuming that failure events are exposed as metrics or logs rather than through SNS topic subscriptions.

How to eliminate wrong answers

Option A is wrong because CloudFormation does not emit a 'StackFailure' metric to CloudWatch; CloudFormation publishes stack events to SNS topics, not CloudWatch metrics. Option C is wrong because polling the DescribeStackEvents API every minute introduces latency, unnecessary cost, and complexity compared to the native SNS notification mechanism; it also violates the principle of event-driven architecture. Option D is wrong because AWS CloudTrail logs API calls for auditing, but it does not provide real-time notifications on stack operation failures; configuring SNS on a trail only delivers log file delivery notifications, not stack failure events.

65
MCQhard

Refer to the exhibit. A DevOps engineer runs the AWS CLI command to get the average TargetResponseTime for an ALB over a 1-hour period. The output shows only three datapoints. What is the most likely reason?

A.The ALB did not receive any requests during most of the 5-minute periods.
B.The metric TargetResponseTime is not available for Application Load Balancers.
C.The command is missing the 'Statistics' parameter with 'Average'.
D.The period of 300 seconds is too large; a smaller period should be used.
AnswerA

If no requests are received, no datapoints are emitted for that period.

Why this answer

The command uses a period of 300 seconds (5 minutes), so over a 1-hour period we expect 12 data points if the metric is consistently reported. However, TargetResponseTime is only emitted when the ALB receives at least one request in that interval. The output shows only three data points, indicating that for the majority of the 5-minute periods, the ALB received no requests, so no metric data was published.

Option A correctly identifies this. Option B is incorrect because TargetResponseTime is a valid metric for Application Load Balancers. Option C is incorrect because the command appears to include the necessary parameters to retrieve the average.

Option D is incorrect because a 300-second period is standard; using a smaller period would not produce more data points if there are no requests.

66
MCQmedium

A company is using Amazon RDS for MySQL and needs to monitor slow queries to optimize database performance. The team has enabled slow query logs and wants to centralize logging in Amazon CloudWatch Logs for real-time analysis and alerting. Which solution meets these requirements with minimal operational overhead?

A.Enable Performance Insights on the RDS instance and use the Performance Insights dashboard to view slow queries.
B.Enable Enhanced Monitoring on the RDS instance and configure CloudWatch alarms based on the metrics.
C.Modify the DB parameter group to enable slow_query_log and set log_output to FILE, then configure the RDS instance to publish the slowquery log file to CloudWatch Logs.
D.Configure the RDS instance to export slow query logs to an S3 bucket, then set up a Lambda function to read the logs and send them to CloudWatch Logs.
AnswerC

RDS can natively publish slow query logs to CloudWatch Logs via the 'slowquery' log export.

Why this answer

RDS for MySQL can natively stream slow query logs to CloudWatch Logs. This is achieved by modifying the DB parameter group to set 'slow_query_log' to 1 and 'log_output' to 'FILE', then enabling the 'slowquery' log export in the RDS console or CLI. This approach requires no additional infrastructure, minimizing operational overhead.

Option A is incorrect because Performance Insights focuses on database performance metrics and schema analysis, not slow query log streaming to CloudWatch. Option B is incorrect because Enhanced Monitoring provides OS-level metrics (CPU, memory, etc.), not slow query logs. Option D is incorrect because exporting logs to S3 and using Lambda adds unnecessary complexity and latency; the native CloudWatch integration is more efficient.

67
MCQmedium

Refer to the exhibit. A security engineer runs this AWS Config query. What is the intended purpose?

A.Find all resources that are not approved.
B.Find all t2 instances that are using approved AMIs.
C.Find all t2 instances that are not using approved AMIs.
D.Find all instances regardless of type that are not using approved AMIs.
AnswerC

Correct; the query filters for t2 instances with unapproved AMIs.

Why this answer

The query selects EC2 instances of type t2.* whose AMI ID is not in the list of approved AMIs (those tagged with 'approved'). This identifies instances running unapproved AMIs.

68
MCQhard

A company has a critical application running on Amazon EC2 instances behind an Application Load Balancer. The application is experiencing intermittent latency spikes. The DevOps team has enabled detailed monitoring on the EC2 instances and is using CloudWatch metrics. They notice that CPU utilization and network traffic are normal during the spikes. Which additional diagnostic step should the team take to identify the root cause?

A.Instrument the application with AWS X-Ray to trace requests and identify bottlenecks.
B.Use CloudWatch Container Insights to monitor the performance of the EC2 instances.
C.Enable CloudWatch Synthetics to create canaries that monitor the application endpoints.
D.Run an AWS Trusted Advisor check to identify performance-related recommendations.
AnswerA

X-Ray provides end-to-end tracing to find latency sources.

Why this answer

AWS X-Ray provides end-to-end tracing of requests as they travel through the application. Since CPU and network metrics appear normal, the intermittent latency is likely caused by application-level bottlenecks such as slow database queries, external API calls, or inefficient code paths. X-Ray can trace each request end-to-end and identify the specific service or component introducing delay.

Container Insights (B) is designed for monitoring containerized workloads (Amazon ECS/EKS), not EC2 instances directly. CloudWatch Synthetics (C) creates canaries that monitor external endpoint availability and response times, but it does not trace internal request paths. AWS Trusted Advisor (D) offers general best-practice recommendations but is not a diagnostic tool for real-time latency issues.

69
Multi-Selecteasy

A company uses Amazon CloudWatch Logs to store application logs. The security team requires that all logs be encrypted at rest using a customer-managed AWS KMS key. Which THREE steps are necessary to meet this requirement? (Choose THREE.)

Select 3 answers
A.Grant the IAM role used by the application to write logs permission to use the KMS key (kms:Encrypt, kms:Decrypt).
B.Associate the KMS key with the CloudWatch Logs log group by specifying the key ARN in the log group's settings.
C.Create a customer-managed AWS KMS key in the same region as the CloudWatch Logs log group.
D.Enable encryption on each log stream individually.
E.Enable server-side encryption on the Amazon S3 bucket where logs are exported.
AnswersA, B, C

The writer must have permissions to use the KMS key.

Why this answer

Options A, B, and C are correct. To encrypt CloudWatch Logs at rest with a customer-managed KMS key, you must first create a customer-managed KMS key (option C). Then, associate that KMS key with the CloudWatch Logs log group by specifying the key ARN in the log group's settings (option B).

Finally, grant the IAM role used by the application permission to use the KMS key for encryption and decryption operations (option A). Option D is incorrect because encryption is configured at the log group level, not on individual log streams. Option E is incorrect because the scenario involves encrypting logs in CloudWatch Logs, not in an S3 bucket.

70
MCQeasy

A DevOps engineer needs to centrally collect and analyze logs from multiple AWS accounts and on-premises servers. Which AWS service should be used to aggregate logs in a single dashboard?

A.Amazon Athena.
B.Amazon S3.
C.Amazon CloudWatch Logs.
D.Amazon Kinesis Data Firehose.
AnswerC

CloudWatch Logs can aggregate logs from multiple accounts and on-premises, and provides dashboards.

Why this answer

Amazon CloudWatch Logs is the correct service to centrally collect and analyze logs from multiple AWS accounts and on-premises servers in a single dashboard. It supports cross-account log aggregation via subscription filters and can visualize logs using CloudWatch Logs Insights. Option A (Amazon Athena) is a query service for S3 data, not a dashboard.

Option B (Amazon S3) is an object storage service, not a dashboard. Option D (Amazon Kinesis Data Firehose) is a streaming data delivery service, not a dashboard.

71
Matchingmedium

Match each AWS monitoring or logging tool to its purpose.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Monitoring for AWS resources and applications

Records API activity for governance and audit

Traces and analyzes requests through distributed applications

Centralized log storage and analysis

Canary monitors to check endpoints and flows

Why these pairings

Correctly match each tool to its core purpose. CloudWatch is for metrics and alarms; CloudTrail for API auditing; AWS Config for configuration compliance. Common confusions involve swapping their descriptions.

72
Multi-Selectmedium

A company is using Amazon CloudWatch Logs to store application logs. The security team requires that logs are encrypted at rest using a customer-managed AWS KMS key. Which TWO steps are necessary to achieve this?

Select 2 answers
A.Use the CloudWatch Logs console or API to associate the KMS key with the log group
B.Enable default encryption for CloudWatch Logs in the AWS account settings
C.Update the log group's resource policy to reference the KMS key
D.Associate the KMS key with each log stream individually
E.Create a customer-managed KMS key with appropriate key policy that allows CloudWatch Logs to use the key
AnswersA, E

The association is done at log group creation or update.

Why this answer

Options A and E are correct. To encrypt CloudWatch Logs with a customer-managed KMS key, you must first create a customer-managed KMS key with a key policy that grants CloudWatch Logs permission to use the key (option E). Then, you associate the key with the log group using the CloudWatch Logs console or API (option A).

Option B is wrong because CloudWatch Logs does not support default encryption at the account level. Option C is wrong because you do not update the log group's resource policy; the key policy is set on the KMS key itself. Option D is wrong because encryption is at the log group level, not per log stream.

73
MCQeasy

A company wants to monitor the number of messages that are published to an Amazon SNS topic. Which CloudWatch metric should be used?

A.SMSMonthToDateSpentUSD
B.PublishSize
C.NumberOfNotificationsDelivered
D.NumberOfMessagesPublished
AnswerD

Correct. This metric tracks the number of messages published to an SNS topic.

Why this answer

The CloudWatch metric 'NumberOfMessagesPublished' tracks the number of messages published to an SNS topic. Option A (SMSMonthToDateSpentUSD) tracks monthly SMS spend, not messages published. Option B (PublishSize) is not a standard SNS metric; the relevant metric is 'PublishSize' for message size, but it's not for counting messages.

Option C (NumberOfNotificationsDelivered) counts messages delivered to subscribers, not published.

74
MCQeasy

A DevOps engineer needs to monitor the memory utilization of an Amazon EC2 instance running a critical application. Which AWS service should be used to collect and track this metric?

A.AWS CloudTrail
B.AWS X-Ray
C.AWS Config
D.Amazon CloudWatch
AnswerD

CloudWatch with the CloudWatch Agent can collect memory metrics.

Why this answer

Amazon CloudWatch is the correct service for monitoring memory utilization of EC2 instances. CloudWatch can collect custom metrics like memory utilization via the CloudWatch Agent. AWS CloudTrail (A) records API calls, not memory metrics.

AWS X-Ray (B) traces application requests, not system metrics. AWS Config (C) records resource configuration changes, not utilization metrics.

75
Multi-Selecthard

A company uses Amazon CloudWatch Logs to centralize logs from multiple EC2 instances running a web application. The DevOps team needs to create a metric filter that parses logs for HTTP status codes (e.g., 4xx and 5xx) and increment a metric. Additionally, they need to create a CloudWatch alarm on the error count. Which of the following are required to achieve this? (Select TWO.)

Select 2 answers
A.Create an IAM role that allows CloudWatch Logs to read the log data and publish metrics.
B.Define the metric filter pattern to match HTTP status codes in the log entries.
C.Create a metric filter in CloudWatch Logs on the log group that contains the application logs.
D.Configure a subscription filter to forward the logs to a Lambda function that creates the metric.
E.Install the CloudWatch Agent on the EC2 instances to send the logs.
AnswersB, C

The filter pattern is essential to parse the logs correctly.

Why this answer

The correct answers are B and C. A metric filter must be defined on a log group (option C) to extract metrics, and the filter pattern must match the HTTP status codes in the log entries (option B). Option A is not required because CloudWatch Logs can publish metrics without an additional IAM role; the log group already has sufficient permissions.

Option D is incorrect because subscription filters are for streaming logs to other destinations, not for creating metrics. Option E is not required because the CloudWatch Logs agent or the unified CloudWatch agent can send logs, but the question does not specify which agent; the default agent suffices.

Page 1 of 2 · 129 questions totalNext →

Ready to test yourself?

Try a timed practice session using only Monitoring Logging questions.