Fauna Account

Signup for an account

  • If you don’t yet have a Fauna account, register for one here

Create a database

  • Login to the Fauna dashboard
  • Create a new database
    • Provide a name, e.g. serverless_workshop
    • Choose a Region Group, e.g. United States (US)
    • Click Create
      Create database

Generate an API Key

  • In the new database you just created, run the following command in the web shell:
    Key.create({
      role: 'admin',
      data: {
        name: 'workshop-admin'
      }
    })
    
  • You will see an output similar to the following (you will see your own values for id and secret):
    {
      id: "362569567723061316",
      coll: Key,
      ts: Time("2023-04-20T23:08:54.680Z"),
      secret: "fnAFCBsZ0oAARPEoNMi6tANpiBMReshQtEp3GE0W",
      role: "admin",
      data: {
        name: "workshop-admin",
      },
    }    
    
  • Copy the value of your key’s secret to a temporary location. You may not see it again if you clear the shell or start a new session.