Courseiva
Question 1,220 of 724
Development with AWS ServiceseasyMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A developer needs to store application logs from multiple EC2 instances in a centralized location for analysis. The logs should be retained for 90 days. Which AWS service should be used to collect and store the logs?

⚠ Common exam trap

It's easy for candidates to confuse AWS CloudTrail (which logs API calls) with CloudWatch Logs (which collects application logs), leading them to select CloudTrail for application-level logging needs.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Amazon CloudWatch Logs

Amazon CloudWatch Logs is the correct service for collecting, monitoring, and storing application logs from EC2 instances in a centralized location. It integrates directly with the CloudWatch Logs agent (or unified CloudWatch agent) installed on EC2 instances to stream log data, and it supports configurable retention policies, including a 90-day retention period. This makes it the ideal choice for centralized log storage and analysis without requiring additional infrastructure.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Amazon Kinesis Data Firehose

    Why it's wrong here

    While Amazon Kinesis Data Firehose can ingest various data streams, including logs, it is primarily designed for loading streaming data into data lakes, data stores, and analytics services like Amazon S3, Amazon Redshift, or Amazon OpenSearch Service. For simple application log collection, storage, and retention from EC2 instances, it introduces unnecessary complexity and cost. It requires agents or direct API calls to send data, and its primary output targets are not optimized for direct log viewing and querying in the same way a dedicated log management service is.

  • Amazon CloudWatch Logs

    Why this is correct

    Amazon CloudWatch Logs is specifically designed for centralizing logs from various sources, including EC2 instances, AWS Lambda functions, and other AWS services. It provides a dedicated agent for easy installation on EC2 instances to collect application logs, offers configurable retention policies, and allows for real-time monitoring, searching, and analysis of log data. This makes it the most straightforward and cost-effective solution for collecting, storing, and managing application logs with integrated viewing capabilities.

  • AWS CloudTrail

    Why it's wrong here

    AWS CloudTrail is a service that records API calls made to AWS services within your account, providing a comprehensive history of actions taken by users, roles, or AWS services. It is fundamentally an auditing and governance tool, not a general-purpose application log collection service. CloudTrail logs detail who did what, when, and from where within the AWS environment, which is distinct from the operational and debugging information found in application-specific logs generated by software running on EC2 instances.

  • Amazon S3 with S3 Server Access Logs

    Why it's wrong here

    Amazon S3 with S3 Server Access Logs provides detailed records for requests made to an S3 bucket, including the requester, bucket name, request time, action, and response status. These logs are specific to S3 bucket operations and are used for auditing S3 access patterns and understanding data usage. They are entirely unrelated to collecting application-specific logs generated by software running on EC2 instances, which would require a different mechanism, such as an agent pushing logs to S3, but S3 itself is not a log collection service.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

1 more way this is tested on DVA-C02

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A developer is implementing a solution to store application logs from multiple EC2 instances. The logs must be stored in a centralized location for analysis. Which services can the developer use to achieve this? (Choose TWO.)

medium
  • A.Amazon CloudWatch Logs
  • B.AWS CloudTrail
  • C.Amazon Kinesis Data Analytics
  • D.Amazon DynamoDB
  • E.Amazon S3

Why A: Amazon CloudWatch Logs is correct because it provides a centralized service for collecting, monitoring, and storing log data from EC2 instances. By installing the CloudWatch Logs agent on each EC2 instance, logs are automatically streamed to CloudWatch Logs, where they can be analyzed, searched, and retained for auditing or troubleshooting.

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.