AWS 4: Monitoring and Logging: 127 practice questions
48 hours only — 15% off every course with code SAVE15. Browse courses →48h · 15% off all courses · code SAVE15 →
Certifications Tools Flashcards Career Paths Exam Guides Blog Pricing For Teams About

AWS 4: Monitoring and Logging: 127 practice questions

AWS 127 questions 12 shown free

12 of the 127 4: Monitoring and Logging questions in the Certsqill AWS bank, shown in full below. Each one carries an explanation for every option, not just the correct one — the wrong answers are where the marks go.

Preparing for AWS? Take the free 5-min readiness check →

1. Centralize logs in CloudWatch Logs for 14 days: Which design best satisfies these requirements?

Easy
A shared developer platform centralizes application and audit logs from 30 AWS accounts. Security requires tamper-resistant retention, developers need searchable logs for 14 days, and the platform team must prevent application teams from deleting centralized records. The design should minimize operational maintenance and preserve account and Region attribution. Which design best satisfies these requirements?
  1. Create a cross-account OpenSearch domain, grant developers read access, and retain indexed records for seven years.
    OpenSearch supports searching but requires cluster operations and its index retention and access controls do not by themselves provide immutable compliance retention.
  2. Centralize logs in CloudWatch Logs, set 14-day retention, and restrict log-group deletion to the platform team.
    This provides search and access control but does not provide immutable or tamper-resistant retention because an authorized administrator can still delete records or log groups.
  3. Send logs to a security-owned S3 bucket with versioning and use CloudWatch Logs Insights only when investigators need searches.
    Versioning supports recovery from some overwrites or deletions but does not establish immutable retention, and S3 alone does not provide the required convenient 14-day log search experience.
  4. Centralize logs in CloudWatch Logs for 14 days, and deliver a copy to a security-owned S3 bucket using Object Lock in compliance mode with the required retention period. ✓
    CloudWatch Logs provides managed short-term search and preserves centralized source context. A security-owned S3 bucket with Object Lock in compliance mode provides protected retention that application teams cannot shorten or delete.
The trap
It confuses administrative separation with WORM protection. It treats versioning as equivalent to Object Lock. It substitutes a search cluster for protected archival storage.

Use centralized CloudWatch Logs for 14-day search and a security-owned S3 Object Lock archive for immutable retention.

2. Create a metric filter matching rejected-shipment events: Which design should the DevOps engineer implement?

Easy
A logistics transaction service writes one JSON event per line to a Standard CloudWatch log group. Operations needs an alarm when rejected shipments exceed 20 per five-minute period, including events from multiple service instances. Existing events must not affect the new alarm, and the metric must remain inexpensive to operate. Which design should the DevOps engineer implement?
  1. Create a metric filter matching rejected-shipment events and alarm on Average greater than 20.
    Average measures the mean published value, not the total rejected events across instances during the evaluation period.
  2. Create a metric filter matching rejected-shipment events, publish value 1, use zero default, and alarm on Sum. ✓
    A metric filter counts future matching events, and Sum over five minutes detects the aggregate rejection threshold across instances.
  3. Create a Logs Insights query over the log group and attach a metric alarm directly to query results.
    A metric alarm requires a metric or metric expression; a scheduled Logs Insights query is not directly its metric input.
  4. Create a CloudWatch dashboard using the rejected-shipment search pattern and configure an alarm on the dashboard.
    Dashboards display metrics or logs but cannot create alarms from an unmaterialized search pattern.
The trap
This assumes Average counts distributed event occurrences. This confuses log querying with metric-filter publication. This treats dashboard visualization as metric generation and alarm evaluation.

A metric filter publishes one count per matching future event; Sum with a zero default detects aggregate five-minute rejections.

3. Create a CloudWatch metric stream to Amazon Data Firehose: Which design is most appropriate?

Medium
A production container fleet publishes application, platform, and business metrics to CloudWatch. A central analytics account needs near-real-time delivery of selected namespaces to Amazon S3 for long-term analysis. The team wants one managed delivery path, no custom polling, and minimal changes to application instrumentation. The destination must tolerate temporary downstream delays without losing already accepted metric data. Which design is most appropriate?
  1. Create CloudWatch Logs subscription filters for metric namespaces and send matching events to Amazon S3.
    CloudWatch metric data is not CloudWatch Logs data, so log subscriptions cannot capture ordinary published metrics.
  2. Schedule Lambda functions to call CloudWatch GetMetricData and write returned values directly into Amazon S3.
    Polling requires custom scheduling, pagination, checkpointing, and retry logic, increasing operational work and delivery gaps.
  3. Add every metric to a CloudWatch dashboard and export dashboard images into Amazon S3.
    Dashboard exports are visual snapshots and do not provide continuous raw metric delivery for analytics.
  4. Create a CloudWatch metric stream to Amazon Data Firehose, then deliver the stream to Amazon S3. ✓
    Metric streams continuously deliver selected CloudWatch metrics to Firehose, which buffers and delivers them to S3 without polling.
The trap
This confuses log events with metrics. This treats visualization artifacts as a metric-streaming mechanism. This overlooks the requirement for a managed continuous delivery path.

CloudWatch metric streams continuously deliver selected metrics to Firehose, which buffers and writes them to S3.

4. Emit Embedded Metric Format records containing billing: Select TWO.

Medium
An event-driven billing system runs on Amazon ECS and publishes invoice-processing latency and failed-payment counts. The finance team requires custom metrics with service and environment dimensions, while operations requires host disk and memory metrics from the ECS container instances. The metrics must be available to CloudWatch alarms without introducing a polling service. Exhibit: ECS instances run Amazon CloudWatch agent with IAM permissions for CloudWatch, and applications can emit Embedded Metric Format JSON to CloudWatch Logs. Select TWO.

Select two. More than one option is correct — every correct one is ticked below.

  1. Create a CloudWatch dashboard containing invoice log searches and use its widgets as custom metrics.
    Dashboard widgets visualize data but do not publish application or host measurements as CloudWatch metrics.
  2. Use an Amazon EC2 Auto Scaling alarm on instance CPU to represent billing latency and payment failures.
    CPU is unrelated to the requested application measurements and cannot represent latency or failed-payment counts.
  3. Create a CloudWatch Logs subscription filter that forwards billing events to Amazon S3 for automatic metric creation.
    A subscription delivers matching logs, but Amazon S3 storage does not automatically turn those records into CloudWatch metrics.
  4. Emit Embedded Metric Format records containing billing latency and failure counts with service and environment dimensions. ✓
    EMF extracts application metrics from log events into CloudWatch metrics, supporting dimensions and subsequent alarm evaluation.
  5. Configure the CloudWatch agent to collect instance disk and memory metrics and publish them to CloudWatch. ✓
    The CloudWatch agent collects configured guest operating-system metrics that standard instance metrics do not automatically provide.
The trap
This assumes log delivery destinations inherently publish metrics. This confuses visualization with metric collection. This substitutes an available infrastructure metric for required business metrics.

Use the CloudWatch agent for host measurements and EMF for dimensional application metrics that alarms can consume.

5. Keep operational logs in CloudWatch for 30 days: Which design best meets the lifecycle requirements?

Medium
A healthcare application team must retain operational logs for 30 days, audit logs for seven years, and keep recent logs searchable for incident response. Audit records must remain outside the application account, while operational logs should not accumulate indefinitely in CloudWatch Logs. The team already uses a centralized security account with an S3 bucket and a controlled KMS key. Which design best meets the lifecycle requirements?
  1. Set one-day CloudWatch retention and run scheduled scripts that copy audit logs to the security bucket for seven years.
    Scheduled scripts are executable but introduce avoidable delivery and completeness gaps and shorten operational searchability below 30 days.
  2. Keep operational logs in CloudWatch for 30 days and deliver audit logs through Firehose to the centralized S3 bucket. ✓
    CloudWatch retention limits operational storage, while Firehose delivers audit logs to the security-owned bucket for S3 lifecycle management and separate control.
  3. Keep both log classes in CloudWatch Logs for seven years and search them there from the application account.
    This retains data but causes unnecessary CloudWatch storage and leaves audit records under the application account's control.
  4. Export all logs immediately to S3 Glacier Deep Archive and search archived objects during every incident.
    Immediate deep archival can satisfy retention, but it does not provide convenient recent CloudWatch searchability for operations.
The trap
This applies one retention and ownership model to different log classes. This prioritizes storage cost over incident-response access. This relies on fragile custom scheduling instead of separate managed lifecycles.

Retain operational logs in CloudWatch for 30 days and stream audit logs to centralized S3.

6. Use account-level CloudWatch Logs subscription filters: Which design should be used?

Medium
A multi-Region customer portal sends logs to regional CloudWatch log groups. A security account requires near-real-time processing in a central Kinesis Data Stream, while regional teams must continue querying local logs. Required destination policies are configured, periodic file exports are prohibited, and every Region must be covered. Which design should be used?
  1. Configure each application host to publish logs directly to the central Kinesis stream.
    Direct publishing bypasses CloudWatch Logs retention and local querying and increases application coupling.
  2. Use account-level CloudWatch Logs subscription filters to stream regional log events to the central Kinesis destination. ✓
    Account-level subscription filters continuously stream matching events while leaving the source log groups available for local queries.
  3. Use scheduled Athena queries to send periodic query results to the central Kinesis stream.
    Athena queries are batch-oriented and do not provide near-real-time delivery of every event.
  4. Create regional CloudWatch metric streams and forward their records to the central Kinesis stream.
    Metric streams deliver metrics, not the application log events required by the processor.
The trap
Confuses scheduled analysis with continuous log streaming. Replaces the required managed log path unnecessarily. Confuses metric streaming with log streaming.

Use account-level CloudWatch Logs subscriptions to stream events continuously.

7. Use CloudWatch Logs Insights with fields: Which approach is most suitable?

Medium
An internal operations team investigates intermittent checkout failures across several CloudWatch log groups. Each event includes fields such as requestId, status, latencyMs, and service. The team needs a one-time query that aggregates failures by service, identifies slow requests above 2,000 milliseconds, and returns representative request IDs. Results must be produced from existing logs without creating new metrics or subscriptions. Which approach is most suitable?
  1. Create dashboard widgets for each service, compare their metric values, and correlate IDs separately.
    Dashboards can display metrics or queries, but this approach does not efficiently produce the requested combined request-level results.
  2. Create service-specific metric filters, graph the resulting metrics, and inspect the series.
    Metric filters create numerical metrics and do not conveniently return representative request IDs from historical records.
  3. Use CloudWatch Logs Insights with fields, filter, stats, sort, and limit. ✓
    Logs Insights interactively queries existing events, filters failures and latency, aggregates by service, and returns representative IDs.
  4. Export the groups to Amazon S3, catalog the files, and query them with Athena.
    This is executable, but export, cataloging, and batch querying add unnecessary steps for an interactive one-time investigation.
The trap
It uses a batch workflow instead of direct log exploration. It substitutes metric publication for record-level analysis. It treats visualization and separate correlation as an ad hoc query.

Use CloudWatch Logs Insights for the one-time analysis.

8. Associate the customer managed KMS key with each: Select TWO.

Medium
A partner-facing API platform writes sensitive request and response metadata to CloudWatch Logs in a dedicated account. Compliance requires encryption at rest with a customer managed AWS KMS key and denies workload teams permission to administer that key. Operations must still deliver selected events through a subscription to Amazon Data Firehose, and the platform must retain normal CloudWatch querying. The security team owns the key and can update its key policy. Select TWO.

Select two. More than one option is correct — every correct one is ticked below.

  1. Give application roles kms:PutKeyPolicy so they can configure log-group encryption independently.
    Application roles do not need key-administration permissions, and granting PutKeyPolicy violates administrative separation.
  2. Use an IAM policy allowing developers to decrypt all log groups without considering the KMS key policy.
    KMS authorization requires compatible IAM and key-policy permissions, and unrestricted developer decryption violates the stated control.
  3. Associate the customer managed KMS key with each CloudWatch log group requiring encrypted storage. ✓
    CloudWatch Logs supports associating customer managed KMS keys with log groups for encryption at rest.
  4. Grant the CloudWatch Logs service principal required KMS permissions through the key policy and restrict key administration separately. ✓
    The key policy must permit CloudWatch Logs to use the key while excluding workload teams from administrative key actions.
  5. Encrypt only the Firehose destination and leave the CloudWatch log groups using their default encryption.
    Encrypting Firehose does not satisfy the requirement that stored CloudWatch log-group data use the customer managed key.
The trap
This treats downstream encryption as protection for the source log store. This confuses using a KMS key with administering its policy. This assumes IAM permissions alone override the customer managed key policy.

Associate the customer managed key with log groups and authorize CloudWatch Logs in the key policy while separating administration.

9. Use cross-account CloudWatch dashboards for operations: Which design is most appropriate?

Medium
A large organization operates workload accounts under AWS Organizations and maintains a separate security account. Security analysts need one view of cross-account operational metrics and alarms, while finance needs monthly visualizations combining CloudWatch metrics with business data stored in Amazon S3. Workload teams must retain ownership of their resources, and the design should avoid duplicating dashboards in every account. Which design is most appropriate?
  1. Use CloudTrail organization events as the source for utilization dashboards and alarms.
    CloudTrail records API activity, not application latency or resource-utilization metrics for CloudWatch alarms.
  2. Use cross-account CloudWatch dashboards for operations and QuickSight for CloudWatch and S3 reporting. ✓
    Cross-account CloudWatch dashboards centralize operational metrics and alarms, while QuickSight supports broader analytical visualizations using CloudWatch and S3 data.
  3. Keep dashboards in each workload account and have analysts switch accounts during incidents.
    This is supported but duplicates dashboard maintenance and does not provide the requested centralized view.
  4. Use QuickSight dashboards for operational alarms and combine them with CloudWatch metrics and S3 business datasets.
    QuickSight supports analytical reporting but does not replace CloudWatch alarm evaluation and operational alerting.
The trap
It preserves account ownership but fails the centralized-visibility requirement. It confuses audit records with operational telemetry. It treats business intelligence as the operational alarm platform.

Use cross-account CloudWatch for operations and QuickSight for combined business analytics.

10. Alarm on both dimensions with Sum: Which configuration should be implemented?

Medium
A multi-account retail platform has a custom CloudWatch metric named CheckoutErrors in namespace Retail/Checkout, with dimensions Environment=prod and Region=us-east-1. The operations team needs an alarm when the metric Sum exceeds 50 during two consecutive five-minute periods, and the alarm must notify an SNS topic. The metric is already published by the application, and missing data should not be treated as breaching. Which configuration should be implemented?
  1. Alarm on the metric name without dimensions, using Average over one ten-minute period, SNS notification, and not-breaching treatment for missing data.
    Omitting dimensions can fail to identify the published series, and the statistic and evaluation window do not match the requirement.
  2. Create a composite alarm from an underlying CheckoutErrors alarm, use the composite for SNS notification, and leave the metric alarm at its defaults.
    A composite alarm can notify SNS, but the underlying metric alarm still must specify the exact dimensions, statistic, period, threshold, and missing-data behavior.
  3. Alarm on both dimensions with Sum, two five-minute periods, threshold 50, SNS, and missing data not breaching. ✓
    This selects the exact dimensional time series and applies the required statistic, period, evaluation count, threshold, action, and missing-data treatment.
  4. Create a scheduled Logs Insights alarm for records containing CheckoutErrors, aggregate two ten-minute query runs, and send the result to SNS.
    Log alarms are supported, but this substitutes log searching and different timing for the already published dimensional metric.
The trap
Assumes the metric name alone identifies a dimensional series. Uses a valid alarm type while leaving the required metric configuration unspecified. Substitutes log data for the specified metric.

Alarm on both dimensions with Sum, two five-minute periods, threshold 50, SNS, and missing data not breaching.

11. Enable native X-Ray tracing for API Gateway and Lambda: Which deployment design satisfies these requirements?

Medium
A regulated financial service uses an API Gateway REST API, Lambda, and ECS across two Regions. Auditors require request-path visibility through all three layers, developers must correlate traces without modifying business logic, and least-privilege telemetry access is required. API Gateway and Lambda are managed services, while ECS tasks use supported OpenTelemetry instrumentation. Which deployment design satisfies these requirements?
  1. Install the CloudWatch agent on ECS tasks, forward API Gateway and Lambda logs to a central group, and grant developers Logs Insights access.
    Logs and agent telemetry are executable monitoring choices but do not provide correlated distributed traces through all three request layers.
  2. Enable native X-Ray tracing for API Gateway and Lambda, run ADOT for ECS, and give the ECS task role administrator access for telemetry troubleshooting.
    The tracing design is appropriate, but administrator access violates the stated least-privilege requirement; the collector needs only the required telemetry actions.
  3. Enable X-Ray for Lambda, use CloudTrail organization trails for API Gateway and ECS, and grant developers read access to CloudTrail events.
    CloudTrail records API activity rather than correlated request segments, so it does not provide request-path visibility through API Gateway, Lambda, and ECS.
  4. Enable native X-Ray tracing for API Gateway and Lambda, run an ADOT collector for the instrumented ECS tasks, and grant the collector only trace-ingest actions while granting developers read-only trace access. ✓
    Native integrations cover API Gateway and Lambda. Supported OpenTelemetry instrumentation with ADOT covers ECS, and separate narrowly scoped ingestion and read roles address telemetry least privilege without requiring business-logic changes.
The trap
It uses a working tracing architecture with excessive permissions. It confuses control-plane auditing with distributed tracing. It substitutes logs for tracing.

Use native X-Ray integrations for API Gateway and Lambda, ADOT for ECS, and separate least-privilege telemetry roles.

12. Use Kinesis Data Streams partition keys derived: Select TWO implementation choices that satisfy these requirem

Medium
A SaaS application serves 300 enterprise tenants from Amazon ECS. Each tenant’s application logs are written to separate CloudWatch log streams, and security requires near-real-time detection of authentication failures without polling. Operations also needs replay when a downstream analytics consumer is unavailable. Tenant identifiers must remain available to consumers, and the design must avoid sending every log event through a single synchronous processor. Select TWO implementation choices that satisfy these requirements.

Select two. More than one option is correct — every correct one is ticked below.

  1. Use Kinesis Data Streams partition keys derived from tenant identifiers and process records with independent consumer applications. ✓
    Tenant-based partitioning preserves ordering per tenant while allowing multiple consumers and retained records for replay.
  2. Schedule CloudWatch Logs Insights queries every hour and export their results to Amazon S3 for consumer processing.
    Scheduled queries introduce polling delays and do not provide the required near-real-time stream for authentication detection.
  3. Send all log events to an Amazon SNS topic and use email subscriptions for tenant-specific authentication alerts.
    SNS can notify subscribers, but email delivery is unsuitable for replayable processing and structured tenant stream consumption.
  4. Create a CloudWatch Logs subscription filter that sends matching log events to an Amazon Kinesis Data Stream. ✓
    Subscription filters deliver matching logs continuously to Kinesis, preserving near-real-time processing and replayable stream records.
  5. Configure CloudWatch Logs to deliver directly to Amazon OpenSearch Service without an intermediate durable stream.
    Direct delivery can support search, but it lacks the required independent replay buffer when the downstream service is unavailable.
The trap
This overlooks the explicit replay and consumer-decoupling requirement. This treats periodic analytics queries as equivalent to continuous log-stream delivery. This confuses notification fanout with durable, consumer-controlled stream processing.

Use CloudWatch Logs subscriptions into Kinesis, then partition and consume records by tenant for real-time processing and replay.

115 more 4: Monitoring and Logging questions

The remaining 115 questions in this domain are part of the full AWS bank — 849 questions, every option explained. Start with the free five-minute check and see your score per domain.

Test your AWS readiness — free

Other AWS domains

Part of the Certsqill AWS question bank · 4: Monitoring and Logging · Every answer, right and wrong, comes with its own explanation.