---
title: "AWS CloudWatch Configuration Guide: Getting Started"
description: We’ve put together a seven-part AWS CloudWatch Configuration Guide on how to take advantage of all the advanced features—without the tears of frustration.
image: https://www.bluematador.com/hubfs/blog/new/BM-Article-AWS-CloudWatch-101.jpg
---

# AWS CloudWatch Configuration Guide: Getting Started

 By [Blue Matador](https://www.bluematador.com/blog/author/blue-matador) on October 10, 2018

If you remember getting an Erector Set as a kid, I’m sorry. In a stocking full of toy building systems, an Erector Set is the proverbial lump of coal. The instructions are complicated, and the pieces are made of metal, connected together with tiny screws. Few children have *ever* completed one of these sets successfully.

![aws cloudwatch](https://www.bluematador.com/hs-fs/hubfs/aws-cloudwatch.jpg?width=750&name=aws-cloudwatch.jpg)

Rare, completed Erector Set found in the wild by Gaius Cornelius - [Own work](https://commons.wikimedia.org/w/index.php?curid=33133478), CC BY-SA 3.0

See, the AWS marketing team would have you believe that CloudWatch is the LEGO of monitoring and management services. Unfortunately, it’s more like that holdover from the 1950s. To that end we’ve put together a *seven-part* AWS CloudWatch Configuration Guide on how to take advantage of all the advanced features—without the tears of frustration.

This first section will cover how to [access CloudWatch](https://www.bluematador.com/blog/aws-cloudwatch-getting-started#access) and [enable detailed monitoring](https://www.bluematador.com/blog/aws-cloudwatch-getting-started#detail). (If you need to review the basics, we recommend that you check out our [CloudWatch 101](https://www.bluematador.com/blog/aws-cloudwatch-101) post.)

## Accessing CloudWatch

CloudWatch gives you four different ways to access your metrics and logs: Amazon CloudWatch console, [AWS command line interface (AWS CLI)](https://www.bluematador.com/blog/aws-cloudwatch-getting-started#cli), [CloudWatch API](https://www.bluematador.com/blog/aws-cloudwatch-getting-started#api), and [AWS SDK](https://www.bluematador.com/blog/aws-cloudwatch-getting-started#sdk).

### Amazon CloudWatch Console

The **Amazon CloudWatch console** is a GUI that’s designed to make CloudWatch accessible for non-technical users. It’s pretty straightforward so not much to say here. You just login using your credentials, and BAM!, you're in.

### AWS Command Line Interface (AWS CLI)

**AWS CLI** supports Windows, Linux, macOS, and Unix. AWS recommends periodically checking the [AWS CLI Github repository](https://github.com/aws/aws-cli/releases) to upgrade to the latest version.

#### AWS CLI Installation Requirements

- [Python 3 version 3.3+](https://www.bluematador.com/blog/aws-cloudwatch-getting-started#python-linux): Technically, AWS CLI supports Python 2 version 2.6.5+, but the Python project has been split since 2007, and Python 2 will probably be deprecated in a year or so.
- *pip *(*pip* installs packages), package manager

#### Supported Operating Systems

- Windows, Linux, macOS, or Unix

#### AWS CLI Installation Guides

[AWS CLI Installation (w/ *pip*) for Linux](https://www.bluematador.com/blog/aws-cloudwatch-getting-started#pip)

[AWS CLI Bundled Installer for Linux, Unix, macOS](https://www.bluematador.com/blog/aws-cloudwatch-getting-started#bundle-linux)

[AWS CLI Standalone Installation for Windows](https://www.bluematador.com/blog/aws-cloudwatch-getting-started#windows-alone)

[AWS CLI Installation (with Python, *pip*) on Windows](https://www.bluematador.com/blog/aws-cloudwatch-getting-started#python-windows)

[AWS CLI Installation on macOS](https://www.bluematador.com/blog/aws-cloudwatch-getting-started#cli-mac)

#### Python Installation for Linux/Unix

Start by checking to see if you already have a compatible version of Python:.

```
$ python -V
```

If you have python installed, you see a response that looks like this:

```
Python 3.6.0b2+
```

If you don’t have Python installed, you’ll see an error that will look something like this:

```
Traceback (most recent call last):  File "<stdin>", line 1, in <module> NameError: name 'python' is not defined
```

Below are the commands to install Python for various flavors of Unix/Linux.

Python Installation for Ubuntu:

```
$ sudo apt-get install python3
```

Python Installation for Red Hat:

```
$< sudo yum install python
```

Python Installation for SUSE:

```
$ sudo zypper install python3
```

#### *pip* Installation for Linux/Unix

In addition to Python, you’ll need to have *pip* to install

```
$ pip --version
```

Once you have a supported version of Python installed, you can use *pip *to install AWS CLI.

Here’s how to install Python for Red Hat:

```
'python' is not recognized as an internal or external command, operable program or batch file.
```

#### AWS CLI Installation (w/ *pip*) for Linux

```
pip install awscli --upgrade --user
```

Verify that the AWS CLI installed correctly.

```
$ aws --version
```

You should get a response that looks something like this:

```
aws-cli/1.11.84 Python/3.6.2 Linux/4.4.0-59-generic botocore/1.5.47
```

If you get an error, see [Troubleshooting AWS CLI Errors](https://docs.aws.amazon.com/cli/latest/userguide/troubleshooting.html).

To upgrade to the latest version, run the installation command again:

```
$ pip install awscli --upgrade --user
```

#### AWS CLI Bundled Installer for Linux, Unix, macOS

With a supported version of Python installed, you can download the [Bundled Installer](https://s3.amazonaws.com/aws-cli/awscli-bundle.zip) here or download it in the command line:

```
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
```

Next, you’ll want to unzip the downloaded package.

```
$ unzip awscli-bundle.zip
```

Finally, execute the installation script with the following command to install AWS CLI on your machine.

```
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
```

#### AWS CLI Standalone Installation for Windows

You can install AWS CLI for Windows in three easy steps. AWS CLI supports Microsoft Windows XP or later.

1. Download the MSI installer([32-bit](https://s3.amazonaws.com/aws-cli/AWSCLI32.msi),[64-bit](https://s3.amazonaws.com/aws-cli/AWSCLI64.msi)). If you aren’t sure whether your version of Windows is 32-bit or 64-bit, you can download this [AWS setup file](https://s3.amazonaws.com/aws-cli/AWSCLISetup.exe) and it will automatically install the right program for you.
2. Run the MSI installer program.
3. The program’s wizard will walk you through the installation process.

#### AWS CLI Installation (with Python, *pip*) on Windows

1. Download the [Python 3.6 Windows x86-64 executable installer](https://www.python.org/ftp/python/3.6.6/python-3.6.6-amd64.exe) from the [downloads page](https://www.python.org/downloads/release/python-362/).
2. Run the executable installer.
3. When prompted, choose **Add Python 3.6 to PATH**.
4. Click **Install Now**.
5. From the Windows Start menu, type “cmd” into the search field to open the Windows Command Processor. It’s a black window with a text prompt.
6. Verify that you have Python and pip installed with the following commands:

```
C:\Windows\System32> python --version Python 3.6.2C:\Windows\System32> pip --versionpip 9.0.1 from c:\users\myname\appdata\local\programs\python\python36\lib\site-packages (python 3.6)
```

1. Install the AWS CLI using *pip*: `C:\Windows\System32> pip install awscli`
2. Check to make sure that you installed AWS CLI properly. `C:\Windows\System32> aws --version aws-cli/1.11.84 Python/3.6.2 Windows/7 botocore/1.5.47`
3. (For Troubleshooting) If the *aws* command doesn’t work, you’ll need to manually add it to your operating system’s PATH variable:

You can use the command below to update your copy of AWS CLI.

```
C:\Windows\System32> pip install --user --upgrade awscli
```

Bookmark this page or save this command for future reference.

#### AWS CLI Installation on macOS

With a supported version of Python installed, you can download the [AWS CLI Bundled Installer](https://s3.amazonaws.com/aws-cli/awscli-bundle.zip) or download it in the command line:

```
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
```

Extract the installation guide:

```
$ unzip awscli-bundle.zip
```

Install AWS CLI on your Mac with the following command:

```
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
```

### CloudWatch API

**CloudWatch API** — For more information, see the [Amazon CloudWatch API Reference](http://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/Welcome.html).

### Getting Started with AWS SDKs

The process to setup a AWS SDK follows the same pattern regardless of the environment language: download the SDK, create and access credentials, and run the sample project.

#### Project Resources

Java SDK ([git](https://github.com/awslabs/aws-java-sample.git), [zip](https://sdk-for-java.amazonwebservices.com/latest/aws-java-sdk.zip))

.NET SDK  ([install](http://sdk-for-net.amazonwebservices.com/latest/AWSToolsAndSDKForNet.msi), [setup](https://aws.amazon.com/developers/getting-started/net/))

Node.js SDK  ([setup](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/getting-started-nodejs.html))

PHP SDK ([required](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_requirements.html), [setup](https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/getting-started_installation.html))

Browser SDK ([git](https://github.com/aws/aws-sdk-js#aws-sdk-for-javascript), [sample](https://aws.amazon.com/developers/getting-started/browser/))

Python SDK ([setup](https://github.com/boto/boto3#quick-start))

Go SDK ([setup](https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/welcome.html))

Ruby SDK ([setup](https://docs.aws.amazon.com/sdk-for-ruby/v3/developer-guide/setup-install.html))

C++ SDK ([git](https://github.com/aws/aws-sdk-cpp))

#### Create and Access AWS SDK Security Credentials

1. Open the [IAM console](https://console.aws.amazon.com/iam/home).
2. Click **Users **in the navigation menu.
3. Select your IAM user name. (Note: Don’t click the checkbox. That won’t work.)
4. Select the **Security credentials** tab.
5. Click on **Create access key**.
6. Click **Show **to see your security credential key pair.
7. Click **Download .csv file **to download the key pair.

Your credentials will be formatted like the example key pair below:

```
Access key ID: AKIAIOSFODNN7EXAMPLESecret access key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
```

For additional documentation, see [Tools for Amazon Web Services](https://aws.amazon.com/tools#sdk). There’s also a number of other [AWS developer tools](https://aws.amazon.com/products/developer-tools/) worth investigating.

## Enable Detailed Monitoring

Let’s forgo a closer look at the free tier and just say that it’s not good enough for anything but personal projects. In order to take full advantage of CloudWatch—including things like monitoring memory or finer granularity on metrics—you’ll need to enable detailed monitoring.

If you are curious about pricing, you can use the [pricing calculator](https://aws.amazon.com/calculator/) on the AWS website.  

CloudWatch gives you the flexibility to enable detailed monitoring on an instance at deployment or after the instance is already running. You can enable detailed monitoring on a stopped instance, too.

### Concurrent Deployment in the Console

Enabling detailed monitoring for an instance at deployment is as easy as selecting the **Monitoring** check box on the **Configure Instance Details** page.

### Concurrent Deployment Using AWS CLI

[run-instances](http://docs.aws.amazon.com/cli/latest/reference/ec2/run-instances.html) with the --monitoring flag enables detailed monitoring in the command line.

```
aws ec2 run-instances --image-id ami-09092360 --monitoring Enabled=true...
```

### Enable Existing Instance in the Console

1. Open the Amazon EC2 console.
2. In the navigation pane, choose **Instances**.
3. Select the instance, choose **Actions**, **CloudWatch Monitoring**, **Enable Detailed Monitoring**.
4. In the **Enable Detailed Monitoring** dialog box, choose **Yes, Enable**.
5. Choose **Close**.

### Enable Existing Instance Using AWS CLI

[monitor-instances](http://docs.aws.amazon.com/cli/latest/reference/ec2/monitor-instances.html) enables detailed monitoring for the specified instance(s) in the command line.

```
aws ec2 monitor-instances --instance-ids i-1234567890abcdef0
```

We didn't cover how to disable detailed monitoring, but you can read about that [here](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-cloudwatch-new.html#disable-detailed-monitoring).

### What to Read Next

### Subscribe to get blog updates in your inbox.

**Full coverage monitoring of AWS  
**Proactive, automated alerts

[![START FREE TRIAL](https://hubspot-no-cache-na2-prod.s3.amazonaws.com/cta/default/3917309/d02ccf41-b876-4856-b1aa-2121845ea2f6.png)](https://hubspot-cta-redirect-na2-prod.s3.amazonaws.com/cta/redirect/3917309/d02ccf41-b876-4856-b1aa-2121845ea2f6)

**MONITORING**<https://www.bluematador.com/aws-monitoring>

[AWS monitoring](https://www.bluematador.com/aws-monitoring)  
<https://www.bluematador.com/kubernetes-monitoring>

[Kubernetes monitoring](https://www.bluematador.com/kubernetes-monitoring)

[Serverless monitoring](https://www.bluematador.com/serverless)

[Azure monitoring](https://www.bluematador.com/azure-monitoring)

[Windows / Linux monitoring](https://www.bluematador.com/server-monitoring)

**WHY BLUE MATADOR**

[Pricing](https://www.bluematador.com/pricing)  
[How it works](https://www.bluematador.com/how-it-works)  
[Competitors](https://www.bluematador.com/l/blue-matador-vs-competitors)  
[Customers](https://www.bluematador.com/customers)

**RESOURCES**

[Blog](https://www.bluematador.com/blog)  
[eBooks](https://www.bluematador.com/ebooks)  
       [Kubernetes ](https://www.bluematador.com/ebook/kubernetes-for-startups)  
       [Cloudwatch](https://www.bluematador.com/ebook/amazon-cloudwatch-monitoring-guide)  
[Docs](https://www.bluematador.com/docs)  
[Integrations](https://www.bluematador.com/integrations)  
[Developers](https://developers.bluematador.com/)  
<https://www.bluematador.com>

**COMPANY**

[Contact](https://www.bluematador.com/contact)

[**SUPPORT**](https://help.bluematador.com)

![bluematador-logo-horizontal-reversed-white-footer](https://www.bluematador.com/hubfs/2020/footer/bluematador-logo-horizontal-reversed-white-footer.svg "bluematador-logo-horizontal-reversed-white-footer")

[![START FREE](https://hubspot-no-cache-na2-prod.s3.amazonaws.com/cta/default/3917309/ccdd6e2d-6352-4c30-9f68-d22b43975967.png)](https://hubspot-cta-redirect-na2-prod.s3.amazonaws.com/cta/redirect/3917309/ccdd6e2d-6352-4c30-9f68-d22b43975967)

[![REQUEST DEMO](https://hubspot-no-cache-na2-prod.s3.amazonaws.com/cta/default/3917309/045e18fc-dcbc-4e62-aef2-abe3df55b6d6.png)](https://hubspot-cta-redirect-na2-prod.s3.amazonaws.com/cta/redirect/3917309/045e18fc-dcbc-4e62-aef2-abe3df55b6d6)

©  Blue Matador, Inc. All Rights Reserved.[Terms & Conditions](https://www.bluematador.com/terms-and-conditions)[Privacy Policy](https://www.bluematador.com/privacy-policy)

[![BM-Facebook](https://www.bluematador.com/hubfs/2020/footer/bm-facebook-logo.svg)](https://www.facebook.com/bluematadorinc/) [![BM-LinkedIn](https://www.bluematador.com/hubfs/2020/footer/bm-linkedin-logo.svg)](https://www.linkedin.com/company/blue-matador-inc) [![BM-Twitter](https://www.bluematador.com/hubfs/2020/footer/bm-twitter-logo.svg)](https://twitter.com/bluematadorinc) [![BM-YouTube](https://www.bluematador.com/hubfs/2020/footer/bm-youtube-logo.svg)](https://www.youtube.com/channel/UCjy2_6-CjS6E-0kz_LYNzLg)

Please enable JavaScript to view the [comments powered by Disqus.](https://disqus.com/?ref_noscript)