---
title: "Install on Amazon EC2"
description: "Guide for installing Aerospike Database on Amazon EC2 via AWS Marketplace or custom AMI creation."
---

# Install on Amazon EC2

> For the complete documentation index see: [llms.txt](https://aerospike.com/docs/llms.txt)
> 
> All documentation pages available in markdown.

This page describes how to install Aerospike Database on Amazon EC2 by using the AWS Marketplace AMI or preparing your own Amazon Machine Image (AMI).

Use this information for development with in-memory storage only. For deployment planning for AWS, see the Aerospike [Capacity Planning](https://aerospike.com/docs/database/manage/planning/capacity) documentation.

## Get the Aerospike AMI

You can either use the Aerospike Enterprise Edition AMI on the AWS Marketplace or prepare your own AMI.

### Aerospike on AWS Marketplace

1.  In your browser, go to [Aerospike Database on AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-t7thoecdg4kdg).
    
2.  Click **Continue** on that page. The **Launch on EC2** page appears.
    
3.  Click **Manual Launch** tab. Then click **Launch with EC2 console** for the region you want to use.
    

### Prepare your own AMI

1.  Launch an OS of your choice, then [install Aerospike](https://aerospike.com/docs/database/install/linux) according to the OS you’ve chosen. For best performance and compatibility, we recommend using Database 6.4.0 and later with Amazon Linux 2023.
    
2.  Optionally [install the Aerospike Monitoring Stack](https://aerospike.com/docs/database/observe/monitor/components).
    
3.  Set the Aerospike service to start on boot.
    
    Terminal window
    
    ```bash
    sudo systemctl enable aerospike
    ```
    
4.  After you’ve configured your [namespace](https://aerospike.com/docs/database/manage/namespace) and other [configuration parameters](https://aerospike.com/docs/database/manage/database/as-config), [create your AMI](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html).
    

## Instance type

Select an EC2 instance type based on your RAM, storage, network throughput, and CPU requirements. Common starting points are memory-optimized families for in-memory workloads, storage-optimized families for local SSD workloads, and compute-optimized families for latency-sensitive workloads.

If you use AWS Graviton or another ARM-based instance, download an Aerospike package for a supported Linux distribution and architecture. See [Platform support and compatibility](https://aerospike.com/docs/database/reference/platform-support/) before choosing the OS image and package.

For more details about instance types, see [Amazon EC2 capacity planning](https://aerospike.com/docs/database/install/aws/plan).

## Virtual Private Cloud (Networking)

Aerospike recommends deploying to an Amazon VPC. For more information, see [How Amazon VPC works](http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_Subnets.html).

## Security group

In your security group, open the following ports only to trusted clients, tools, and cluster nodes.

| Protocol | Port | Description |
| --- | --- | --- |
| TCP | 22 | SSH port for logging into the instance. |
| TCP | 3000-3003 | Client service (`3000`), intra-cluster fabric and heartbeat (`3001`–`3002`), and admin access (`3003`). |

|

## Launch

Launch your instance and connect with `ssh`.

An in-memory test namespace is configured by default. To learn about adding storage devices, configuring a cluster, and tuning your configuration to your hardware, see [Configure Aerospike Database](https://aerospike.com/docs/database/manage/database/as-config).

## Start Aerospike

Terminal window

```bash
sudo systemctl start aerospike

sudo systemctl status aerospike
```

## Clustering Aerospike

Multicast traffic is not permitted on AWS. You must form a cluster using Aerospike’s heartbeat protocols. For more information, see [Mesh (unicast) heartbeat](https://aerospike.com/docs/database/manage/network/heartbeat#mesh-unicast-heartbeat).

Connect to each instance using `ssh` and configure mesh networking on the private IP address for each node.

For more information, see [Aerospike on Amazon EC2](https://aerospike.com/docs/database/install/aws/best-practices).