---
title: "Cloud - AWS - EC2 States Opspack (Deprecated)"
description: ""
url: "https://docs.itrsgroup.com/docs/opsview/6.11.7/opspacks/cloud-aws-ec2-states-opspack/index.html"
---
**Deprecation Notice**


This Opspack is deprecated and will be removed in a future release. It may not be present in your installation of
Opsview.


Amazon Web Services (AWS) provides a massive array of cloud services to users across multiple territories. The cloud services provided by AWS incorporate everything from databases, servers and now even extend into artificial intelligence.

Users are attracted to the provider’s reliability, scalability and the potential cost-effective cloud computing services of a pay-per-usage basis. The main consensus behind the cloud movement is to allow you, the user, additional free up time to focus on your applications and business.

## What You Can Monitor

Opsview Monitor has multiple Opspacks available for AWS monitoring. This Opspack checks for the status of all your AWS EC2 instances for a specific region.

## Service Checks

| Service Check       | Description                                                  |
|:--------------------|:-------------------------------------------------------------|
| EC2 Instance States | Check state of all Amazon EC2 instances in a specific region |

## Prerequisites


**Opsview Cloud**


For Opsview Cloud customers, please contact [ITRS Support](https://www.itrsgroup.com/about/contact) for assistance with these steps, as they require Orchestrator access.



There are two ways of adding your authentication credentials to the host. We recommend adding the access key and secret key directly using the variable **AWS_EC2_CREDENTIALS**.

You can also add the access key and secret key via a file. Create a temporary `aws_credentials.cfg` file with the following contents:

```
[default]
aws_access_key_id = "ACCESS_KEY"
aws_secret_access_key = "SECRET_ACCESS_KEY"
```

Then run the following command as the `opsview` user to import this file:

```
/opt/opsview/orchestrator/bin/orchestratorimportscripts etc-plugins cloud-aws /path/to/aws_credentials.cfg
```

After an Apply Changes has been run, this will be distributed to the live location on all Opsview collectors.

## Setup and Configuration

### Add the Host Template

Add the Host Template to your Opsview Host.

#### Step 2: Add and configure variables required for this host

AWS_EC2_CREDENTIALS - Set a default name for this value

- File Path - Option to override the default file path to specify another (Default: /usr/local/nagios/etc/aws_credentials.cfg)
- Access Key - Option to override the Access key from the configuration file
- Secret Key - Option to override the Secret key from the configuration file
- Region - Option to override the default region (Default: eu-west-1)

#### Step 3: Change the Host Check Command

Under Advanced options on the host tab, change Host Check Command to `Always assumed to be UP` otherwise a dependancy failure will be displayed

#### Step 4: Apply Changes and view the EC2 statistics

![Add host template](https://docscdn.itrsgroup.com/opsview/images/opspacks-cloud-aws-ec2-states-output.png)


