What's the difference between Cluster and Instance in AWS Aurora RDS

Vinícius Queiroz picture Vinícius Queiroz · Apr 6, 2018 · Viewed 12.5k times · Source

I guess the title is pretty objective, but just to clarify:

When you create an Aurora Database Instance, it is asked to give a name for a Database Instance, a Database Cluster and a Database (where the name of the Database is optional, and no databases are created if it is not specified...). When you create another instance, you have to give the name for both again, and neither of them can be the same one as the first ones.

So, what's the difference between an Aurora Database Instance and an Aurora Database Cluster?

Also, can (and when do) you connect to each one of them?

Thanks!!

Answer

John Veldboom picture John Veldboom · Apr 6, 2018

An Aurora cluster is simply a group of instances. By default, Aurora will create two instances in a cluster - one for reads and the other for writes. But you can change that configuration to be whatever you need.

For the names:

  • Database Cluster is the name of the cluster that holds the instances
  • Database Instances are the names of each instance in the cluster. By default, if you named the instances "mydb", AWS will append the AZ to the name. So it would become "mydb-us-east-1c" for example.
  • Database Name is the name of the initial database that will be created within Aurora. Think database like where you will add tables and data. If you do not specify a Database Name, you will just need to create your own - which is likely what you want to do anyway.

To connect, just point your application at the cluster endpoint. RDS will route traffic and handle failovers for you.