# Scripts to spin up FoundationDB cluster on AWS

**URL:** https://forums.foundationdb.org/t/scripts-to-spin-up-foundationdb-cluster-on-aws/395
**Category:** Using FoundationDB
**Created:** [May 10, 2018, 12:43pm UTC](https://forums.foundationdb.org/t/scripts-to-spin-up-foundationdb-cluster-on-aws/395 "2018-05-10T12:43:25Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![abdullin](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/abdullin/32/83_2.png) [@abdullin](https://forums.foundationdb.org/u/abdullin)
#### Post date: [May 10, 2018, 12:43pm UTC](https://forums.foundationdb.org/t/scripts-to-spin-up-foundationdb-cluster-on-aws/395/1 "2018-05-10T12:43:25Z")

</div>

Here are packer and terraform scripts that that you can use to run cost-effective experiments with large FoundationDB clusters on AWS: [github.com/bitgn/fdb-cloud-test](https://github.com/bitgn/fdb-cloud-test).

The process involves the following steps:

1. Create AMI images for your setup, installing necessary software. This is usually done once.
2. Use terraform to spin up FoundationDB and tester machines out of these AMI images.
3. Run experiments and benchmarks
4. Tear down the cluster

Once the AMI images is “baked” and added to the AWS account, it usually takes 3-4 minutes to create a cluster and a few minutes to tear it down. Since AWS charges per second, you can have experiment even with a large cluster without spending a lot of money.

I use similar scripts to benchmark performance of FoundationDB layers in various configurations.

---

<div class="post-metadata">

### Author: ![abdullin](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/abdullin/32/83_2.png) [@abdullin](https://forums.foundationdb.org/u/abdullin)
#### Post date: [May 19, 2018, 9:10am UTC](https://forums.foundationdb.org/t/scripts-to-spin-up-foundationdb-cluster-on-aws/395/2 "2018-05-19T09:10:50Z")

</div>

Updates:

1. Support for launching multiple FoundationDB processes on the new cluster
2. `m3.large`, `m3.medium` and `i3.large` machines properly mount instance store and use it for storing FoundationDB data
3. Tester AMI packs [mosh](https://mosh.org) and opens appropriate ports

This was tested with the clusters up to 15 x i3.large VMs

---

<div class="post-metadata">

### Author: ![TommyLike](https://sea1.discourse-cdn.com/foundationdb/user_avatar/forums.foundationdb.org/tommylike/32/395_2.png) [@TommyLike](https://forums.foundationdb.org/u/TommyLike)
#### Post date: [November 1, 2018, 2:09am UTC](https://forums.foundationdb.org/t/scripts-to-spin-up-foundationdb-cluster-on-aws/395/3 "2018-11-01T02:09:32Z")

</div>

hey @abdullin , there is another [repo](https://github.com/poma/fdb-test-cluster) which is quite similar to your solution, I tried that on AWS and run several RandomReadWrite tests on the cluster, but I found the latency is quite bigger than the official [performance post](https://apple.github.io/foundationdb/performance.html), I added the result in detail [there](https://forums.foundationdb.org/t/scripts-to-deploy-benchmark-and-tinker-with-1m-operations-sec-foundationdb-cluster-on-aws/637/4), do you know which reason leads to the difference?
