CosmosDB – Some setup and quick get started tips

Yet another CosmosDB get started blog post 🙂

Well hopefully this can help someone to a streamlined get started experience with CosmosDB and avoid needing to redo the whole thing some weeks or month later since there where a better structured, performant and cheaper way to setup the CosmosDB.

The quick start!

  1. Create Azure CosmosDB account
  2. Create container
    • Database id
    • Throughput
    • Container ID
    • Partition Key
  3. Go to keys and get the connection details.

Now there is a lot of things in step 2 that sets the experience, performance and cost.

To save some hours research just read this article and watch this session from Build19 and you are good to go :)!

The quick start steps with Pictures 🙂

1: Create the Azure CosmosDB account

  • 2: Create container
    • Database id
    • Throughput
    • Container ID
    • Partition Key

3:Go to keys and get the connection details.

New Improvements

Not really Cosmos DB improvements i am mentioning here but now you are able to provision databases, containers and set RU with Resource Manager. This is nice from Infra as code perspective since that was a limitation and you had to use a powershell module to automate, for example in an CI/CD pipeline. Now you can keep this native in the ARM template.

See this post by Sam Cogan on Creating Cosmos DB Resources using ARM Templates

Documentation

Everything around CosmosDB is really well documented on the official documentation pages, but to get started this is a bit overwhelming and you lose hours trying to figure out the right recipe.

Here are some direct links to core info you will run into.

The team has also tried to make it easier documentations wise to get started with a more purposed approached and “one stop shop” for the documentation, look here.

And guided learning can be found here.

End note

Hopefully this cuts some hours research and get you up and running with CosmosDB in a setup that works even after some runtime.

One thought on “CosmosDB – Some setup and quick get started tips

Leave a Comment