Cost-Effective Centralized Log Analysis with Athena
A company has a multi-account strategy with a centralized logging account. All VPC Flow Logs and CloudTrail logs are sent to an S3 bucket in the logging account. The security team needs to analyze these logs using Amazon Athena. Which configuration provides the MOST cost-effective and secure access?
Quick Answer
The answer is to use AWS Lake Formation to manage permissions to the central S3 bucket and allow Athena queries across accounts. This configuration is correct because Lake Formation provides a centralized, fine-grained permissions model that enables cross-account access to the S3 data lake for Athena queries without duplicating data, directly integrating column- and row-level security with Athena and S3. On the AWS Certified Solutions Architect Professional SAP-C02 exam, this scenario tests your understanding of cost-effective centralized log analysis with Athena, where the common trap is to over-engineer with multiple S3 access points or data copies, increasing cost and complexity. The key insight is that Lake Formation acts as a single permission layer, avoiding the need to replicate logs across accounts while maintaining security. Memory tip: think "Lake Formation = one permission gate for all logs," eliminating duplicate data and access points.
⚠ Common exam trap
It's easy for candidates to assume S3 access points or interface endpoints are sufficient for cross-account Athena queries, but they overlook that Athena requires a centralized metadata catalog and fine-grained permissions that only Lake Formation (or a combination of Glue Catalog and IAM) can provide cost-effectively.
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 AWS Lake Formation to manage permissions to the central S3 bucket and allow Athena queries across accounts.
AWS Lake Formation provides a centralized, fine-grained permissions model that allows the security team to grant cross-account access to the S3 data lake for Athena queries without duplicating data. It integrates directly with Athena and S3, enabling column- and row-level security while avoiding the cost and complexity of copying logs or managing multiple S3 access points.
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 S3 access points in each account to grant access to the central bucket.
Why it's wrong here
S3 access points do not eliminate the need for cross-account permissions.
- ✓
Use AWS Lake Formation to manage permissions to the central S3 bucket and allow Athena queries across accounts.
Why this is correct
Lake Formation provides fine-grained access control and can be used with Athena for cross-account queries without copying data.
- ✗
Create an S3 interface endpoint in the logging account and share it with other accounts.
Why it's wrong here
Interface endpoints provide private connectivity but do not grant access to the bucket.
- ✗
Copy logs to each account's own S3 bucket and run Athena queries locally.
Why it's wrong here
Duplicating logs increases storage costs and complexity.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
Courseiva writes every SAP-C02 question from scratch — 1,660 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on SAP-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 company has a centralized logging account and multiple application accounts. All VPC Flow Logs are sent to a central S3 bucket in the logging account. The security team needs to analyze the logs using Amazon Athena. The team must ensure queries are cost-effective and return results quickly for recent logs. Which configuration should be used?
medium- A.Convert the logs to Parquet format using AWS Glue and store them in the same bucket.
- B.Use S3 lifecycle policies to transition logs to S3 Glacier after 7 days and query with Athena.
- ✓ C.Partition the S3 bucket by date (e.g., year/month/day) and use Athena partition projection.
- D.Use Athena with federated query to scan logs directly from the application accounts.
Why C: Partitioning the S3 bucket by date (e.g., year/month/day) and using Athena partition projection allows Athena to automatically discover and prune partitions without manual metadata management. This reduces the amount of data scanned per query, lowering costs and improving query speed for recent logs. Partition projection is serverless and eliminates the need for Glue crawlers or Hive-style partition loading, making it ideal for time-series data like VPC Flow Logs.
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.