Curated

Monitoring and Logging (4.1–4.3)

0 votes

Questions45

  1. Question 1

    Monitoring and Logging

    The unified CloudWatch agent on instances in an Auto Scaling group publishes mem_used_percent with only the InstanceId dimension. The team needs one alarm on average memory utilization across the whole group that keeps working as instances are replaced. Which change meets this requirement?

    Show the answer

    Correct answerB. Add AutoScalingGroupName to append_dimensions and set aggregation_dimensions to [["AutoScalingGroupName"]] in the agent configuration.

    AWhy not this: Detailed monitoring sends EC2 hypervisor metrics every minute; it does not collect guest memory or create a group-level memory metric.

    BWhy this is right: The agent adds the group name to its metrics and publishes an aggregated series per group, so one alarm covers every current and future instance.

    CWhy not this: CloudWatch matches the exact dimension set, and the agent publishes no series with only AutoScalingGroupName, so the alarm would have no data.

    DWhy not this: CloudWatch does not turn instance tags into metric dimensions; dimensions come from what the agent publishes.

    append_dimensions adds the group name to each instance's metrics, and aggregation_dimensions makes the agent also publish a series rolled up by AutoScalingGroupName, which one alarm can watch regardless of which instances are running. An alarm must match a metric's exact dimension set, so alarming on a dimension the agent doesn't publish returns no data.

    Open this question
  2. Question 2

    Monitoring and Logging

    An application already sends JSON logs to CloudWatch Logs. A team needs matching error events forwarded to an AWS Lambda function in near real time without polling. What should the team configure?

    Show the answer

    Correct answerB. A CloudWatch Logs subscription filter

    AWhy not this: Scheduled queries retrieve stored events periodically rather than providing event-driven forwarding.

    BWhy this is right: Subscription filters match incoming events and deliver them to destinations such as Lambda without polling.

    CWhy not this: Export tasks deliver stored logs to Amazon S3 and are not intended for near-real-time Lambda processing.

    DWhy not this: Metric filters generate metric data from matching logs; they do not forward the matching log events to Lambda.

    A CloudWatch Logs subscription filter matches incoming log events and forwards them to a supported destination such as Lambda in near real time. A metric filter extracts metric values from matching events rather than forwarding the events themselves.

    Open this question
  3. Question 3

    Monitoring and Logging

    Instances publish each request's latency as a high-resolution custom metric with an InstanceId dimension, and request volumes differ substantially. A dashboard must retain per-instance visibility and show the request-weighted fleet average for each 10-second interval. Which configuration meets these requirements?

    Show the answer

    Correct answerD. Retain InstanceId; divide combined Sum statistics by combined SampleCount statistics using a 10-second period.

    AWhy not this: A 60-second period combines six required intervals and cannot show the requested 10-second averages.

    BWhy not this: Removing InstanceId loses the required per-instance visibility; custom metrics do not automatically aggregate across dimensions.

    CWhy not this: Averaging instance averages weights instances equally instead of weighting their individual requests equally.

    DWhy this is right: Combined latency sums divided by combined request sample counts provide the weighted average while retaining instance dimensions.

    Combining latency sums and dividing by combined sample counts produces a request-weighted average; high-resolution metrics support 10-second periods. Averaging instance averages gives each instance equal weight despite unequal request volumes.

    Open this question
  4. Question 4

    Monitoring and Logging

    Which Amazon S3 feature prevents anyone, including the account root user, from deleting protected log object versions before their retention periods expire?

    Show the answer

    Correct answerB. S3 Object Lock in compliance mode

    AWhy not this: Lifecycle expiration manages object deletion; it does not enforce immutable retention.

    BWhy this is right: Compliance-mode retention cannot be bypassed to delete protected object versions, even by the account root user.

    CWhy not this: MFA Delete requires additional authentication for permanent deletion but does not prohibit deletion until a retention period expires.

    DWhy not this: Authorized users can bypass governance-mode retention with the required permissions.

    S3 Object Lock in compliance mode prevents deletion of protected object versions during their retention periods, even by the root user. Governance mode allows users with the required permissions to bypass retention.

    Open this question
  5. Question 5

    Monitoring and Logging

    A CloudWatch Logs metric filter counts errors by service using a service dimension. Operations also needs a fleet-wide metric that publishes zero during minutes when logs arrive but no errors match; which change preserves the service metrics and meets this requirement?

    Show the answer

    Correct answerB. Add a dimensionless error-count filter with a default value of 0.

    AWhy not this: Publishing zero for every event does not count errors and still produces dimensioned rather than fleet-wide metrics.

    BWhy this is right: A dimensionless filter supports a zero default while leaving the existing per-service error metrics unchanged.

    CWhy not this: Metric streams deliver metric updates; they do not aggregate series or fill missing values.

    DWhy not this: CloudWatch Logs does not allow a default value for a metric filter that specifies dimensions.

    A separate dimensionless filter can count errors and publish a default of zero when logs arrive without matching events. Metric filters with dimensions cannot have a default value, so the existing filter cannot provide that behavior.

    Open this question
  6. Question 6

    Monitoring and Logging

    An application writes JSON logs containing numeric bytesProcessed values to CloudWatch Logs. How should a metric filter publish data so the Sum statistic represents total bytes processed?

    Show the answer

    Correct answerC. Match events containing bytesProcessed and use $.bytesProcessed as the metric value.

    AWhy not this: Publishing 1 counts matching log events rather than summing the bytesProcessed values.

    BWhy not this: A default value handles periods without matches when logs arrive; it does not extract byte counts from matching events.

    CWhy this is right: Extracting $.bytesProcessed publishes each event's byte count, allowing Sum to calculate the total.

    DWhy not this: A dimension identifies a metric series; it does not supply the numeric measurement to sum.

    A metric filter can extract a numeric JSON field as its metric value; Sum then totals those values. Publishing 1 for each matching event counts events rather than bytes.

    Open this question
  7. Question 7

    Monitoring and Logging

    An application behind an Application Load Balancer returns intermittent HTTP 502 responses. An engineer needs to determine whether the load balancer generated the errors rather than receiving them from targets. Which CloudWatch metric should the engineer examine using the Sum statistic?

    Show the answer

    Correct answerD. HTTPCode_ELB_5XX_Count

    AWhy not this: This counts target-generated 5xx responses, not errors originating from the load balancer.

    BWhy not this: This counts failed target connections, not the HTTP 5xx responses generated by the load balancer.

    CWhy not this: This reports unhealthy targets, not the origin or count of HTTP error responses.

    DWhy this is right: This counts HTTP 5xx responses originating from the load balancer; Sum gives the total for the period.

    HTTPCode_ELB_5XX_Count counts 5xx responses originating from the load balancer. HTTPCode_Target_5XX_Count instead counts 5xx responses generated by targets, so it does not establish that the load balancer generated the errors.

    Open this question
  8. Question 8

    Monitoring and Logging

    A company stores container images in Amazon ECR and deploys them without frequent rebuilds. It needs findings for newly disclosed operating system and programming language package vulnerabilities in existing images that remain eligible for scanning. Which configuration best meets this requirement?

    Show the answer

    Correct answerC. Configure ECR enhanced scanning with continuous scanning.

    AWhy not this: EC2 scanning assesses supported instance workloads rather than providing the required ECR image scanning coverage.

    BWhy not this: Enhanced scanning covers both package types, but scan on push does not provide continuous reassessment.

    CWhy this is right: Enhanced continuous scanning reassesses eligible ECR images as new package vulnerability information becomes available.

    DWhy not this: Basic scanning covers operating system vulnerabilities and scan on push does not reassess unchanged images for new disclosures.

    ECR enhanced scanning integrates with Amazon Inspector to assess operating system and programming language packages, with continuous scanning updating findings as new vulnerabilities emerge. Enhanced scan on push covers those packages but does not continuously reassess unchanged images.

    Open this question
  9. Question 9

    Monitoring and Logging

    A CloudWatch anomaly detection alarm monitors latency with a daily seasonal pattern. A scheduled load test will cause unusually high latency for two hours, and engineers must prevent those values from influencing the learned baseline without reducing sensitivity afterward. What should they do?

    Show the answer

    Correct answerD. Exclude the load-test interval from model training.

    AWhy not this: More evaluation periods change when the alarm triggers, not which data trains the model.

    BWhy not this: A wider band reduces sensitivity to future deviations rather than excluding abnormal training data.

    CWhy not this: Disabling actions stops automated responses, but the load-test values can still influence model training.

    DWhy this is right: Training exclusions keep known abnormal periods from influencing the expected baseline.

    Excluding the load-test interval prevents its unusual values from influencing anomaly detection training while preserving normal sensitivity. Disabling alarm actions suppresses notifications but does not exclude the metric values from training.

    Open this question
  10. Question 10

    Monitoring and Logging

    An operations team needs one CloudWatch dashboard showing existing EC2 CPU utilization metrics from two AWS Regions in the same account. How should the engineer configure the dashboard without copying metric data?

    Show the answer

    Correct answerC. Add metric widgets that reference the appropriate source Regions.

    AWhy not this: Metric streams deliver metric data to supported destinations; they do not feed dashboard widgets directly.

    BWhy not this: Logs Insights queries log data, not CloudWatch metric namespaces containing EC2 CPU utilization.

    CWhy this is right: Metric widgets can reference metrics in different Regions without copying or republishing them.

    DWhy not this: Links provide navigation to separate dashboards rather than displaying both Regions' metrics together.

    CloudWatch dashboards can display metrics from multiple Regions by referencing the source Region in metric widgets. Links to regional dashboards provide navigation, not the requested metrics on one dashboard.

    Open this question
  11. Question 11

    Monitoring and Logging

    An application publishes a custom queue-depth metric once per minute, and a standard-resolution alarm misses brief backlog spikes. The team needs measurements every second and an alarm that breaches when any three of the five most recent 10-second maximums exceed 100; which changes meet these requirements? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersB. Publish samples every second with StorageResolution set to 1.F. Set Maximum, a 10-second period, threshold greater than 100, and three datapoints to alarm out of five.

    AWhy not this: A 60-second average can hide brief spikes and does not implement the required 10-second maximums.

    BWhy this is right: StorageResolution 1 enables the high-resolution custom metric needed for subminute alarm periods.

    CWhy not this: Five out of five requires every interval to breach, rather than any three of the most recent five.

    DWhy not this: StorageResolution 60 retains standard resolution even when samples are submitted every second.

    EWhy not this: Metric streaming delivers data to other destinations; it does not change metric resolution or alarm evaluation.

    FWhy this is right: Maximum evaluates each interval's peak, and three out of five permits any three breaching intervals in the evaluation window.

    StorageResolution 1 enables high-resolution custom metrics. A 10-second Maximum alarm with three datapoints to alarm out of five implements the required evaluation; publishing every second at standard resolution does not provide 10-second metric resolution.

    Open this question
  12. Question 12

    Monitoring and Logging

    A company publishes a shared AWS Quick Sight (formerly Amazon QuickSight) dashboard from a dataset containing operational records for multiple business units. Each signed-in reader must see only their business unit's records, including when exporting data; which configuration should the engineer use?

    Show the answer

    Correct answerD. Configure dataset row-level security using reader-to-business-unit mappings.

    AWhy not this: Visual filters limit what a visual displays but do not establish reader-specific authorization for the dataset.

    BWhy not this: Dashboard sharing controls access to dashboards, not business-unit rows within their shared dataset.

    CWhy not this: A reader-selected parameter controls presentation rather than enforcing access to authorized records.

    DWhy this is right: Row-level security uses user or group mappings to restrict which dataset records each reader can access.

    Dataset row-level security restricts the records available to each reader, including exported data. Visual filters control presentation but are not a substitute for reader-specific data authorization.

    Open this question
  13. Question 13

    Monitoring and Logging

    An Amazon ECS service uses an EC2 Auto Scaling group capacity provider, and service auto scaling already adjusts its desired task count. The team wants ECS to adjust instance capacity while targeting approximately 20% spare capacity; what should it configure?

    Show the answer

    Correct answerA. Capacity provider managed scaling with targetCapacity set to 80

    AWhy this is right: Managed scaling adjusts EC2 capacity, and a targetCapacity of 80 targets approximately 20% spare capacity.

    BWhy not this: A targetCapacity of 100 targets full capacity utilization rather than reserving approximately 20% headroom.

    CWhy not this: An ASG CPU target does not express the spare task-placement capacity that ECS capacity provider managed scaling targets.

    DWhy not this: Service auto scaling changes the desired task count, not the underlying EC2 instance capacity.

    Capacity provider managed scaling adjusts the underlying Auto Scaling group. A targetCapacity of 80 targets 80% capacity utilization, leaving approximately 20% spare capacity; 100 does not reserve that headroom.

    Open this question
  14. Question 14

    Monitoring and Logging

    An Amazon RDS for PostgreSQL instance has storage autoscaling enabled with a maximum storage threshold of 1,000 GiB. After several automatic increases, allocated storage is 1,000 GiB. Free storage has stayed below 5% for two hours, and the last storage modification was three days ago, but storage does not grow. What change lets storage keep growing automatically?

    Show the answer

    Correct answerC. Raise the instance's maximum storage threshold above 1,000 GiB.

    AWhy not this: The six-hour wait already passed three days ago, so it is not what blocks growth.

    BWhy not this: Changing the storage type does not change the maximum storage threshold that stops autoscaling.

    CWhy this is right: Allocated storage has reached the configured maximum, so raising the threshold lets autoscaling grow storage again.

    DWhy not this: RDS allocated storage is not an Application Auto Scaling scalable dimension; storage autoscaling is the RDS feature for this.

    Storage autoscaling never grows allocated storage beyond the maximum storage threshold, and this instance has reached it. The other conditions are met: free space is below 10%, low storage has lasted more than five minutes, and more than six hours have passed since the last modification.

    Open this question
  15. Question 15

    Monitoring and Logging

    A Route 53 primary failover alias points to an ALB with Evaluate Target Health enabled; the secondary endpoint is healthy. The ALB has two nonempty target groups: one has healthy targets, and the other has only unhealthy targets; how does Route 53 respond?

    Show the answer

    Correct answerD. It treats the primary as unhealthy and returns the secondary endpoint.

    AWhy not this: Evaluate Target Health uses ALB target-group health, not merely whether the ALB endpoint is reachable.

    BWhy not this: Failover routing selects a healthy primary or secondary; it does not distribute requests by healthy target counts.

    CWhy not this: Each associated target group containing targets must have at least one healthy target for the ALB alias to be healthy.

    DWhy this is right: The target group with no healthy targets makes the primary alias unhealthy, so failover selects the healthy secondary.

    With Evaluate Target Health enabled, an ALB alias is unhealthy if any associated target group containing targets has no healthy targets. Route 53 therefore uses the healthy secondary; healthy targets in another group do not make the primary alias healthy.

    Open this question
  16. Question 16

    Monitoring and Logging

    A supported EC2 instance must recover from underlying host failures while retaining its instance ID and private IP address. Which CloudWatch alarm configuration should a DevOps engineer use?

    Show the answer

    Correct answerA. StatusCheckFailed_System with an EC2 recover action

    AWhy this is right: System status checks detect underlying host failures, and recovery retains the instance ID and private IP address.

    BWhy not this: System status checks detect host problems, but an SNS email only notifies recipients.

    CWhy not this: Instance status checks concern guest-level problems; rebooting does not move the instance away from failed host hardware.

    DWhy not this: CPU utilization does not identify underlying host failures, and stopping alone does not recover the instance.

    A system status check detects underlying infrastructure problems, and the EC2 recover action moves a supported instance to healthy hardware while retaining its identity. An instance status check concerns problems within the instance, and rebooting does not provide host recovery.

    Open this question
  17. Question 17

    Monitoring and Logging

    An application sends order events to Amazon EventBridge. A new consumer must process only events whose detail contains an order value above $1,000, without changing the producer. What should a DevOps engineer configure?

    Show the answer

    Correct answerB. An EventBridge rule with a numeric content filter

    AWhy not this: CloudWatch alarms evaluate metrics rather than filter individual events by their detail fields.

    BWhy this is right: An EventBridge event pattern can apply a numeric comparison to an order-value field and route matching events.

    CWhy not this: SNS subscriptions receive messages published to SNS topics; they do not poll EventBridge event buses.

    DWhy not this: S3 event notifications concern bucket events and cannot filter EventBridge events by order value.

    EventBridge rules can match numeric values within event detail and route matching events to a consumer. CloudWatch alarms evaluate metric data, not individual event payloads on an event bus.

    Open this question
  18. Question 18

    Monitoring and Logging

    A Lambda function processes logs uploaded under incoming/ in an S3 bucket and writes processed copies under processed/ in the same bucket. Which S3 notification configuration invokes the function for new input files while avoiding recursive invocations?

    Show the answer

    Correct answerA. Use ObjectCreated events with the prefix incoming/.

    AWhy this is right: The incoming/ prefix selects input uploads and excludes objects written under processed/.

    BWhy not this: ObjectRemoved notifications respond to deletions rather than new log uploads.

    CWhy not this: A suffix shared by input and output logs does not exclude the function's own writes.

    DWhy not this: The processed/ prefix selects output objects rather than the input files that require processing.

    Filtering ObjectCreated notifications to incoming/ invokes Lambda for uploaded inputs but excludes its outputs under processed/. A .log suffix filter can still match processed log files and cause recursive invocations.

    Open this question
  19. Question 19

    Monitoring and Logging

    An Amazon ECS cluster uses an EC2 Auto Scaling capacity provider with managed scaling enabled and runs only replica-service tasks. The company requires approximately 20% spare instance capacity and protection against terminating instances with running tasks during managed scale-in; which changes meet these requirements? (Choose two.)

    Choose 2 answers

    Show the answer

    Correct answersC. Enable managed termination protection and Auto Scaling instance scale-in protection.D. Set the capacity provider target capacity to 80%.

    AWhy not this: Managed draining coordinates task shutdown but does not provide the required protection from scale-in selection.

    BWhy not this: A CPU policy does not preserve the requested task-placement headroom or provide task-aware termination protection.

    CWhy this is right: Managed termination protection uses instance scale-in protection to protect instances that are running tasks.

    DWhy this is right: A target capacity of 80% leaves approximately 20% of instance capacity available as spare capacity.

    EWhy not this: Target capacity cannot exceed 100%; additional headroom requires a value below 100%.

    A target capacity of 80% reserves approximately 20% spare capacity. Managed termination protection requires Auto Scaling instance scale-in protection and protects instances running tasks; managed draining alone coordinates task shutdown rather than preventing selection for termination.

    Open this question
  20. Question 20

    Monitoring and Logging

    An Amazon RDS for PostgreSQL DB instance is approaching its allocated storage limit. The operations team wants storage to grow automatically within an approved ceiling without running custom automation; what should it configure?

    Show the answer

    Correct answerB. RDS storage autoscaling with a maximum storage threshold

    AWhy not this: RDS DB instance storage autoscaling is configured through RDS, not an Application Auto Scaling scalable target.

    BWhy this is right: RDS storage autoscaling provides automatic storage increases bounded by a maximum storage threshold.

    CWhy not this: An SNS notification reports low storage but does not automatically allocate more storage.

    DWhy not this: Read replicas offload reads; they do not rebalance the source DB instance's stored data.

    RDS storage autoscaling automatically increases allocated storage when its conditions are met, up to the configured maximum storage threshold. A CloudWatch alarm with an SNS notification alerts operators but does not itself increase storage.

    Open this question
  21. Question 21

    Monitoring and Logging

    An operations team needs SNS notifications for EC2 Instance State-change Notification events only when either of two designated instances enters stopped or terminated. How should an EventBridge rule's event pattern combine the instance IDs and states?

    Show the answer

    Correct answerA. Place both IDs in detail.instance-id and both states in detail.state within one pattern.

    AWhy this is right: Values within each array are alternatives, while the instance-id and state fields must both match.

    BWhy not this: EC2 state-change events identify the instance in detail.instance-id; their resources array is empty.

    CWhy not this: Separate $or branches allow a matching instance ID or a matching state instead of requiring both conditions.

    DWhy not this: EventBridge matches event structure, and these EC2 fields are nested under detail rather than at the top level.

    EventBridge uses OR between values in a field's array and AND between different fields, so one pattern matches either designated instance in either specified state. A top-level $or between the ID and state conditions would also match unrelated instances entering those states.

    Open this question
  22. Question 22

    Monitoring and Logging

    A service has CloudWatch alarms named HighErrorRate and DeploymentInProgress. Operators need an SNS notification when HighErrorRate is in ALARM only if DeploymentInProgress is not in ALARM, without changing either alarm's thresholds; which configuration meets this requirement?

    Show the answer

    Correct answerC. Create a composite alarm using ALARM(HighErrorRate) AND NOT ALARM(DeploymentInProgress); attach SNS only to it.

    AWhy not this: Matching subjects do not combine alarm states or suppress notifications during deployments.

    BWhy not this: The OR expression can trigger merely because the deployment alarm is not in ALARM.

    CWhy this is right: The AND expression requires high errors and excludes periods when the deployment alarm is in ALARM.

    DWhy not this: SNS subscription filters cannot query the current state of a separate CloudWatch alarm.

    A composite alarm evaluates Boolean expressions over other alarm states, allowing error notifications only when the deployment alarm is not in ALARM. An OR expression would also notify when no deployment is active, even without a high error rate.

    Open this question
  23. Question 23

    Monitoring and Logging

    An application uploads logs to Amazon S3 using default SSE-KMS encryption. A security review requires the bucket to reject uploads sent without TLS. Which additional control meets this requirement?

    Show the answer

    Correct answerA. Deny requests in the bucket policy when aws:SecureTransport is false.

    AWhy this is right: The aws:SecureTransport condition identifies HTTPS use, allowing the policy to reject unencrypted transport.

    BWhy not this: The SSE-KMS header requests encryption at rest and does not establish a TLS requirement.

    CWhy not this: S3 Bucket Keys reduce AWS KMS request costs for SSE-KMS; they do not enforce TLS for uploads.

    DWhy not this: A customer managed key controls encryption at rest, not whether upload requests use TLS.

    A bucket-policy deny based on aws:SecureTransport rejects requests that do not use HTTPS. SSE-KMS protects stored objects, but requiring its encryption header does not enforce encryption in transit.

    Open this question
  24. Question 24

    Monitoring and Logging

    A CloudWatch agent on EC2 must use temporary credentials to create streams and publish events in an existing same-account log group, without permission to create groups. Which configurations establish the required access using a new IAM role? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. Allow logs:CreateLogStream and logs:PutLogEvents on streams in the designated group.B. Attach the role through an instance profile associated with the EC2 instance.D. Allow ec2.amazonaws.com to perform sts:AssumeRole in the role's trust policy.

    AWhy this is right: These actions permit stream creation and event ingestion without granting permission to create log groups.

    BWhy this is right: An instance profile associates the role with EC2 so the agent can obtain temporary credentials.

    CWhy not this: PutMetricData authorizes metric publication, not log-stream creation or log-event ingestion.

    DWhy this is right: The EC2 service must be trusted to assume the instance role and provide temporary credentials to the instance.

    EWhy not this: The agent signs requests with its instance-role credentials, not as the EC2 service principal.

    FWhy not this: The agent runs on EC2; trusting CloudWatch Logs does not establish the required EC2 role assumption.

    The EC2 trust relationship and instance profile provide temporary role credentials, while the scoped Logs permissions authorize stream creation and event ingestion. Trusting the CloudWatch Logs service does not let the EC2 instance obtain the role's credentials.

    Open this question
  25. Question 25

    Monitoring and Logging

    A team disassociates a customer managed KMS key from a CloudWatch Logs log group, but must retain access to previously ingested events. New events no longer require customer managed encryption. What should the team do?

    Show the answer

    Correct answerC. Keep the old key enabled and preserve its required permissions.

    AWhy not this: Historical events remain readable without reassociating the key if the key remains available and permissions are preserved.

    BWhy not this: Disabling the key prevents CloudWatch Logs from decrypting historical events encrypted with it.

    CWhy this is right: Historical events still depend on the old key, so the key and its required permissions must remain available.

    DWhy not this: Exporting events creates a separate copy; it does not change encryption of events already stored in the log group.

    Previously ingested events remain encrypted with the old KMS key, which must remain available with the required permissions. Disassociation changes encryption for new ingestion; it does not decrypt or re-encrypt historical events.

    Open this question
  26. Question 26

    Monitoring and Logging

    A versioned S3 bucket stores exported audit logs. Investigators must always be able to recover the three most recent prior versions of each object, but any older noncurrent version must be permanently deleted 7 days after it becomes noncurrent. Which lifecycle configuration meets these requirements?

    Show the answer

    Correct answerA. Noncurrent-version expiration with NoncurrentDays set to 7 and NewerNoncurrentVersions set to 3

    AWhy this is right: S3 keeps the three newest noncurrent versions and permanently deletes older ones after they have been noncurrent for 7 days.

    BWhy not this: Without a retained count, every noncurrent version is deleted after 7 days, including the three that must stay recoverable.

    CWhy not this: Current-version expiration in a versioned bucket adds delete markers and creates more noncurrent versions; it does not remove old ones.

    DWhy not this: A transition changes the storage class of older versions but keeps their data, so nothing is permanently deleted.

    NewerNoncurrentVersions tells S3 how many of the newest noncurrent versions to keep; versions beyond that count are permanently deleted once they have been noncurrent for NoncurrentDays. Without the count, all noncurrent versions expire after 7 days, and a transition only moves data to another storage class.

    Open this question
  27. Question 27

    Monitoring and Logging

    A company must continuously deliver only AWS/EC2 CPUUtilization and NetworkIn metrics to Amazon S3 in JSON without polling; newly created instances must be included automatically. Which configuration meets these requirements with the least operational overhead?

    Show the answer

    Correct answerA. Create a metric stream including the two metric names within AWS/EC2 and deliver JSON through Amazon Data Firehose to S3.

    AWhy this is right: Metric-name inclusion filters limit the stream to the required metrics while automatically including new instances.

    BWhy not this: A namespace-only inclusion filter streams other AWS/EC2 metrics as well as CPUUtilization and NetworkIn.

    CWhy not this: Scheduled GetMetricData calls constitute polling and require maintaining a custom collection pipeline.

    DWhy not this: CloudWatch Logs subscriptions forward log events, not existing CloudWatch metric data.

    Metric streams support inclusion filters for specific metric names within a namespace and continuously deliver updates through Firehose, including metrics from new instances. Including the entire AWS/EC2 namespace would also deliver unwanted metrics.

    Open this question
  28. Question 28

    Monitoring and Logging

    A Linux EC2 instance runs the CloudWatch agent with permission to publish metrics. Operations needs disk_used_percent collected every 10 seconds as a high-resolution metric; which change should the engineer make?

    Show the answer

    Correct answerB. Set the disk metric's metrics_collection_interval to 10 seconds.

    AWhy not this: The log flush interval controls log delivery timing, not metric sampling frequency or resolution.

    BWhy this is right: A metrics_collection_interval below 60 seconds makes the agent collect and publish high-resolution metrics.

    CWhy not this: A dashboard period changes presentation; it does not increase the source metric's collection frequency.

    DWhy not this: Detailed monitoring provides one-minute EC2 service metrics; it does not configure agent disk collection.

    The CloudWatch agent publishes metrics collected at intervals below 60 seconds as high-resolution metrics. EC2 detailed monitoring changes the frequency of supported EC2 service metrics, not agent-collected disk metrics.

    Open this question
  29. Question 29

    Monitoring and Logging

    Which setting automatically expires CloudWatch Logs events after 30 days?

    Show the answer

    Correct answerB. A log group's retention setting

    AWhy not this: Subscription filters forward matching log events; they do not control source retention.

    BWhy this is right: The log group's retention setting defines how long CloudWatch Logs retains its events.

    CWhy not this: Metric filters generate metrics from matching log events; they do not expire those events.

    DWhy not this: S3 lifecycle rules expire S3 objects, not events held in CloudWatch Logs.

    A CloudWatch Logs log group's retention setting controls when its events expire. S3 lifecycle rules manage objects in S3, not events stored in CloudWatch Logs.

    Open this question
  30. Question 30

    Monitoring and Logging

    A CloudTrail event for a DeleteBucket call shows userIdentity.type AssumedRole and the role ProdDeployRole as the session issuer. Several pipelines and engineers assume ProdDeployRole, each with its own role session name. Which field identifies the session that made the call?

    Show the answer

    Correct answerC. The role session name at the end of userIdentity.arn

    AWhy not this: The session issuer is the role itself, which all pipelines and engineers share, so it does not tell their sessions apart.

    BWhy not this: invokedBy names the AWS service that made the request on the caller's behalf, not which session made it.

    CWhy this is right: The assumed-role ARN ends with the role session name, which is different for each caller.

    DWhy not this: recipientAccountId is the account that received the event, not the caller's session.

    For an assumed role, userIdentity.arn has the form arn:aws:sts::account:assumed-role/RoleName/SessionName, so its last part names the session that made the call. The session issuer identifies only the role, which every caller shares.

    Open this question
  31. Question 31

    Monitoring and Logging

    Which AWS service continuously assesses supported Amazon EC2 instances for software package vulnerabilities and unintended network exposure?

    Show the answer

    Correct answerA. Amazon Inspector

    AWhy this is right: Amazon Inspector continuously assesses supported EC2 instances for package vulnerabilities and unintended network exposure.

    BWhy not this: AWS Config evaluates resource configuration compliance, not installed software package vulnerabilities.

    CWhy not this: CloudTrail records account activity and API events rather than assessing EC2 vulnerabilities.

    DWhy not this: CloudWatch collects metrics and logs for monitoring; it does not provide EC2 software vulnerability assessments.

    Amazon Inspector assesses supported EC2 instances for software vulnerabilities and unintended network exposure. AWS Config evaluates resource configurations against rules rather than scanning installed packages for vulnerabilities.

    Open this question
  32. Question 32

    Monitoring and Logging

    A company must check EC2 ownership tags against an external approval database whenever recorded instance configurations change and at least daily because approvals can change independently. Which AWS Config rule design meets these requirements?

    Show the answer

    Correct answerB. A custom Lambda rule with configuration-change and periodic triggers

    AWhy not this: Guard policies cannot query the external approval database required for this comparison.

    BWhy this is right: Lambda can query external approvals, and the combined triggers cover configuration changes and daily reevaluation.

    CWhy not this: Configuration-change triggers do not reevaluate unchanged instances when only the external approval database changes.

    DWhy not this: Periodic evaluation meets the daily requirement but does not initiate evaluation whenever recorded instance configurations change.

    A custom Lambda rule can query the external database, while configuration-change and periodic triggers cover both instance changes and independent approval changes. A custom Guard rule evaluates configuration data declaratively and cannot query an external database.

    Open this question
  33. Question 33

    Monitoring and Logging

    Several independent applications analyze the same Kinesis data stream, and shared read-throughput contention is increasing their processing latency. Writes remain below capacity, and each application needs dedicated read throughput without maintaining duplicate streams; which change best meets these requirements?

    Show the answer

    Correct answerA. Register each application as an enhanced fan-out consumer.

    AWhy this is right: Enhanced fan-out gives each registered consumer dedicated per-shard read throughput.

    BWhy not this: Combining applications does not provide dedicated throughput to each independent application.

    CWhy not this: Longer retention expands the replay window but does not increase consumer read throughput.

    DWhy not this: More frequent polling does not provide additional shared read capacity and can increase throttling.

    Enhanced fan-out provides dedicated read throughput per registered consumer per shard, preventing consumers from competing for shared read capacity. Faster polling does not increase the shared throughput limit and can increase throttling.

    Open this question
  34. Question 34

    Monitoring and Logging

    An application writes JSON events to CloudWatch Logs. An operations team needs custom analysis of incoming events within seconds, without repeatedly querying stored logs; which solution should the engineer implement?

    Show the answer

    Correct answerC. Configure a subscription filter that invokes a Lambda function.

    AWhy not this: Scheduled queries repeatedly scan stored events instead of providing event-driven delivery.

    BWhy not this: A refreshing query widget displays query results but does not deliver events to custom processing logic.

    CWhy this is right: A subscription filter delivers matching incoming events to Lambda for custom near-real-time analysis.

    DWhy not this: S3 exports support batch analysis and are not suitable for processing incoming events within seconds.

    A CloudWatch Logs subscription filter delivers matching incoming log events to a destination such as Lambda for near-real-time processing. Logs Insights queries analyze stored events rather than continuously delivering new events to custom processing logic.

    Open this question
  35. Question 35

    Monitoring and Logging

    Athena queries S3 logs partitioned by UTC ingestion date, and events arrive between zero and 48 hours after their event timestamps. An engineer must retrieve every event from July 1 UTC while minimizing scanned partitions; which predicates should the query use?

    Show the answer

    Correct answerC. Filter event timestamps to July 1 and ingestion partitions to July 1–3.

    AWhy not this: The timestamp filter selects the correct events but does not explicitly prune ingestion-date partitions.

    BWhy not this: Restricting ingestion to July 1 excludes July 1 events that arrive on July 2 or July 3.

    CWhy this is right: The partition range includes all permitted arrivals, and the timestamp filter selects only July 1 events.

    DWhy not this: These partitions also contain events whose event timestamps fall outside July 1.

    July 1 events can arrive in ingestion partitions for July 1, 2, or 3. Filtering those partitions enables pruning, while the event timestamp predicate excludes events from other days; filtering only the July 1 partition would miss late arrivals.

    Open this question
  36. Question 36

    Monitoring and Logging

    Which API Gateway REST API stage setting enables collection of AWS X-Ray traces?

    Show the answer

    Correct answerB. Active tracing

    AWhy not this: Access logging records request information in a configured log destination, not X-Ray traces.

    BWhy this is right: Active tracing enables API Gateway to send trace data to AWS X-Ray.

    CWhy not this: Execution logging records request processing details in CloudWatch Logs, not distributed traces.

    DWhy not this: Detailed metrics provide additional API performance measurements, not X-Ray traces.

    Active tracing enables AWS X-Ray tracing for an API Gateway REST API stage. Execution logging records API execution details in CloudWatch Logs but does not enable distributed tracing.

    Open this question
  37. Question 37

    Monitoring and Logging

    A company is configuring a new CloudWatch Logs group with a customer managed KMS key, and ingestion roles already have log-writing permissions. Security requires key use to be limited to this log group and the roles' KMS access to occur through CloudWatch Logs; which configuration actions meet these requirements? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. Grant the regional CloudWatch Logs service principal key use, restricted by the log group's encryption context.C. Grant ingestion roles KMS access conditioned on kms:ViaService matching the regional CloudWatch Logs service.E. Associate the log group with a symmetric encryption KMS key in the same Region.

    AWhy this is right: The aws:logs:arn encryption context lets the key policy restrict service use to the specified log group.

    BWhy not this: An S3 ViaService condition does not match KMS requests made through CloudWatch Logs.

    CWhy this is right: kms:ViaService restricts the roles' permitted KMS operations to requests made through the specified service.

    DWhy not this: CloudWatch Logs does not support asymmetric KMS keys for log group encryption.

    EWhy this is right: CloudWatch Logs supports symmetric encryption KMS keys, and the associated key must be in the log group's Region.

    CloudWatch Logs requires a same-Region symmetric key; its regional service principal can be restricted using the log group ARN in the encryption context. Role permissions can require the CloudWatch Logs kms:ViaService value; an S3 service condition does not authorize that path.

    Open this question
  38. Question 38

    Monitoring and Logging

    A CloudWatch Logs subscription sends events to a provisioned Kinesis data stream, but one high-volume log stream causes shard throttling while other shards have spare capacity. Event ordering is unnecessary; which change BEST distributes the subscription traffic?

    Show the answer

    Correct answerB. Set the subscription filter's distribution to Random.

    AWhy not this: ByLogStream groups traffic by log stream and can preserve the hot-shard problem.

    BWhy this is right: Random distribution spreads records across shards, reducing concentration caused by a high-volume log stream.

    CWhy not this: Metric filters extract metrics from events; they do not redistribute subscription records.

    DWhy not this: Retention controls how long source events remain stored, not how subscription traffic reaches shards.

    Random distribution spreads subscription records across shards rather than grouping them by log stream. ByLogStream can concentrate a high-volume log stream on one shard even when other shards have spare capacity.

    Open this question
  39. Question 39

    Monitoring and Logging

    A CloudWatch Logs group uses a customer managed KMS key with AWS-generated key material. Security requires annual key-material rotation while existing logs remain readable without rewriting them; which action BEST meets this requirement?

    Show the answer

    Correct answerC. Enable automatic annual rotation on the existing KMS key.

    AWhy not this: Historical events still need the previous key; disabling it prevents their decryption.

    BWhy not this: Changing an alias changes a reference, not the cryptographic key material.

    CWhy this is right: Automatic rotation preserves the key identity and retains older key material for decryption.

    DWhy not this: S3 Bucket Keys reduce KMS request costs and do not rotate the CloudWatch Logs encryption key.

    Automatic KMS rotation changes key material while retaining previous material to decrypt existing ciphertext. Reassociating a log group with a new key does not re-encrypt historical events, so disabling the previous key can make those events unreadable.

    Open this question
  40. Question 40

    Monitoring and Logging

    Retained JSON logs contain automatically discovered fields named service, status, and latencyMs; no latency metrics exist. An engineer needs each service's 95th-percentile latency for requests with status 500 during yesterday's incident; which Logs Insights query should run over that time range?

    Show the answer

    Correct answerC. filter status = 500 | stats pct(latencyMs, 95) by service

    AWhy not this: The average measures the mean latency rather than the required 95th percentile.

    BWhy not this: This aggregates all statuses and then filters the service name, not the request status.

    CWhy this is right: This selects status 500 events and calculates their 95th-percentile latency separately for each service.

    DWhy not this: Returning the 95 slowest events does not calculate a percentile or group results by service.

    Filtering status before aggregation restricts the population to failed requests, and pct(latencyMs, 95) calculates each service's 95th percentile. Sorting and returning 95 events produces a list of slow requests, not a percentile.

    Open this question
  41. Question 41

    Monitoring and Logging

    Which configuration sends an SNS notification when EventBridge receives an AWS Health event?

    Show the answer

    Correct answerC. An EventBridge rule matching aws.health with an SNS target

    AWhy not this: A schedule invokes its target at configured times, not when an AWS Health event arrives.

    BWhy not this: Metric filters process CloudWatch Logs data, not events arriving on an EventBridge event bus.

    CWhy this is right: An event pattern matching the aws.health source routes matching AWS Health events to the SNS target.

    DWhy not this: AWS Config rules evaluate resource compliance; they do not directly match incoming AWS Health events.

    An EventBridge rule can match AWS Health events by their aws.health source and route them to SNS. A schedule runs at specified times rather than in response to matching events.

    Open this question
  42. Question 42

    Monitoring and Logging

    An AWS Config managed rule detects noncompliant security groups, but operators must approve each correction before it runs. What should the engineer configure?

    Show the answer

    Correct answerD. Manual remediation using a Systems Manager Automation runbook

    AWhy not this: Evaluation frequency controls compliance checks, not approval or execution of corrective actions.

    BWhy not this: A notification does not define or execute a corrective action, and Config rules do not use SNS targets this way.

    CWhy not this: Automatic remediation does not wait for an operator to initiate each correction.

    DWhy this is right: Manual remediation allows an operator to review the finding and initiate the configured Automation runbook.

    Manual remediation lets an operator initiate an associated Systems Manager Automation runbook after reviewing a finding. Automatic remediation starts without that per-resource decision; changing its retry interval does not add approval.

    Open this question
  43. Question 43

    Monitoring and Logging

    An ALB target group has registered instances in enabled Availability Zones, but every instance fails its health check after a readiness endpoint change. Requests still reach those instances; what should the engineer conclude?

    Show the answer

    Correct answerC. The ALB fails open when the target group has only unhealthy targets.

    AWhy not this: ALB uses health checks to select healthy targets when healthy targets are available.

    BWhy not this: ALB does not automatically replace configured HTTP or HTTPS health checks with TCP checks.

    CWhy this is right: With all registered targets unhealthy, ALB fails open and routes to those targets.

    DWhy not this: DNS caching does not preserve a target's previous health state inside the ALB.

    When a target group contains only unhealthy registered targets, an ALB fails open and routes requests to them. This behavior is not caused by DNS caching; target health is evaluated independently of DNS resolution.

    Open this question
  44. Question 44

    Monitoring and Logging

    An ALB target group uses traffic port 8443, where targets accept only HTTPS. The application returns 204 from /ready when ready and 503 otherwise; which health check settings should the engineer select to test readiness? (Choose three.)

    Choose 3 answers

    Show the answer

    Correct answersA. Set the health check protocol to HTTPS.B. Set the health check success code to 204.C. Set the health check path to /ready.

    AWhy this is right: HTTPS matches the protocol accepted by the targets on the configured traffic port.

    BWhy this is right: A success code of 204 matches the ready response while excluding the failure response of 503.

    CWhy this is right: The /ready endpoint reports whether the application is ready to serve requests.

    DWhy not this: A success code of 200 does not match the application's ready response of 204.

    EWhy not this: ALB target group health checks support HTTP and HTTPS, not TCP.

    The health check must use HTTPS, request /ready, and treat 204 as success. The default success code of 200 would mark ready targets unhealthy because their readiness response is 204.

    Open this question
  45. Question 45

    Monitoring and Logging

    A tagged EC2 fleet continually replaces instances and must collect memory metrics and application logs using a centrally maintained configuration. Instances already have SSM Agent, required permissions, and network access; which approach installs the collector, configures future instances, and periodically corrects configuration drift?

    Show the answer

    Correct answerA. Use State Manager associations to install CloudWatch agent and periodically apply its configuration from Parameter Store.

    AWhy this is right: State Manager supports recurring configuration enforcement and automatically includes new instances that match the tag targets.

    BWhy not this: A one-time Run Command invocation does not configure future instances or periodically correct drift.

    CWhy not this: Launch-time initialization configures new instances but does not periodically reapply configuration to running instances.

    DWhy not this: SSM Agent enables Systems Manager operations; its command output settings do not collect application logs or memory metrics.

    Tag-targeted State Manager associations can install CloudWatch agent and periodically apply a centrally stored configuration to current and future matching instances. Launch-time initialization covers replacement instances but does not periodically correct drift.

    Open this question