Install CloudWatch Agent Bucket

Install CloudWatch Agent

  1. Open EC2 Dashboard CloudWatchIntro

  2. In the left navigation bar, select Instances then select the EC2 virtual machine created in the previous step.

CloudWatchIntro

  1. Use browser-based SSH connection tool to connect to EC2 virtual machine

CloudWatchIntro

  1. Download package Amazon CloudWatch Agent
wget https://s3.amazonaws.com/amazoncloudwatch-agent/linux/amd64/latest/AmazonCloudWatchAgent.zip

CloudWatchIntro

  1. Unzip and install the downloaded Amazon CloudWatch package
unzip AmazonCloudWatchAgent.zip
sudo ./install.sh

CloudWatchIntro

  1. Configure AmazonCloudWatchAgent
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-config-wizard

CloudWatchIntro

Configure with options as shown below:

InstallCloudWatchAgent

  1. Start CloudWatch Agent
sudo /opt/aws/amazon-cloudwatch-agent/bin/amazon-cloudwatch-agent-ctl -a fetch-config -m ec2 -c file:/opt/aws/amazon-cloudwatch-agent/bin/config.json - S

CloudWatchIntro

  1. Wait about 5 minutes for the stats to become available. Then go back to the Amazon CloudWatch console, select Metrics and select CWAgent

CloudWatchIntro

  1. Select ImageID, InstanceID, Instance Type

CloudWatchIntro

  1. Select EC2 virtual machine Now that the CloudWatch agent has been successfully installed, Amazon CloudWatch can monitor the memory usage of the map instance on Amazon CloudWatch

CloudWatchIntro