# AWS provider

The **AWS provider** collects price metrics for Amazon Elastic Compute Cloud (EC2) from Amazon’s own APIs.

This provider imports just one metric`aws_ec2_price` which is available in the EC2 component type of the [AWS Optimization pack](https://docs.akamas.io/akamas-docs/3.6/reference/optimization-packs/aws-pack).

## Prerequisites <a href="#prerequisites" id="prerequisites"></a>

This section provides the minimum requirements that you should match before using the AWS telemetry provider.

{% hint style="info" %}
This telemetry provider makes use of parameters `aws_ec2_instance_type` and`aws_ec2_instance_size` to identify the price. When using this provider make sure that your system has a component of type EC2 and that those parameters are defined in the baseline and, if optimized, in the parameters selection.
{% endhint %}

### AWS users and policy requirements <a href="#aws-users-and-policies-requirements" id="aws-users-and-policies-requirements"></a>

* An [IAM user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html) who has been granted the `AWSPriceListServiceFullAccess` policy, that is the following permissions:
  * `DescribeServices`
  * `GetAttributeValues`
  * `GetProducts`

You may find more information on AWS cost permissions [here](https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/billing-permissions-ref.html).

## Akamas supported version <a href="#akamas-supported-version" id="akamas-supported-version"></a>

* Versions >= 2.0.0 are compatible with Akamas from version 1.9.0

## Supported component types <a href="#supported-component-types" id="supported-component-types"></a>

* EC2

## Components configuration

In order to gather price information about a component you’re required to input an extra field in its definition:

* `region`, which tells the provider the AWS region of the modeled instance

Please note this field is mandatory and must be specified as follows:

```yaml
# Specification for a component, whose metrics should be collected by the AWS Provider
name: aws_1 # name of the component
description: aws_1 instance to tune # description of the component
properties:
    ec2:
        region: us-east-1 # AWS region of the component
```

Here is a complete list of AWS region names, together with their Akamas-compatible codes:

| Region Name                | Region         |
| -------------------------- | -------------- |
| US East (Ohio)             | us-east-2      |
| US East (N. Virginia)      | us-east-1      |
| US West (N. California)    | us-west-1      |
| US West (Oregon)           | us-west-2      |
| Africa (Cape Town)         | af-south-1     |
| Asia Pacific (Hong Kong)   | ap-east-1      |
| Asia Pacific (Mumbai)      | ap-south-1     |
| Asia Pacific (Osaka-Local) | ap-northeast-3 |
| Asia Pacific (Seoul)       | ap-northeast-2 |
| Asia Pacific (Singapore)   | ap-southeast-1 |
| Asia Pacific (Sydney)      | ap-southeast-2 |
| Asia Pacific (Tokyo)       | ap-northeast-1 |
| Canada (Central)           | ca-central-1   |
| China (Beijing)            | cn-north-1     |
| China (Ningxia)            | cn-northwest-1 |
| Europe (Frankfurt)         | eu-central-1   |
| Europe (Ireland)           | eu-west-1      |
| Europe (London)            | eu-west-2      |
| Europe (Milan)             | eu-south-1     |
| Europe (Paris)             | eu-west-3      |
| Europe (Stockholm)         | eu-north-1     |
| Middle East (Bahrain)      | me-south-1     |
| South America (São Paulo)  | sa-east-1      |
| AWS GovCloud (US-East)     | us-gov-east-1  |
| AWS GovCloud (US)          | us-gov-west-1  |
