> For the complete documentation index, see [llms.txt](https://awsarch.adot8.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://awsarch.adot8.com/module-10.md).

# Module 10

### Cloud Watch

* Main service that will gather and deal with metrics from resources. We can also have custom data sources. Only over resources we own
* Collects and tracks metrics for AWS services across Regions in a metric repository
* Collects logs by using Amazon CloudWatch Logs
* Supports built-in AWS service metrics or custom metrics
* Calculates statistics from metrics and anddisplays graphs of the metric statistics
* Provides alarms for responsive event-driven architectures
* Provides notifications to make changes to monitored resources

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2F5vlOF2Nq3Qn59MHmdbsa%2Fimage.png?alt=media&amp;token=d0ee9388-f86a-4044-b04d-33c5cd89a7a1" alt=""><figcaption></figcaption></figure>

### CloudWatch Alarms

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FAPLygKOUfmzBjSPUzhFf%2Fimage.png?alt=media&amp;token=3769fcb3-92b8-4231-ae34-0df9686d8610" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
A notification via email or SMS can be sent with Amazon SNS
{% endhint %}

### EventBridge

* We can set up set up EventBride in a way to listen to events in AWS services and third party instances and act off it. This can be based on a schedule **OR** listening to events

{% hint style="info" %}
Example: GitHub commit triggers a Lambda function to do XYZ.

Example: Someone uploads a file to a S3 Bucket, we do sum idk

&#x20;We don't have to have full control over what it's listening to
{% endhint %}

* Processes events with an event bus or a pipe
* &#x20;Pipes are point-to-point integrations between one source and one target
* Event buses are routers that receive events and optionally delivers them to one or multiple targets.
* Makes routing decisions with configurable rules&#x20;
* Rules run based on matching an event pattern or on a schedule with Amazon EventBridge Scheduler.
* Targets can be in another AWS account, in another Region, or in both

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FCI3PnmpFBVv87hpSh4qN%2Fimage.png?alt=media&amp;token=7fe616e9-dd0f-402a-ae5e-501e551d4b66" alt=""><figcaption></figcaption></figure>

### Amazon EC3 Auto Scaling

{% embed url="<https://awsfdn.adot8.com/module-10>" %}

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FoyIoMWNYGZ66SETupxYW%2Fimage.png?alt=media&amp;token=f6be15f3-9719-4734-87c5-1770b3d3bac0" alt=""><figcaption></figcaption></figure>

* Manages a logical collection of Amazon Elastic Compute Cloud (Amazon EC2) instances called an Amazon EC2 Auto Scaling group across Availability Zones
* Launches or retires EC2 instances configured by launch templates•Resizes based on events from scaling policies, load balancer health check notifications, or schedule actions
* Integrates with Elastic Load Balancing (ELB) to send new instance registrations and receive health notifications
* Balances the number of instances across Availability Zones

#### EC2 Auto Scaling group components

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FuXccRyqi2ki4Wq02I3gg%2Fimage.png?alt=media&amp;token=3f46b366-1f09-4fa4-bfe3-8239d83c5693" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
This can be scaled up or down
{% endhint %}

#### Styles of scaling

<table><thead><tr><th width="241">Scheduled Actions</th><th>Dynamic Policies</th><th>Predictive Policy (AI)</th></tr></thead><tbody><tr><td>Scale based on a date and time</td><td>Scale based on tracked metrics</td><td>Scales based on previous traffic patterns with machine learning</td></tr><tr><td>Are for predictable workloads</td><td>Are for moderately spiky workloads</td><td>Is for workload traffic that can be predicted with a pattern</td></tr></tbody></table>

#### Other options

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FULAbHlLVlLm1xtjpuUfY%2Fimage.png?alt=media&amp;token=2dc815d9-ec4b-4c93-8826-1db7973bf890" alt=""><figcaption></figcaption></figure>

### Scaling AWS Databases

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FmfoTtOKQGCWaDPZbRzyJ%2Fimage.png?alt=media&amp;token=3d2acc39-dfc0-4dfe-ad1e-352e1455f3d8" alt=""><figcaption></figcaption></figure>

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FjcF2xIhHb2MRnwAQONRA%2Fimage.png?alt=media&amp;token=b48c4a2e-f47a-4dbf-b97f-4116ab5f51b1" alt=""><figcaption></figcaption></figure>

### Elastic Load Balancer (ELB)

{% embed url="<https://awsfdn.adot8.com/module-10#how-elastic-load-balancing-operates>" %}

* Distributes traffic across multiple targets in one or more Availability Zone
* Can receive public or private traffic
* Monitors the health of registered targets with health checks•Routes traffic to only healthy targets
* Scales based on incoming traffic

#### Load Balancer Types

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FoEwavocvyNrqqeCDTYUu%2Fimage.png?alt=media&amp;token=fd61fb32-328b-45b0-a8a3-12434634e874" alt=""><figcaption></figcaption></figure>

#### Load Balancer Components

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FiUglekkVLXc19aq8GInC%2Fimage.png?alt=media&amp;token=c4acaddc-1872-459a-b943-06ce81e76269" alt=""><figcaption></figcaption></figure>

### Route53

* Your own DNS server and can be configured in any way with records and routing
* Is a DNS web service that manages domain name registrations and provides hosted zones.
* Provides authoritative name servers for DNS resolution
* Performs DNS routing to route traffic to healthy endpoints•Performs health checks against IP addresses or domains to manage Availability Zone or Regional failovers
* Can monitor CloudWatch alarms
* Supports multiple routing options

#### Traditional DNS

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FhBKwk1YEgqgP3eUChpsd%2Fimage.png?alt=media&amp;token=57201bb7-d052-4e1b-8d78-6f8039548eda" alt=""><figcaption></figcaption></figure>

#### Route 53 DNS

<figure><img src="https://3899036363-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsmRwCapKRPjknpALqp9Y%2Fuploads%2FC95kcg3w1RGjVxA8I2OD%2Fimage.png?alt=media&amp;token=64d9abce-a551-4e50-b013-f68d56646fc6" alt=""><figcaption></figcaption></figure>
