CloudTrail, CloudWatch, and AWS Config Flashcards

1
Q

What is CloudTrail?

A

Logs each API action and non-API action (e.g. logging into management console) against your AWS resources.

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

What is CloudWatch?

A
  • Collects performance matrics
  • Collects log files
  • Provides alarms/notification/action
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is AWS Config?

A

AWS Config tracks how your AWS resources are configured and how they change over time.

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

What are event types in CloudTrail?

A
  • Management Event (e.g. launch EC2)

- Data Event (e.g. S3, Lambda)

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

What is Event History in CloudTrail?

A

By default, CloudTrail logs 90 days of management events and stores them in a viewable, searchable, and downloadable database called the Event History.

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

Is CloudTrail Event History region specific?

A

Yes, CloudTrail creates a separate event history for each region containing only the activities that occurred in that region.

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

What are the use cases of Trails in CloudTrail?

A
  • Keep more than 90 days of event history

- Customize the event types to log (e.g. including S3 downloads/uploads data events)

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

Where is Trail’s log file stored?

A

S3

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

What is the format of Trail’s log file?

A

JSON

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

What is number of Trails that you can create in a single region?

A

5

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

How to make sure CloudTrail logs are not hacked?

A

Enable Log File Integrity Validation.

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

Do all AWS resources automatically send metrics to CloudWatch?

A

Yes.

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

How does CloudWatch organize metrics?

A

By namespace (e.g. AWS/EC2). Custom namespace can be created for custom metrics.

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

How often does AWS resource send metrics to CloudWatch?

A

For basic monitoring, it’s 5 minutes.
For detailed monitoring, it’s every minute.

With basic monitoring, EC2 collects metrics every minute but sends only the five‐minute average to CloudWatch.

For example, between 13:00 and 13:05, an EC2 instance has the following CPUUtilization metric values measured in percent: 25, 50, 75, 80, and 10. The average CPUUtilization over the five‐minute interval is 48. Therefore, EC2 sends the CPUUtilization metric to CloudWatch with a timestamp of 13:00 and a value of 48.

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

What is regular-resolution metric?

A

The metrics generated by AWS services have a timestamp resolution of no less than one minute.

Custom metric supports high-resolution metric by calling CloudWatch API.

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

Can you delete metrics in CloudWatch?

A

No, metrics expire automatically, and when a metric expires depends on its resolution.

17
Q

How does CloudWatch organize log files?

A
  • Log Stream
  • Log Group

CloudWatch Logs stores log events from the same source in a log stream.

CloudWatch organizes log streams into log groups.

18
Q

What is CloudWatch metric?

A

CloudWatch metrics are numeric values extracted from CloudWatch log streams by metric filter. (e.g. counting the number of 404 errors from Apache logs)

Metric filters apply to entire log group.

19
Q

What is CloudWatch agent?

A

CloudWatch agent is a command-line-based program that collects logs from EC2 instances or on-premise servers.

This agent can also collect metrics that are not natively produced by EC2, such as memory utilization. Metrics generated by agent are custom metrics stored under custom namespaces.

20
Q

Why send CloudTrail logs to CloudWatch log stream?

A

Doing so allows you search and extract metrics from your trail logs.

21
Q

What are the possible actions of a CloudWatch Alarm?

A
  • Select an SNS topic
  • Auto scaling actions
  • EC2 actions
  • System Manager actions
22
Q

What are possible alarm states of a CloudWatch Alarm?

A
  • ALARM
  • OK
  • INSUFFICIENT_DATA
23
Q

What are Data Points to Alarm and Evaluation Periods?

A

Suppose you want to trigger an alarm if the data points to monitor cross the threshold for three out of five data points.

You would set the data point to 3 and the evaluation period to 5.

24
Q

What is the difference between CloudWatch Alarm and EventBridge?

A

EventBridge (formerly known as CloudWatch Events) monitors for and takes an action either based on specific events or on a schedule.

EventBridge differs from CloudWatch Alarms in that EventBridge takes some action based on specific events, not metric values.

25
Q

What are the components of EventBridge?

A
  • Event Bus
  • Rule
  • Target
26
Q

What are the major components of AWS Config?

A
  • Configuration Recorder
  • Configuration Items
  • Configuration History
  • Configuration Snapshots
  • Rules (desired configuration settings)
27
Q

What are the use cases of CloudTrail, CloudWatch, and AWS Config?

A
  • CloudTrail keeps a detailed record of activities performed on your AWS account for security and auditing purpose.
  • CloudWatch tracks performance metrics and can take some action in response to those metrics. It can also collect and consolidate logs, as well as extract metrics from them.
  • AWS Config records resource configurations and relationships past, present and future. You can look back in time to see how a resource was configured at any point. AWS Config can also compare current resource configurations against rules to ensure that you’re in compliance with whatever baseline you define.
28
Q

Does SNS use push or pull model?

A

Push.

29
Q

How does SNS work?

A
  • SNS has topics.
  • Each topic has subscribers.
  • Each subscriber has protocol and endpoint.
30
Q

How does CloudWatch expire metrics?

A
  • high resolution: 3 hours
  • 1-minute resolution: 15 days
  • 5-minute resolution: 63 days
  • 1-hour resolution: 15 months
31
Q

What is the size limit of CloudTrail logs to be sent to CloudWatch?

A

256 KB.

32
Q

Can you delete old Configuration Items in AWS Config?

A

No, the Configuration Items will expire based on settings (7 years by default).

33
Q

Can you delete old logs from Log Stream?

A

No, the old logs will expire based on retention policy on log group, or you can delete the entire log stream.

34
Q

What is the typical delay before an event appears in CloudWatch log stream?

A

15 minutes.