Module 7 - Monitoring and Scaling Flashcards

1
Q

What are some options for monitoring on AWS?

A

CloudTrail
CloudWatch
EventBridge

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

Why do you need to monitor?

A

Operational Health
Application performance
Resource utilization
Security auditing

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

What is CloudWatch?

A

A service that provides a near real-time stream of system events. Sends notifications or automatically makes changes to the resources you are monitoring based on rules that you define. Also works for on-prem servers. It’s a metrics repository.

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

What statistic types does CloudWatch offer?

A

minimum, maximum, sum, average, count, and percentile.

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

What do CloudWatch alarms do?

A

Alarms can be configured to trigger actions to stop, start, or terminate a service when certain criteria are met.

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

What types of logs are there?

A

CloudTrail - user activity, API usage. who did what and when

CloudWatch logs - apps, log files from EC2, CloudTrail, Route53.

VPC FLow logs - IP traffic to/from network interfaces in the VPC

Custom

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

What is a log stream?

A

a sequence of log events that share the same source. Each separate source of logs in CloudWatch Logs makes up a separate log stream.

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

What is a log group?

A

a group of log streams that share the same retention, monitoring, and access control settings. You can define log groups and specify which streams to put into each group

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

What is a metric filter?

A

A way to search for and match terms, phrases, or values in your log events. When a metric filter finds one of the terms, phrases, or values in your log events, you can increment the value of a CloudWatch metric

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

Where are CloudTrail logs stored?

A

S3 bucket.

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

Where can you see the VPC Flow logs?

A

Amazon EC2 and Amazon VPC consoles.

Logs are stored in S3 bucket or CloudWatch log groups.

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

What triggers do VPC Flow logs offer?

A

You can create alarms that will fire if certain types of traffic are detected, and metrics to help you to identify trends and patterns

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

What logging is NOT captured in VPC FLow logs?

A

VPC logging does not include:

• DNS traffic
•DHCP traffic
• Windows license activation traffic
• traffic to and from the instance metadata address
(169.254.169.254)
•Traffic to/from the reserved IP address of the default VPC router

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

What entities can you create a VPC FLow log for?

A

You can create a flow log for a VPC, a subnet, or an elastic network interface.

If you create a flow log for a subnet or VPC, each network interface in the VPC or subnet is monitored.

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

Where can you publish VPC FLow logs?

A

You can publish flow log data to a log group in CloudWatch Logs. OR to S3 bucket in log file objects.

You can’t edit the configuration of a log after you create it, you can only delete it.

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

What happens if the same network interface is present in one or more flow logs in the same log group?

A

it will have one combined log stream

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

How does VPC Flow Logs publish to S3?

A

In 5 minute intervals. If a file is over 75MB it stops adding logs to the file, publishes to S3, then creates a new file.

18
Q

What does the user creating the flow logs need to have?

A

They must either own the bucket or have GetBucketPolicy and PutBucketPolicy permissions.

19
Q

What is CloudWatch?

A

A metrics alarm. Whenever the metric reaches some threshold, an action occurs (EC2 action, autoscaling, or notification to a topic).

20
Q

What are the 3 alarm states?`

A
  • OK: The metric is within the defined threshold.
  • ALARM: The metric is outside the defined threshold.
  • INSUFFICIENT_DATA: The alarm has started, the metric is not available, or not enough data is available for the metric to determine the alarm state.
21
Q

What is a namespace in CloudWatch?

A

A container for metrics. You specify the namespace when you create metrics so you keep your applications separate.
Naming convention: AWS/

22
Q

What is a CloudWatch metric?

A

A metric represents a time-ordered set of data points that are published to CloudWatch. Always associated with a timestamp.

23
Q

What is a dimension in CloudWatch?

A

A dimension is a name-value pair that uniquely identifies a metric (up to 10 per metric).

24
Q

What are valid time periods in a CloudWatch statistic?

A

Valid values for a period are 1, 5, 10, 30, or any multiple of 60.

25
Q

What is CloudWatch Events?

A

A service that delivers a near-real-time stream of system events that describe changes in AWS resources. This is where you set up rules to match events to functions or streams.

26
Q

What things can CloudWatch Events do to respond to changes in resources?

A
  • Send messages to respond to the environment
  • Activate functions
  • Make changes
  • Capture state information
27
Q

What is EventBridge?

A

A serverless event bus service that extends CloudWatch Events, built on top of it. It reacts to events generated by other AWS services and has additional capabilities. Eventually, it will absorb CloudWatch Events.

28
Q

What are some examples of event sources and targets used by EventBridge?

A

Sources: AWS services, custom applications, SaaS applications (e.g. Zendesk, Datadog, or PagerDuty)

Targets: Lambda, Amazon SNS, Step Functions

29
Q

What are the advantages of linking your partner event source (like DataDog) to EventBridge? Of EventBridge in general?

A

Provides a logical connection between the Partner’s system and your AWS account without the need for provisioning and managing cross-account IAM roles or credentials.

You don’t have to write point-to-point integrations. Decouples event publishers from event subscribers.

Serverless so there is nothing to manage.

30
Q

What are the 2 types of Auto Scaling?

What are the features of EC2 Auto Scaling?

A

AWS Auto Scaling - application scaling for multiple resources such as Amazon EC2, DynamoDB, Aurora, etc.

Amazon EC2 Auto Scaling - helps you ensure that you have the correct number of EC2 instances available to handle the load for your application
• Elasticity & Scalability
• Responds to CloudWatch metrics, health checks
• Can scale based on performance or a schedule

31
Q

What do you need to set up EC2 Auto Scaling?

A

1) LAUNCH TEMPLATE or Launch Config (smaller version of template, so just stick with templates)
• AMI ID, Instance type, security group, roles

2) Set up ASG (auto-scaling group)
• Define purchase options (spot? on-demand?)
• Define a VPC (always 1), subnets,
• Optional load balancer
• health checks (EC2 & ELB)
• define min/max capacity, desired capacity

3) Set up Auto Scaling policy
• scheduled
• dynamic
• predictive

32
Q

What are the different types of EC2 instances to use with auto-scaling? How do you define those?

A

Spot - fault-tolerant, flexible, stateless workloads
On-demand - spiky workloads
Reserved - committed, steady usage

Use Amazon EC2 Fleet to define your instances (what % of each type).

33
Q

I have an application that runs on 2 instances with unpredictable traffic patterns. I want CPU utilization to stay around 75%. What scaling strategy should I use?

A

Dynamic.

34
Q

What service can invoke actions based on data from account resources or third-party management services?

A

EventBridge.

35
Q

What is a typical use of CloudTrail data?

A

Store log data as a record of account usage.

Capture root login failures.

36
Q

Do the VPC Flow Logs contain hostnames or IP addresses for source and destination hosts?

A

IP addresses (IPv4 and IPv6).

37
Q

Can VPC flow logs be tagged?

A

No.

38
Q

Can you enable flow logs for VPC that are peered with my VPC?

A

No, unless it is in the same AWS account.

39
Q

What EC2 metrics can CloudWatch monitor?

A

CPU, NU, DP, DR

CPU utilization
Network utilization
Disk performance
Disk Reads/Writes.

In case you need to monitor the below items, you need to prepare a custom metric using a Perl or other shell script, as there are NO ready to use metrics for:

Memory utilization
Disk swap utilization
Disk space utilization
Page file utilization
Log collection
40
Q

What is a multi-platform CloudWatch agent?

A

You can use a single agent to collect both system metrics and log files from Amazon EC2 instances and on-premises servers. This agent supports both Windows Server and Linux and enables you to select the metrics to be collected, including sub-resource metrics such as per-CPU core.