# AWS Instance Sizing for Sourcegraph

<Callout type="warning">
**Deprecation notice:** AWS AMI deployments will be sunset in [Sourcegraph 7.0.0](https://sourcegraph.com/changelog/releases/7.0). We recommend migrating to [Kubernetes Helm](/self-hosted/deploy/kubernetes) or [Docker Compose](/self-hosted/deploy/docker-compose) deployment methods. Please contact support@sourcegraph.com for migration assistance.
</Callout>

## Instance size chart

Select an instance type according to the number of users and repositories you have using this table. If you fall between two sizes, choose the larger of the two.

For example, if you have 8,000 users with 80,000 repositories, your instance size would be **L**. If you have 1,000 users with 80,000 repositories, you should still go with size **M**.

|                      | **XS**      | **S**       | **M**       | **L**        | **XL**       |
| -------------------- | ----------- | ----------- | ----------- | ------------ | ------------ |
| **Users**            | ≥ 500       | ≥ 1,000     | ≥ 5,000     | ≥ 10,000     | ≥ 20,000     |
| **Repositories**     | ≥ 5,000     | ≥ 10,000    | ≥ 50,000    | ≥ 100,000    | ≥ 250,000    |
| **Recommended Type** | m6a.2xlarge | m6a.4xlarge | m6a.8xlarge | m6a.12xlarge | m6a.24xlarge |
| **Minimum Type**     | m6a.2xlarge | m6a.2xlarge | m6a.4xlarge | m6a.8xlarge  | m6a.12xlarge |

<Callout type="note">
	While we recommend certain instance types in our sizing chart, the
	Sourcegraph AMI will dynamically use the resources available on the EC2
	instance type it is deployed to, provided the minimum amount of resources
	needed is available. If you would like to resize your EC2 instance, follow
	the [upgrade steps](/self-hosted/deploy/machine-images/aws-ami#upgrade) to switch
	to a more appropriate instance type.
</Callout>
