Locate Source IP and User Agent in CloudTrail Logs
A security engineer is investigating a potential security incident. CloudTrail logs show that an IAM user 'admin' deleted an S3 bucket at 2023-01-15T10:30:00Z. The engineer needs to find the source IP address and user agent of the request. Which CloudTrail log field contains this information?
Quick Answer
Every CloudTrail event record is a structured JSON object with a consistent set of fields regardless of which service or API call generated it, and two of those fields exist specifically to answer the who-and-how question during an investigation: sourceIPAddress records the IP address the request actually came from, and userAgent records what tool or client made the call, such as the AWS CLI, an SDK, or a browser session in the console. Because these fields are present on essentially every CloudTrail event, they are the standard starting point whenever an investigation needs to establish where a suspicious or destructive API call originated and what client software issued it, which is exactly the information needed here to trace the DeleteBucket call back to its source. This is worth generalizing beyond this one question: CloudTrail event records also include fields like eventTime, eventName, and userIdentity that capture different dimensions of an API call, so investigators need to know which field maps to which piece of information rather than treating the whole record as one undifferentiated blob. Whenever an AWS security scenario asks specifically for the origin or client of an API call rather than who made it or when it happened, the answer points to sourceIPAddress and userAgent, and recognizing that CloudTrail records are field-structured rather than free text is the fastest way to answer these log-analysis questions correctly.
⚠ Common exam trap
Many exam-takers confuse `requestParameters` with containing all request metadata, but it only holds the API call's input parameters, not the network-level origin details like source IP or user agent.
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
✓
userAgent and sourceIPAddress
CloudTrail logs capture the `userAgent` and `sourceIPAddress` fields directly in the log event record. These fields are part of the CloudTrail `Event` record structure, specifically under the `userIdentity` and `sourceIPAddress` top-level attributes, and they provide the exact source IP address and user agent string (e.g., AWS CLI, SDK, console browser) for the API call that deleted the S3 bucket.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
eventID
Why it's wrong here
eventID is a unique identifier for the event, not user agent or IP.
- ✗
requestParameters
Why it's wrong here
requestParameters contains the API call parameters, not metadata.
- ✓
userAgent and sourceIPAddress
Why this is correct
These fields contain the required information.
- ✗
resources
Why it's wrong here
resources lists the affected resources.
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
One of 376 original SCS-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 →
Same concept, more angles
1 more way this is tested on SCS-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 security engineer is reviewing AWS CloudTrail logs and finds that an IAM user 'developer1' deleted an S3 bucket. The engineer needs to determine the source IP address of the delete operation. Which field in the CloudTrail log record contains this information?
medium- A.userIdentity
- B.requestParameters
- C.eventTime
- ✓ D.sourceIPAddress
Why D: The `sourceIPAddress` field in a CloudTrail log record captures the IP address from which the API call was made. For S3 bucket deletion via the AWS Management Console, AWS CLI, or SDK, this field records the originating IP address, enabling the security engineer to trace the delete operation back to its source.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SCS-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 SCS-C02 exam.