AWS CloudTrail Flashcards

(24 cards)

1
Q

What is AWS CloudTrail?

A

AWS CloudTrail is a service that enables governance, compliance, operational auditing and risk auditing of your AWS account by logging continuously monitoring and retaining account activity related to actions across AWS infrastructure.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What types of events does CloudTrail capture?

A

CloudTrail captures management events (operations on resources) and data events (resource operations like S3 object-level API calls or Lambda function invocations).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the default behavior of CloudTrail when first enabled?

A

By default CloudTrail records management events for the last 90 days in the AWS Management Console but to store logs long-term you must create a trail to an S3 bucket.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a trail in AWS CloudTrail?

A

A trail is a configuration that enables delivery of CloudTrail events to an Amazon S3 bucket and optionally to CloudWatch Logs or EventBridge.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Can a single trail log events from multiple AWS regions?

A

Yes. Trails can be multi-region capturing events from all regions or single-region.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the main destinations for CloudTrail logs?

A

Amazon S3 (for storage) Amazon CloudWatch Logs (for real-time monitoring) and Amazon EventBridge (for event-driven responses).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the difference between management events and data events?

A

Management events are operations like creating or deleting an EC2 instance IAM changes etc. Data events are operations on specific resources such as S3 object-level API calls or Lambda function execution logs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Are data events logged by default?

A

No, data events must be explicitly enabled on a trail.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is an example of a read-only and write management event?

A

Read-only: DescribeInstances ListBuckets. Write: CreateBucket TerminateInstances.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How can CloudTrail logs be analyzed in near real-time?

A

By integrating CloudTrail with Amazon CloudWatch Logs to create metrics alarms or EventBridge for automated responses.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

How does CloudTrail integrate with AWS Organizations?

A

You can create an organization trail to log events for all accounts in the organization automatically.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Can CloudTrail be used for compliance audits?

A

Yes, it provides immutable time-stamped logs of all AWS API calls which are crucial for compliance audits (e.g. PCI DSS; HIPAA; SOC 2). Integration

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How can CloudTrail logs be secured?

A

Enable S3 bucket encryption (SSE-S3 or SSE-KMS) enable log file validation to detect tampering use IAM policies to restrict access enable multi-region trails to prevent gaps in logging.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is CloudTrail log file validation?

A

It creates a hash chain for log files that allows verification that logs have not been altered or deleted.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How long can CloudTrail store logs?

A

Logs are retained in S3 indefinitely or as per your lifecycle policy.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

You need to monitor S3 object-level API activity across multiple accounts in your AWS Organization. Which CloudTrail feature should you use?

A

Create an organization trail and enable data events for the S3 buckets.

17
Q

A CloudTrail trail is sending logs to an S3 bucket. You want to trigger an alert if someone deletes a bucket. How would you do this?

A

Integrate CloudTrail with EventBridge or CloudWatch Logs to trigger alarms for DeleteBucket API events.

18
Q

How do you ensure that CloudTrail continues logging even if an attacker deletes your trail?

A

Enable multi-region trails and use AWS Organizations to centrally manage trails; enable log file validation and apply S3 bucket policies to prevent deletion.

19
Q

Default logs in CloudTrail

A

Management events for 90 days

20
Q

Multi-region trail

A

Captures all regions prevents gaps

21
Q

Data events

A

Must be explicitly enabled (S3 objects Lambda)

22
Q

Real-time analysis

A

CloudWatch Logs EventBridge

23
Q

Log security

A

SSE KMS log validation IAM policies

24
Q

Organization trail

A

Logs for all accounts in AWS Organization