Setting Up Secure Cloud Storage: Restricted Access, Partner Sharing, Website Backup, and Lifecycle Management
Tags: azurefunctions, azure, access, storage
Published: 2024-05-27 01:16:16

**Create a storage account and configure high availability.**


**In Azure Portal, search for "storage account"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xajdbgpw9201v5t7cvnq.png)

**Select "Storage account"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kpl2zho1cm0wdkk45up0.png)

**Select "Create"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8lq2rip6t7po3i81y3lj.png)

**Insert Resource Group previously created name
**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fgmj8cc7gthjs471gb34.png)

**Insert Storage account name 
**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oc15a93xpejrzshodvv0.png)

**Select "Redundancy" to be Geo-redundant storage (GRS)**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dbtauop8j5a3l39olc01.png)


**Select "Review + Create"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/abxgic0qc64189mliv7f.png)

**Check Validation and select "Create"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6dl7ihoj23m34g98vbcs.png)


**Create a storage container, upload a file, and restrict access to the file.**


**In the storage account, select "Data storage" and select "containers"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2z6ihk5biup9x7ffc243.png)

**Select "+ Container"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/53qp3rwb06dfibn04qyf.png)

**Name the container**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7x2m7bux8ql2aoxxljr8.png)

**Ensure access level is private**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9hn1t9dmkfbr2bim2hll.png)

**Select "Create"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b52kmj8p6hocwu6jl4g6.png)

**Upload File to Container**
Select Container

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/der7yc3s16dud8wemkd6.png)

**Select "Upload"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ehgkh7gjqyjl2xrnkdu.png)

**Select File and upload**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oirb2bbbbgnyo2u9cll9.png)


**Select the file and copy file URL to check if file will be accessed**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jy81n8hjww0uc7tunx4k.png)

**Paste URL to a new tab, verify file doesn't display**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2l301gjwz4ma5px2sfjb.png)



**An external partner requires read and write access to the file for at least the next 24 hours. Configure and test a shared access signature (SAS)**

**Select the uploaded blob file and click the "Generate SAS tab"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/77vj3gpnwlfd1rb8wlur.png)

**Ensure the partner has only read permission**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z2yy71k44f8tda93lkor.png)

**Set start/expiry time for the next 24 hours**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h0qsoqt5vsoeonwyi1te.png)

**Select "Generate SAS token and URL"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kwcwmd6cetln1dznn9m1.png)

**Copy the Blob SAS URL to a new browser tab to verify accessibility, file should be accessible.**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8t0vg2314yjqpp1o5l2n.png)

**Configure storage access tiers and content replication.**
Return to storage account

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dy4gohuay3xnf777p7na.png)

**Notice the default access tier is set to hot**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pwxkrqhnr0mj19212kx9.png)

**In the Data Management section**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c7m4ug1vm4y02zos5l44.png)

**Select "Lifecycle management"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rn2j76z2xgms2hjip6l7.png)

**Select "Add a rule"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ju8ko06rs6qi4gvgvc5k.png)

**Add Rule name**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f0rgd87h3ayigeurlyaq.png)

**Select Rule scope to apply rule to all blobs in your storage account**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e4nbyv1dljjt6vrgajlo.png)

**Select "Next"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3g8yvodukizadazj3opc.png)

**Select "Last modified"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b7v8ym4mfyp0rls6h5t8.png)

Set days

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vz5qjkbu63d6eibbvadt.png)

**Select "Move to cool storage"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/07jd99zn7omzn6p6novy.png)

**Add rule**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5f4xmevh8mqbetkzr0hs.png)

**The public website files need to be backed up to another storage account**

**Create a new container**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/el96v22y9vewyjo54sim.png)

**Select "Create"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1w9ew945frsgvy7dyt4z.png)

**Navigate to another storage account, click on "Data management"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iqpslccsf9zibtdvdrrx.png)

**Select "Object replication"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u98r46w9eha1kif2bqoo.png)

**Select "Create replication rules"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/28n7r100sooncajoe0of.png)

**Set Destination storage account to the Private storage previously created**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4x67u5az6nfn50qidi5p.png)

**Set Source Container as mainpublic and Destination Container as backup**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gvm5152hvdfxctvu70h8.png)

**Select "Create"**

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zkzh0l27hah7kmksfbje.png)