0
votes

I am trying to make an azure function that uploads to my azure blob. Reason I am trying to avoid uploading from my web server (Linux vm) is because I noticed that azure charges for data transfers (traffic from client to the virtual network linked to the VM). I was also afraid of the network traffic this would cause for the web server. Are these really issues that an azure function can fix?

For creating the function, I used visual studio and added a function with a http trigger to my blob storage. I was planning to receive a signed JWT and media content via http to the function and upload the image to the blob storage the function is currently in. I did find this code: https://www.cyotek.com/blog/upload-data-to-blob-storage-with-azure-functions Where a new image is create in blob. However It manually connects to the blob. Since my function is already inside the blob, I was wondering if there was any way it could directly create a blob within the currently storage. This way the function wouldn't connect to the storage over the internet.

1
Not sure I understand your concern. If your web server (linux vm) is in the same region as your storage account, there is no bandwidth cost between them. Or between any resources in the same region. Azure Functions are no different. I don't see the relevance of Azure Functions here. Please edit your question to clarify. And also clarify where your web server resides.David Makogon
just updated the question. It is not the traffic between vm and the blob, but the traffic between vm and the client.Neville Nazerane

1 Answers

1
votes

You could use Blob Output Binding feature of Azure Functions.

It will give you convenience, however it won't save you any traffic compared to writing the blobs manually. The good news:

  • If your function is inside the same Azure region as your Blob Storage account, you won't be charged for any internal traffic

  • All the inbound traffic to Azure is free, so you wouldn't be charged anyway