> For the complete documentation index, see [llms.txt](https://docs.tessell.com/tessell/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tessell.com/tessell/faq/cloud-platforms/aws.md).

# AWS

Common questions about running Tessell-managed databases on Amazon Web Services infrastructure.

**Sub-sections:** [FSx for NetApp ONTAP](/tessell/faq/cloud-platforms/aws/fsx-for-netapp-ontap.md)

***

### Q: How does Tessell provide services to databases running on AWS infrastructure?

**A:** Tessell leverages **Amazon EC2** and **Amazon EBS** for the core data infrastructure on AWS. Two compute shape families are supported:

| Compute type         | AWS instance families     | Storage                                 |
| -------------------- | ------------------------- | --------------------------------------- |
| **High-performance** | `i4i`, `i3en` series      | NVMe local SSDs — unparalleled IOPS     |
| **Standard**         | General-purpose instances | Amazon EBS `gp3` or Ultra `io2` volumes |

Additional infrastructure details:

* You can attach an **Amazon VPC of your choice** to the database VM — either a public or private VPC.
* The **Tessell Availability Machine** protects database data through regular snapshots and transaction log backups, stored using **Amazon EBS Snapshots** and **Amazon S3**.

***

### Q: Is Tessell certified by AWS?

**A:** Yes. Tessell is an **AWS-preferred solution** listed in the [AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-h2caqujt4pp3q) and AWS has certified Tessell DBaaS for Oracle. Additionally:

| Status                     | Details                                                        |
| -------------------------- | -------------------------------------------------------------- |
| **AWS-preferred solution** | Listed in the AWS Marketplace                                  |
| **Co-sell ready**          | AWS sales teams can jointly sell Tessell with AWS services     |
| **AWS ISV-A partner**      | Part of the AWS Independent Software Vendor Accelerate program |

***

### Q: What High Availability and Disaster Recovery options does Tessell support on AWS?

**A:** Tessell supports **Multi-AZ deployments** on AWS. When enabled, Tessell creates a standby database instance in a different AWS Availability Zone. Key behaviours:

* The standby instance is maintained through synchronous replication (Oracle Data Guard for Oracle; native streaming replication for PostgreSQL).
* In the event of a primary instance failure, the standby is **automatically promoted** to primary with no manual intervention required.
* A database proxy provides **transparent connection failover** so applications reconnect without requiring code changes.

For cross-region DR, Tessell replicates snapshots and transaction logs to a second AWS region, with global IP failover to redirect traffic automatically if an entire region becomes unavailable.

> See also: [What are the typical RPO and RTO numbers for Oracle on Tessell?](/tessell/faq/engines/oracle.md#q-what-are-typical-rpo-and-rto-numbers-for-oracle-on-tessell)

***

### Q: How do I automate the gathering of EC2 instance metrics?

**A:** Tessell provides an automation that collects **Amazon CloudWatch metrics for EC2 instances** so you can assess your database workloads. The collected metrics are used to provide placement guidance for right-sizing purposes.

**Pre-requisites**

The following are required to run this automation:

* python3
* boto3
* numpy
* argparse
* AWS access keys with read-only CloudWatch permission and EC2 permissions

**Installation**

To install the dependent packages and automation, run:

```bash
pip install boto3 numpy argparse
```

For the AWS CLI, installation instructions can be found [here](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html).

**Deploy code**

Copy the files `ec2-data-collection.sh` and `ec2-data-collection.py` to a location where you plan to execute the automation and make the files executable:

```bash
chmod a+x ec2-data-collection.sh
chmod a+x ec2-data-collection.py
```

**Set up AWS credentials**

Configure AWS credentials in the host environment where you run this code. You can get AWS programmatic access from the AWS Console.

```bash
shell> aws configure

AWS Access Key ID : [****************]
AWS Secret Access Key : [****************]
Default region name : us-east-1
Default output format : None
```

**Prepare the source database list**

Create a text file named `instances_list.txt` with the list of EC2 instance identifier name(s) separated by a new line. You can get the EC2 instance ID names from the AWS console or CLI. The instance IDs should be formatted as follows: `i-123456789`.

You can specify **n** number of EC2 instances in the text file, but ensure that they run in the same region. If the instances are in different regions, you need to gather the information separately.

**Example usage**

Run the automation with the number of days to be analyzed along with the CloudWatch metric sampling interval. This will take a few minutes depending upon the number of DB instances to be analyzed.

```bash
python3 ec2-data-collection.py --file instances_list.txt --output ec2_metrics.json --region us-east-1 --days 7 --period 600

ec2-data-collection.sh -f instances_list.txt -o ec2_metrics.json -r ap-south-1 -d 7 -p 600
```

> **NOTE:** It is recommended to run this script for *7 days and a period of 600*.
>
> **NOTE:** This script will need to be run for *each region* and *each account* where there are EC2 instances that need metrics gathered.

***

### Q: How do I automate the gathering of RDS/Aurora metrics?

**A:** Tessell provides an automation that collects **RDS/Aurora CloudWatch metrics** for assessing your database workloads. The collected metrics can be used to provide placement guidance for right-sizing purposes. You can run this automation either from an EC2 instance or an AWS CloudShell environment.

**Preparing the environment — using AWS CloudShell**

* AWS CloudShell is a browser-based shell that gives you command-line access to your AWS resources in the selected AWS Region. AWS CloudShell comes pre-installed with popular tools for resource management and creation.
* Tessell recommends using AWS CloudShell as this has all of the pre-requisites and authentication preloaded. Using CloudShell will avoid many of the steps in this document. To use CloudShell you will need access to the AWS console. You can learn more here: <https://aws.amazon.com/cloudshell/>
* Launch CloudShell from the AWS console.
* Copy the automation code into the CloudShell terminal using the upload file option: **CloudShell > Actions > Upload file**.
* Make it an executable file:

```bash
shell> chmod a+x tessell_fetch_rds_aurora_metrics.sh
```

* Verify the automation code:

```bash
shell> bash tessell_fetch_rds_aurora_metrics.sh -h
```

You can now go to the steps for executing the automation.

**Preparing the environment — using an AWS EC2 instance**

Pre-requisites — the following are required to run this automation:

* getopt
* aws cli
* zip
* AWS access keys with read-only CloudWatch permission

Installation of `getopt`:

| OS            | Install getopt               |
| ------------- | ---------------------------- |
| Debian/Ubuntu | `apt-get install util-linux` |
| CentOS/RedHat | `yum install gnu-getopt`     |
| MacOS         | `brew install gnu-getopt`    |

For the AWS CLI, installation instructions can be found [here](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html).

Installation of `zip`:

| OS            | Install zip           |
| ------------- | --------------------- |
| Debian/Ubuntu | `apt-get install zip` |
| CentOS/RedHat | `yum install zip`     |

Deploy the code — copy the file `tessell_fetch_rds_aurora_metrics.sh` to a location where you plan to execute the automation and make the file executable:

```bash
shell> chmod a+x tessell_fetch_rds_aurora_metrics.sh
```

Verify the installation of the dependent packages and the automation code:

```bash
shell> which getopt
shell> which aws
shell> which zip
shell> bash tessell_fetch_rds_aurora_metrics.sh -h
```

Set up AWS credentials in the host environment where you run this code. You can get AWS programmatic access from the AWS Console.

```bash
shell> aws configure

AWS Access Key ID : [****************]
AWS Secret Access Key : [****************]
Default region name : us-east-1
Default output format : None
```

**Prepare the source database list**

Create a text file with the list of RDS/Aurora database identifier name(s) separated by a new line. You can get the DB identifier name from the AWS RDS console.

You can specify **n** number of DB instances in the text file, but ensure that they run in the same region. If the instances are in different regions, you need to gather the information separately.

Example: if you have one RDS and one Aurora cluster with 1 writer and 4 reader nodes, then the file should look like the following:

```bash
cat /tmp/db_list.txt

my-rds-service
my-cluster-writer
my-cluster-reader1
my-cluster-reader2
my-cluster-reader3
my-cluster-reader4
```

**Execute the automation**

Run the automation with the number of days to be analyzed along with the CloudWatch metric sampling interval. This will take a few minutes depending upon the number of DB instances to be analyzed. To gather metrics for an Aurora cluster for the last 7 days with a sampling interval of 86400 seconds:

```bash
shell> time bash tessell_fetch_rds_aurora_metrics.sh --type aurora --days 7 --period 86400 --file /tmp/db_list.txt
```

**View logs and metrics**

The generated logs and metrics can be found in the `/tmp/get_metrics*` folder. You can import the generated CSV file into a spreadsheet for better visibility and for performing DB workload analysis with ease: **Google Sheets > File > Import > Upload > Drop csv file**.

**Usage tips**

```bash
tessell_fetch_rds_aurora_metrics.sh --type <type> --file <input-file> --period <period> --days <number of days>
```

where,

* `--help | -h` : Display this help.
* `--type | -t` : Please provide db type either RDS or AURORA to collect metrics \[Mandatory].
* `--file | -f` : Please provide a file containing a db identifier list separated by new lines \[Mandatory].
* `--days | -d` : Please provide a number of days to determine the first data point and last data point for metrics.
* `--start_date | -s` : Please provide a start date to determine the first data point in the format 'YYYY-MM-DDTHH:MM:SS'.
* `--end_date | -e` : Please provide an end date to determine the last data point in the format 'YYYY-MM-DDTHH:MM:SS'.
* `--period | -p` : The granularity, in seconds, of the returned data points. Default value is 86400 seconds.

> *Note: The options -d and -s/-e are mutually exclusive and you can provide either one of them.*

Examples:

```bash
tessell_fetch_rds_aurora_metrics.sh --type <type> --file /path/to/db_list.txt --period <period> --days <number of days>
tessell_fetch_rds_aurora_metrics.sh --type <type> --file /path/to/db_list.txt --period <period> --start_date '2020-12-10T00:00:00' --end_date '2020-12-10T23:59:59'
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.tessell.com/tessell/faq/cloud-platforms/aws.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
