---
title: "Discussion on \"How to run a highly-available Typesense search in AWS\" | Hashnode"
description: "Discussion on \"How to run a highly-available Typesense search in AWS\". Get a multi-node Typesense cluster up & running in minutes on AWS using infrastructure as code"
url: "https://hashnode.com/posts/how-to-run-highly-available-typesense-cluster-in-aws/63a1a89aa59cad9bdbba1fe5"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to run a highly-available Typesense search in AWS](https://blog.stefanolaru.com/how-to-run-highly-available-typesense-cluster-in-aws?utm_source=hashnode&utm_medium=feed)

Get a multi-node Typesense cluster up & running in minutes on AWS using infrastructure as code

Dec 20, 2022 · 10 min read · blog.stefanolaru.com  
Read the article

-   [#aws](https://hashnode.com/tag/aws)
-   [#cloudformation](https://hashnode.com/tag/cloudformation)
-   [#infrastructure-as-code](https://hashnode.com/tag/infrastructure-as-code)
-   [#load-balancing](https://hashnode.com/tag/load-balancing)
-   [#search](https://hashnode.com/tag/search)

## Written by

[Stefan Olaru](https://hashnode.com/@stefanolaru)

@stefanolaru

  
[View profile](https://hashnode.com/@stefanolaru)

Head of Development | Architect | 7x AWS Certified | AWS Community Builder | Serverless

An architect by trade, practicing architecture in the Cloud. 7x AWS Certified, AWS Community Builder, Serverless advocate, Vue enthusiast.

## Responses 4

Markdown supported · ⌘↵ to post

[Jagat Bandhu](https://hashnode.com/@jagatmonster)

[Apr 21, 2024](https://hashnode.com/posts/how-to-run-highly-available-typesense-cluster-in-aws/63a1a89aa59cad9bdbba1fe5/comment/66249a3d578ed7e552885d3b)

I am able to create the full stack, but how to access the dahsboard

[Calvin Butler](https://hashnode.com/@ckcalbut)

[Nov 21, 2023](https://hashnode.com/posts/how-to-run-highly-available-typesense-cluster-in-aws/63a1a89aa59cad9bdbba1fe5/comment/655c1cb62a6c065f3be50ed1)

Hi Stefan,

May I ask why you decided to use a SNS Topic with a Lambda subscribed to it?

**Con:** It seems like an extra step because you could just invoked the lambda at the end of the UserData script instead of writing to the SNS Topic at the end of the UserData script, which causes the lambda to be invoked.

**Pro:** It does seem cleaner to separate the concerns of the lambda running successfully and the UserData script installing Typesense successfully.

Was this your thinking or am I missing something?

[Calvin Butler](https://hashnode.com/@ckcalbut)

[Nov 21, 2023](https://hashnode.com/posts/how-to-run-highly-available-typesense-cluster-in-aws/63a1a89aa59cad9bdbba1fe5/comment/655c1cb62a6c065f3be50ed1#reply-655c1e86c8bfa45f6b14339f)

Ohhh... I suppose the startup would be tricky without the SNS Topic. The order of creation of things might become a tricky obstacle: The lambda has to be created to be triggered and yet the lambda needs to know some things about the autoscaling group.

[Stefan Olaru](https://hashnode.com/@stefanolaru)

[Nov 21, 2023](https://hashnode.com/posts/how-to-run-highly-available-typesense-cluster-in-aws/63a1a89aa59cad9bdbba1fe5/comment/655c1cb62a6c065f3be50ed1#reply-655c862ac8bfa45f6b144a1f)

Hey [Calvin](https://hashnode.com/@ckcalbut), the SNS topic is in there because the AutoScaling group will publish a message to it in case of EC2\_INSTANCE\_TERMINATE. E.g. in case of a scale-down

[Calvin Butler](https://hashnode.com/@ckcalbut)

[Nov 22, 2023](https://hashnode.com/posts/how-to-run-highly-available-typesense-cluster-in-aws/63a1a89aa59cad9bdbba1fe5/comment/655c1cb62a6c065f3be50ed1#reply-655e4ace356b1a848aa3d7f6)

[Stefan Olaru](https://hashnode.com/@stefanolaru) Ahh that makes sense. Thank you much!

[aaron ueckermann](https://hashnode.com/@ACU)

[Oct 6, 2023](https://hashnode.com/posts/how-to-run-highly-available-typesense-cluster-in-aws/63a1a89aa59cad9bdbba1fe5/comment/652056316ab81bbe71b0ae6a)

You are a life saver, I tried running your one-click deployments and am getting a "No export named typesense-vpc-VPCID found. Rollback requested by user." error though and can't figure out why?

[Calvin Butler](https://hashnode.com/@ckcalbut)

[Oct 26, 2023](https://hashnode.com/posts/how-to-run-highly-available-typesense-cluster-in-aws/63a1a89aa59cad9bdbba1fe5/comment/652056316ab81bbe71b0ae6a#reply-653aa1afe641417b5eeec3f5)

The names of the vpc stack's exported values are dependent on the name of the stack. I named my vpc stack, "typesense-vpc", in order for the exported values to have the names that the cluster stack expects.

[aaron ueckermann](https://hashnode.com/@ACU)

[Nov 12, 2023](https://hashnode.com/posts/how-to-run-highly-available-typesense-cluster-in-aws/63a1a89aa59cad9bdbba1fe5/comment/652056316ab81bbe71b0ae6a#reply-6550dde20701ac13578c4f5a)

[Calvin Butler](https://hashnode.com/@ckcalbut) [Stefan Olaru](https://hashnode.com/@stefanolaru) Thanks so much for replying (I missed this) I tried recreating the stacks with the VPC stack first and I called it "typesense-vpc". I am now getting an error when trying to create the instance event listener of "Resource handler returned message: "Error occurred while GetObject. S3 Error Code: NoSuchKey. S3 Error Message: The specified key does not exist." when deploying the cluster stack

[Stefan Olaru](https://hashnode.com/@stefanolaru)

[Nov 14, 2023](https://hashnode.com/posts/how-to-run-highly-available-typesense-cluster-in-aws/63a1a89aa59cad9bdbba1fe5/comment/652056316ab81bbe71b0ae6a#reply-655347b4add2d72f5f031f0b)

[aaron ueckermann](https://hashnode.com/@ACU) sounds like the S3 bucket is missing the instance-listener.zip

I missed this in the article for some reason ☺️

Please copy as mentioned in repo readme #2: [github.com/stefanolaru/aws-cloudformation-templat…](https://github.com/stefanolaru/aws-cloudformation-templates/blob/main/typesense-multi-node/README.md)

[Stoica George-Ovidiu](https://hashnode.com/@ovistoica)

[Dec 21, 2022](https://hashnode.com/posts/how-to-run-highly-available-typesense-cluster-in-aws/63a1a89aa59cad9bdbba1fe5/comment/63a2b11129e757b59697c477)

Great article, Stefan! I'll refer back to this in some time!

[Stefan Olaru](https://hashnode.com/@stefanolaru)

[Dec 21, 2022](https://hashnode.com/posts/how-to-run-highly-available-typesense-cluster-in-aws/63a1a89aa59cad9bdbba1fe5/comment/63a2b11129e757b59697c477#reply-63a2bc7e29e757b59697c61e)

Thank you, Ovi! 🙏
