How to change backend regions#
Coiled’s default backend region might not be the one that you wish to use. Maybe you are closer to a different region; perhaps you have data you would like to access in a specific region.
There are different ways that you can change your region. This article, will show you what these different ways are and their benefits.
Changing region per Cluster basis#
Let’s assume that you have AWS (VM)
as your backend. This backend, by default,
will use the us-east-1
region. You can change this behaviour by passing
the keyword argument backend_options
to the coiled.Cluster
constructor.
import coiled
cluster = coiled.Cluster(region="us-east-2")
Changing region on your Account#
Let’s assume that you have all your data in us-west-1
, and you will always
want to use this region when creating clusters and running computations. We can
save your desired region so you don’t have to use the keyword argument backend_options
from the coiled.Cluster
constructor all the time.
To change the region on your Account, run setup again. The easiest way to do this is
with --region
included as an argument, e.g. coiled setup aws --region us-east-2
or
coiled setup gcp us-east2
. You can also go to the “Cloud Provider” tab at
cloud.coiled.io <https://cloud.coiled.io>_.
Changing region on your local configuration file#
This method is similar to changing regions on your Account, but requires you to edit
the coiled.yaml
configuration file that lives in ~/.config/dask/coiled.yaml
(see Configuration).
If you open this file, you will see something like this:
coiled
account: null
backend-options: null
server: https://cloud.coiled.io
token: <your token>
user: <your username>
We can edit the backend-options
to include your desired region, for example:
coiled
account: null
backend-options:
region: us-east-2
server: https://cloud.coiled.io
token: <your token>
user: <your username>
Note
Indentation is done with two spaces because this configuration file is a yaml
file.