Skip to content

Construct a high-performance, low-latency data sharing solution between different Azure Storage Accounts using Azure Functions Flex Consumption and the Copy Blob API.

License

Notifications You must be signed in to change notification settings

charliewei0716/blob-data-sharing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blob Data Sharing with Azure Functions Flex Consumption

Open in GitHub Codespaces

Construct a high-performance, low-latency data sharing solution between different Azure Storage Accounts using Azure Functions Flex Consumption and the Copy Blob API.

blob-data-sharing

Features

Getting Started

  1. This repository has been optimized for GitHub codespaces. Please use the following badge to open a web-based version of VS Code in your browser.

    Open in GitHub Codespaces

  2. Login to your Azure account with device authorization grant flow.

    azd auth login --use-device-code
    
    az login --use-device-code
    

Note

Due to the handshake validation process required when creating an Azure Event Grid, we must use the az command and the identity from az login to establish the event subscription within the post-deployment script.

  1. Provision Azure resources and deploy the application code.

    azd up
    
    • Enter the environment name, Azure subscription, and the location of the Azure resources one by one as instructed.
    • This process involves using ./scripts/postdeploy.sh to set up a webhook for an Azure Function.

    Deploy

Testing in Azure Portal

Follow these steps to conduct end-to-end testing on the Azure Portal.

  1. In the Azure Portal, locate the resource group named rg-<your-environment-name> and the two storage accounts named stsource<hash-string> and sttarget<hash-string> respectively.

  2. Modify the above storage account settings.

    • If you are not located within the VNet, you must check Add your client IP address in the firewall settings.
    • Assign yourself the Blob Data Contributor role at the resource group or storage account level.
  3. Refer to the animation example below. By uploading a file into the container named source, you will be able to see the file in the container named target within a few seconds.

testing-azure-portal

Clean Up

Execute the following command to remove all resources. This will ensure you do not incur any unnecessary costs after completing your testing or usage.

azd down

Reference

Here are some resources to learn more about the technologies used in this repository:

About

Construct a high-performance, low-latency data sharing solution between different Azure Storage Accounts using Azure Functions Flex Consumption and the Copy Blob API.

Topics

Resources

License

Stars

Watchers

Forks