﻿---
title: EC2 Discovery plugin
description: The EC2 discovery plugin provides a list of seed addresses to the discovery process by querying the AWS API for a list of EC2 instances matching certain...
url: https://www.elastic.co/elastic/docs-builder/docs/3016/reference/elasticsearch/plugins/discovery-ec2
products:
  - Elasticsearch
---

# EC2 Discovery plugin
The EC2 discovery plugin provides a list of seed addresses to the [discovery process](https://docs-v3-preview.elastic.dev/elastic/docs-builder/docs/3016/deploy-manage/distributed-architecture/discovery-cluster-formation/discovery-hosts-providers) by querying the [AWS API](https://github.com/aws/aws-sdk-java) for a list of EC2 instances matching certain criteria determined by the [plugin settings](https://www.elastic.co/elastic/docs-builder/docs/3016/reference/elasticsearch/plugins/discovery-ec2-usage).
**If you are looking for a hosted solution of Elasticsearch on AWS, please visit [[https://www.elastic.co/cloud](https://www.elastic.co/cloud)](https://www.elastic.co/cloud).**

## Installation

This plugin can be installed using the plugin manager:
```sh
sudo bin/elasticsearch-plugin install discovery-ec2
```

The plugin must be installed on every node in the cluster, and each node must be restarted after installation.
You can download this plugin for [offline install](https://www.elastic.co/elastic/docs-builder/docs/3016/reference/elasticsearch/plugins/plugin-management-custom-url) from [[https://artifacts.elastic.co/downloads/elasticsearch-plugins/discovery-ec2/discovery-ec2-9.3.2.zip](https://artifacts.elastic.co/downloads/elasticsearch-plugins/discovery-ec2/discovery-ec2-9.3.2.zip)](https://artifacts.elastic.co/downloads/elasticsearch-plugins/discovery-ec2/discovery-ec2-9.3.2.zip). To verify the `.zip` file, use the [SHA hash](https://artifacts.elastic.co/downloads/elasticsearch-plugins/discovery-ec2/discovery-ec2-9.3.2.zip.sha512) or [ASC key](https://artifacts.elastic.co/downloads/elasticsearch-plugins/discovery-ec2/discovery-ec2-9.3.2.zip.asc).

## Removal

The plugin can be removed with the following command:
```sh
sudo bin/elasticsearch-plugin remove discovery-ec2
```

The node must be stopped before removing the plugin.