Courseiva
Continuous Improvement for Existing SolutionsmediumMultiple ChoiceObjective-mapped

SAP-C02 Continuous Improvement for Existing Solutions Practice Question

A company's AWS CloudTrail logs are stored in an S3 bucket. A Solutions Architect needs to analyze the logs to identify API calls that created or modified IAM roles in the last 30 days. What is the MOST efficient way to perform this analysis?

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

Use Amazon Athena to run SQL queries on the logs.

Amazon Athena enables running SQL queries directly on CloudTrail logs stored in S3 without the need to move or transform data. This is the most efficient method for analyzing historical CloudTrail data. Option A is incorrect because CloudWatch Logs Insights is designed for logs stored in CloudWatch Logs, not for S3-stored CloudTrail logs. Option C is incorrect because using Lambda to export to Redshift adds unnecessary complexity and cost compared to querying in place with Athena. Option D is incorrect because S3 Select is limited to filtering data within a single object and does not support complex SQL queries across multiple log files.

Answer analysis

Option-by-option breakdown

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

  • Use Amazon CloudWatch Logs Insights to query the logs.

    Why it's wrong here

    CloudWatch Logs Insights works with CloudWatch Logs, not directly with CloudTrail logs stored in S3.

  • Use Amazon Athena to run SQL queries on the logs.

    Why this is correct

    Athena can directly query CloudTrail logs in S3 using SQL, making it efficient for this analysis.

  • Use an AWS Lambda function to process the logs and export to Amazon Redshift.

    Why it's wrong here

    This approach adds unnecessary complexity and cost compared to using Athena.

  • Use S3 Select to filter the records.

    Why it's wrong here

    S3 Select is for simple filtering of a single object, not for complex queries across multiple log files.

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

One of 1,660 original SAP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SAP-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 SAP-C02 exam.