Cybersecurity & Information Security

Investigating Suspect AWS Credentials with CloudTrail and GuardDuty

6 min readPublished: August 5, 2026
Professional visual illustration on the topic of AWS Credentials investigation in Cloud Security and IR
Quick answer

Investigating AWS Credentials requires connecting Identity, Audit Logs, API actions, Resources, Regions, and Sessions. Start by preserving evidence and building a Timeline, then perform documented Containment.

Cloud investigation requires connecting identities, Control Plane, resources, keys, sessions, and security services. Since activity is distributed across services and regions, a Timeline and understanding permissions are critical. This article focuses on investigating AWS Credentials and is intended for Cloud and SOC analysts. The goal is to provide a working methodology that can be applied in practice, during professional interviews, and in a work environment, without settling for a dictionary definition.

The main challenge is that data is almost always partial. CloudTrail, GuardDuty, IAM principal can point to a direction, but their meaning depends on time, asset, user, and expected activity. Therefore, we will build the investigation around an investigative question, required evidence, and clear criteria for completion.

The practical scenario in the article is: investigating simulated API calls from an unusual location. All examples are lab data or descriptions of processes. When dealing with Penetration Testing, Web, or Cloud, one must only work with explicit authorization, a defined Scope, and the ability to stop the test.

Telemetry Sources

At this stage, define what evidence is needed to answer the investigative question. For AWS Credentials investigation, the basic points are Principal and session, API action, Resource and region, Source IP and user agent. For each source, document owner, retention period, time zone, ingestion delay, and fields that may be missing.

Collection quality is not measured by the log 'arriving'. You must check Completeness, Latency, Parsing, Duplicate events, and time synchronization. A Canary test or a known lab event allows verifying that the action appeared in the source, passed through the Pipeline, and is searchable in the correct fields.

Principal and Access key

The topic 'Principal and Access key' is a central part of working on AWS Credentials investigation. It is recommended to break it down into three questions: what is the input, what decision do you want to make, and what evidence is sufficient to justify it. These questions prevent automatic tool use without understanding the purpose.

In practice, list CloudTrail, GuardDuty, IAM principal, access key, AssumeRole, compare to expected behavior, and define at least one Pivot. The result should be verifiable by another analyst, including limitations and next steps.

CloudTrail timeline

The Timeline is the backbone of AWS Credentials investigation. Normalize times to UTC or explicitly state the time zone, save both Event time and Ingestion time, and connect events by stable identifiers. The line should include time, source, entity, action, result, and reliability.

A gap or contradiction is not a document error but a finding. Clock drift, ingestion delay, NAT, reuse of PID, or a persistent Session can change order. Therefore, indicate uncertainty ranges and maintain a link back to the raw evidence.

GuardDuty and Scoping

The topic 'GuardDuty and Scoping' is a central part of working on AWS Credentials investigation. It is recommended to break it down into three questions: what is the input, what decision do you want to make, and what evidence is sufficient to justify it. These questions prevent automatic tool use without understanding the purpose.

In practice, list CloudTrail, GuardDuty, IAM principal, access key, AssumeRole, compare to expected behavior, and define at least one Pivot. The result should be verifiable by another analyst, including limitations and next steps.

Containment, Rotation and Lessons learned

The response to AWS Credentials investigation should reduce risk without erasing evidence that is still needed. Start with a reversible and focused action, confirm ownership and authority, and document time, operator, and result.

Long-term remediation addresses the root cause: permissions, configuration, Validation, Telemetry, process, or training. After implementation, perform Retest and monitor for signs of recurrence, instead of just closing a Ticket.

Unique Examination Points

In this topic, it is recommended to build a focused evidence map in advance. The main examination points are: CloudTrail, GuardDuty, IAM principal, access key, AssumeRole, region, S3/Lambda/EC2. The list is not an automatic Checklist; each item is chosen because it can connect an entity, action, and time or explain legitimate behavior.

  • CloudTrail: Define the expected value, what would be considered abnormal, and what additional source would verify the finding.
  • GuardDuty: Define the expected value, what would be considered abnormal, and what additional source would verify the finding.
  • IAM principal: Define the expected value, what would be considered abnormal, and what additional source would verify the finding.
  • access key: Define the expected value, what would be considered abnormal, and what additional source would verify the finding.
  • AssumeRole: Define the expected value, what would be considered abnormal, and what additional source would verify the finding.
  • region: Define the expected value, what would be considered abnormal, and what additional source would verify the finding.

If one of the focal points is unavailable, document the gap and choose an alternative. For example, if a Process identifier is unstable, you can use time, Host, User, and Parent; if Payload is encrypted, use Metadata, volume, frequency, and TLS/DNS context.

Practical Scenario

The chosen scenario is investigating simulated API calls from an unusual location. The purpose of the exercise is not to prove attack capability, but to practice collection, comparison, and documentation safely. Before starting, define simulated data, a time window, and an expected outcome.

At the end of the exercise, submit a product that another analyst or auditor can review: a screenshot or Export of the evidence, a short Timeline, an initial hypothesis, corroborating evidence, a limitation, and a recommendation. If there is insufficient evidence, the correct conclusion is that the scenario was not proven.

StageWhat to performOutput
PreparationDefine Scope, time, and objective. List which fields or evidence from CloudTrail, GuardDuty, IAM principal are expected to appear.Short test plan
Data CreationPerform a safe and simulated action related to AWS Credentials investigation, without real information or impact on a production system.Controlled event/Request/Flow
CollectionCollect the raw evidence and context from an additional source. Ensure Time zone, identifiers, and completeness.Two linked pieces of evidence
AnalysisWrite what each piece of evidence proves, what it doesn't prove, and what the possible legitimate explanation is.Interim conclusion
CompletionChoose closure, escalation, Finding, or Tuning; add recommendation and Retest.Documented output

Practical Checklist

  • Check and document: Principal and session.
  • Check and document: API action.
  • Check and document: Resource and region.
  • Check and document: Source IP and user agent.
  • Check and document: Audit event ID.
  • Check and document: GuardDuty/Defender/SCC finding.
  • Specify Time zone, tool version, and collection time.
  • Save raw data before filtering or modifying.
  • Write what the finding proves and what is still unknown.
  • Define owner and follow-up action with a deadline.

Common Mistakes

  • Focusing on only one region.
  • Rotating a key before preserving the Timeline.
  • Not checking AssumeRole or Token.
  • Ignoring the Control Plane.
  • Not mapping effective permissions.
  • Concluding that geographical location proves an attack.

Summary and CTA

Investigating suspect AWS Credentials with CloudTrail and GuardDuty is a topic that connects technical knowledge with work discipline. Start with a question, collect only relevant evidence, preserve context and time, and choose an action that can be justified and re-tested.

In HPI's Cybersecurity & AI track, these principles are practiced using systems, logs, and labs. A natural next step is to move on to the linked articles, perform the lab exercise, and save the output as part of a professional portfolio.

FAQ

Does AWS Credentials investigation alone prove an attack or weakness?

No. It provides a signal or finding that requires context, verification, and an additional source. A professional conclusion relies on a sequence of evidence and consistency with expected behavior.

What to do when some data is missing?

Document the missing data, check for an alternative source, and reduce the level of certainty. Do not complete fields based on assumptions or present Unknown as normal.

How long should evidence be retained?

The time depends on policy, regulation, cost, and event type. It is important to define Retention, Legal hold, and the ability to export evidence in a verifiable format in advance.

How to practice without risking a real system?

Use virtual machines, simulated data, CTF, or a dedicated lab. In authorized tests, define Scope, Stop conditions, and backup before starting work.

Want to check if this track is right for you?

Leave your details and an HPI advisor will get back to you for a short, no-obligation fit call.

Your details are stored securely.

For SOC and Cyber Studies within the Cybersecurity & AI Program

Want to hear the details? Leave your info and we'll get back to you.

Related articles