Mastering Azure Storage Account: A Guide to Blob Storage Creation and SAS URL Generation
Picture yourself owning a spacious closet equipped with separate sections to neatly organize your clothes, jewelry, and shoes.
Now, imagine Azure Storage Account as a digital replica of this closet. Similar to the diverse sections in the closet, Azure Storage Account offers a structured approach to data storage with four options: blobs (containers), files, queues, and tables. By providing your data with a unique namespace, this storage account enables effortless global accessibility through HTTP or HTTPS.
In this article, we will follow the practical steps to creating blob storage. I will guide you through the step-by-step process as listed below;
1. Prerequisite
2. Create your Storage Account
3. Create your Blob Container
4. SAS URL Generation
5. How to Change your Acess Tier to Archive
6. Delete Your Storage Account
- Prerequisite
If you don't have an Azure subscription, create a free account before you begin.
2. Create your Storage Account
a) Sign in to the Azure portal and click on the search bar for "storage account"
b)On the storage account page, click on "Create", this will land you on the "Basics" page
c) Under project details, click to choose your existing subscription
d) Click on "Create new" to create your resource group.
e) Scroll down to the instance details to input your globally unique storage account name, and select the region you want your storage to be deployed in.
f)To save cost, click on "standard" for your performance option. However, if you require low latency you can choose "premium"
g)For redundancy, select "Geo-redundant storage(GRS)" This option has a failover capability in a secondary region and is recommended for backup scenarios. They are also stored in two regions
h) You can select any of the redundancy options based on your needs, but for this guide, we are going with GRS.
I) Click on "Next:Advanced>", and scroll down to the Blob storage section.
j)On the Access tier click on "hot" to frequently access your data at any time.
(Please note that there are three types of Access tiers available: Hot, Cool, and Archive. When creating a storage account, only the Hot and Cool tiers can be seen. However, we will demonstrate how to switch to the Archive tier once the blob storage has been created.)
k) Click on Next: Networking> to configure your networking
L)On the Networking page, go to "Network connectivity" and enable public access from all networks.
When enabled, the URL of the storage can be accessed over the internet. If it is disabled, it becomes private and accessible to you alone.
M) Scroll down to Network routing and leave the preference in the default state "Microsoft network routing"
N) Click on Next: Data protection>
O) On the Data protection page, leave it in its default state. The purpose of this page is to retrieve your deleted storage within a minimum retention period of 7 days.
P) Click on next: Encryption>
Q) Leave the Encryption page in its default state and click on Tags.
R)Also leave the Tags page in its default state and click on "Review"
S) On the Review page, you can see a summary of all that you've done. Click on "Create".
T) Once validation is passed, click on "Review +create"
U) This will take you to the deployment page, once the deployment is complete, click on "Go to resource"
V) You will be directed to the storage account page.
3. Create Your Container
Awesome!! Now that we have our storage account ready, let's get inside to create our container.
a) Click on your created storage account to have an overview.
b) Scroll to the left of your storage page, under data storage and click on "Container"
c) On your container page click on "+Container" to create your container
d) This will direct you to the page displayed below
di) Give your container a name.
dii) On the public access level, click on the dropdown and pick "Container" to grant public access over the internet.
dii) Click on the "create" button
e) Your Container is created and should reflect as seen below. To proceeds click on your container.
f) Click on the upload button to upload a picture.
G)Click on "Browse for files" or drag and drop your image
H) The above instruction will direct you to your folder on your desktop, select an image of your choice and open it to upload.
I) Your image will upload as shown below in your container.
4. SAS URL GENERATION
To generate SAS URL, follow the steps below:
a) Click on your uploaded image/document in your container
b) Click on Generate SAS
c)Leave the permission to "Read" for access only.
d) Now set your start and expiry date/time to grant limited access to the document for a specific period.
e) Select the "HTTP and HTTPS" under the allowed protocol category
f) Click on "Generate SAS Token and URL"
g) Copy the Blob SAS URL and share it with anyone who wishes to gain access to the document.
h) Once the link is copied, paste it into a new tab to view it as shown below.
i) Once the time and date set to view the document elapse, you will get this error if you try to access the link.
5.How to Change your Access Tier to Archive
Please Note: I retained my access tier as the "Hot" tier in this article. This is just to show you where to change to the "Archive" tier in the console
To store your data that will not be accessed for a long period, you can change your access tier to archive as demonstrated below.
a) Stay on the blob page and click on change tier
b) Click on the drop-down to change your access tier to your preferred choice
6.Delete Your Storage Account
Once you have no use of your storage account anymore, please delete it to avoid incurring unwanted charges. Simply follow the steps below;
a) To delete your Storage account, search for storage account in the search bar.
b)Then, check the box of your existing storage account and click on delete at the top-right corner.
c) Confirm delete by typing "yes" and clicking on delete.
I hope this helped set up your Blob storage. Thank you.
Subscribe to my newsletter
Read articles from Bunmi Agbomeji directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Bunmi Agbomeji
Bunmi Agbomeji
I am a Cloud Developer documenting my cloud journey one day at a time.