Skip to content

This repository contains the test assignment solution for Enigio

Notifications You must be signed in to change notification settings

iamsthita/Enigio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Enigio Interview Assignment: AWS CloudWatch Monitoring Setup

Task:

In AWS, there is a possibility of setting up Dashboards, Metrics, and alarms using the CloudWatch Service. In this task, we would like to set up infrastructure in AWS using a CloudFormation script. The infrastructure that is to be created should follow these requirements.

  • A simple EC2 instance that can be accessed and monitored by CloudWatch.
  • A dashboard that can present statistics of at least these predefined metrics:
    • CPU Utilization in %
    • Check the status of the instance (StatusCheckFailed_System)
    • Check the overall status of the System (StatusCheckFailed)
    • Credit Usage of the EC2
  • Optional: Alarm to monitor CPU utilization percentage reaching critical levels.

Proper security groups, security, load balancing, and other infrastructure are not part of this task. The focus is solely on the monitoring capabilities in CloudWatch using an EC2 as the main target to be monitored.

Solution:

Architecture Diagram

This repository contains a CloudFormation script (EnigioCloudWatchSetup.yaml) to set up monitoring capabilities in AWS CloudWatch for an EC2 instance. The infrastructure created includes:

  • An EC2 instance for monitoring.
  • A CloudWatch alarm to monitor CPU utilization and send notifications if it exceeds 80%.
  • A CloudWatch dashboard to visualize EC2 instance metrics, including CPU utilization, status check failures, and CPU credit balance.

Prerequisites

Before deploying the CloudFormation stack, ensure you have:

  1. Installed the AWS CLI.
  2. Configured your AWS credentials using aws configure.

Deployment

To deploy the CloudFormation stack, run the following command:

aws cloudformation create-stack --stack-name Enigio --template-body file://C:/Jena/Interview/Enigio/EnigioCloudWatchSetup.yaml

Contents

  • EnigioCloudWatchSetup.yaml: CloudFormation script to set up the infrastructure.
  • README.md (this file): Instructions and overview of the solution.

Resources Created

image

Monitoring Setup Details

EC2 Instance

  • Type: t2.micro.
  • Monitoring enabled.

CloudWatch Alarm

  • Monitors CPU utilization.
  • Alarm triggered if CPU utilization exceeds 80%.
  • Notifications sent via Amazon SNS to the specified email address.
image

CloudWatch Dashboard

  • Visualizes the following metrics:
    • CPU Utilization (%)
    • Status Check Failed (System)
    • Status Check Failed
    • CPU Credit Balance
image

Outputs

After deployment, you can access the CloudWatch dashboard using the provided URL in the CloudFormation stack outputs. image

About

This repository contains the test assignment solution for Enigio

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published