Загрузка...

Create Alarms on #AWS #CloudWatch

Objectives:
• Get familiar with AWS CloudWatch
• Learn how to create alarms on AWS CloudWatch
• Learn how to send notifications via AWS SNS

Data:
• None
Steps:
1. Log into AWS Educate https://aws.amazon.com/education/awseducate/.
2. Find the “Cloud Computer on AWS” and then click Go to the classroom in the My Classrooms section.
3. Launch an EC2 instance
o In the EC2 dashboard, select Launch Instances
o Search website in the Community AMIs, and select website-image - ami-0705c915353273760
o In the security group, open the HTTP (80) port.
o Leave other settings as default.
o Launch the instance without a key pair.
o Open the Public DNS in your browser and capture a screenshot of the website.
4. Create alarms in CloudWatch
o Open CloudWatch dashboard
o Create a billing alarm
In the Metric Selection, select Total Estimated Charge, USD currency
In the Metric Condition, leave everything as default, set the threshold value to $1
Create a new SNS topic, use your email to receive the notification
Give the Alarm an appropriate name, and create the Alarm
Go to your email account and confirm the subscription.
o Create an EC2 usage alarm
In the Matric Selection, select EC2, Per-instance Metrics
In the search bar, type the instance ID from Step 3, and choose CUP Utilization
In the Metric Condition, leave everything as default, set the threshold value to 80%
In the action configuration, select the SNS topic created in the previous Alarm.
Give the Alarm an appropriate name, and create the Alarm
View your website of Step2 and see if you received an alarm. Capture a screenshot of the Alarm.
o Modify the EC2 Alarm
Select the EC2 Alarm; in the Action, choose Edit.
In the Metric Condition, change the period to be 1 min, and set the condition to be Lower/Equal to 80%, and click Next.
In the EC2 Action, select In Alarm, and Terminate the Instance. Update the Alarm.
Wait for a few minutes, and check the EC2 Instance dashboard

5. Delete the alarms, EC2 instance, and SNS topic
o In CloudWatch, delete the EC2 Alarm.
o You can keep the billing alarm, but keep in mind that CloudWatch is NOT free.
o In SNS, delete the SNS topic.
o Make sure your EC2 instance is terminated.

Видео Create Alarms on #AWS #CloudWatch канала LBSocial
Страницу в закладки Мои закладки
Все заметки Новая заметка Страницу в заметки

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять