Exercise - Create a storage account
You discovered that spikes in traffic can overwhelm your middle-tier. To deal with this issue, you decided to add a queue between the front end and the middle tier in your article-upload application.
The first step in creating a queue is to create the Azure Storage account to store your data.
Create a storage account with the Azure CLI
Normally, you'd start a new project by creating a resource group to hold all the associated resources. In this case, we're using the Azure sandbox which provides a resource group named
az storage account create command to create the storage account. You can enter the command into the Cloud Shell window on the right.
The command needs several parameters:
||Sets the name. Remember that storage accounts use the name to generate a public URL - so it has to be unique. In addition, the account name must be between 3 and 24 characters, and be composed of numbers and lowercase letters only. We recommend you use the prefix articles with a random number suffix but you can use whatever you like.|
||Supplies the Resource Group. Use
||Sets the Storage Account type: StorageV2 to create a general-purpose V2 account.|
||Sets the Replication and Storage type. It defaults to Standard_RAGRS. Let's use Standard_LRS, which means it's only locally redundant within the datacenter.|
||Sets the Location independent of the resource group owner. It's optional, but you can use it to place the queue in a different region than the resource group. Place it close to you, choosing from the following list of available regions in the sandbox.|
The free sandbox allows you to create resources in a subset of the Azure global regions. Select a region from this list when you create resources:
Here's an example command line that uses these parameters. Make sure to change the
az storage account create -g <rgn>[sandbox resource group name]</rgn> --kind StorageV2 --sku Standard_LRS --name [unique-name]
You can use the Copy button to copy commands to the clipboard. To paste, right-click on a new line in the Cloud Shell terminal and select Paste, or use the Shift+Insert keyboard shortcut (⌘+V on macOS).