Bind Microsoft Stateless Service to Azure Storage Blob? - azure

I'm developing a Stateless Service which will be in charge to process the blobs uploaded to a certain azure storage blob container. Is there a way to bind this Stateless Service to the blob the same way it can be done using Azure WebJobs?
As a workaround I was thinking of having a binded WebJob to that Azure Storage Blob Container and calling the Stateless Service everytime new blobs are uploaded.
Any sugestions or examples?
Thanks in advance!

It's possible to use the WebJob SDK in ASF services and use a blob trigger.
You can also use an Azure Function with a blob trigger, that then calls a service hosting a web api.

Related

Azure Blob Storage V2 , unusual API calls from Azure Function App, after upgrade

I have been using the Azure Function App consumption plan with Azure Blob Storage V1 for some time, with no problem.
Two months ago, we changed over to Azure blob Storage V2 and all of a sudden we noticed a drastic increase in costs.
After some investigation, we found that there are several 10's of thousands of API calls for
GetBlob,
GetBlobProperties,
GetBlobServiceProperties,
ListBlobs,
PurBlob,
RenewBlobLease.
My functions do not use this particular storage account for any storage, as I am using an external account for tables.
Has anyone experienced such an issue or know why these API calls are being called?
Maybe this storage is also the AzureWebJobsStorage of your function app?
The files of your function app will be stored in the AzureWebJobsStorage.
You can follow this to check the source of the request:
How to view Blob Storage logs in Azure App Insights?

Azure EventGrid sending to internal endpoint

Let's assume that I have a blob storage account and a VM in Azure. VM is closed to the world, has no public endpoint, however it is reachable from the inside of Azure Subscription. I would like to notify application that runs on this VM, that new file has been uploaded to my blob storage. I know that I can pass this kind of events using EventGrid. What I don't know is if it is possible to send this event to an internal endpoint, available only from VNET/Subnet.
No, this is not possible unless you create some proxy.
You might achieve something with Azure Automation + hybrid worker combo. EventGrid can publish to Azure Automation.

Message from Azure Blob Storage to Azure Service Bus

I'm trying to figure out if Azure Blob Storage has similar functionality to Amazon S3. An S3 bucket can be configured in a way, that when new object is created, bucket sends message to SQS. I'm wondering if Azure Blob Storage is able to do the same with Azure Service Bus (which is kind of similar to SQS, correct?).
The only resource I've found so far, which mentions something similar is https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-event-overview, but there is no Azure Service Bus on the right side. I know I can use Functions as a proxy, but I'm interested in direct connection.
Any ideas?
Service bus(I think you compare service bus with SQS and SNS in AWS) don't have the ability to subscripe to Blob storage events. Event Grid(the link that you reffered to has Service bus support on the roadmap but no date is confirmed.
I think your best choice is Azure Functions(or Logic app if you don't want to write code) that has a blob Storage trigger to catch events and do action X.
https://learn.microsoft.com/en-us/azure/azure-functions/functions-create-storage-blob-triggered-function.
Or wait a litte for event grid but you still get that "proxy" part.
One option is to use logic apps/ event grid and you can add trigger directly from azure blob storage (https://azure.microsoft.com/it-it/blog/azure-service-bus-now-integrates-with-azure-event-grid/) . Another option would be to add blob trigger with azure functions and write the code to do whatever action which you are looking for .

Launch Azure Container Service on Upload to Blob Storage

I have a use case where I'd like to launch a job on an Azure Container Service cluster to process a file being uploaded to Blob storage. I know that I can trigger an Azure Functions instance from the upload, but I haven't been able to find examples in the documentation of starting a job within Functions.
This diagram illustrates the AWS equivalent of what I want:
Thanks!
The Azure Event Grid feature is what you need. It is still in preview, but you can subscribe to the Blob Created event. You can set the subscriber endpoint to an Azure Function that puts a message in a queue to trigger your job, or you can expose a service on your cluster that will accept the request and do whatever you need done.
Microsoft provides a guide at https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-event-quickstart?toc=%2fazure%2fevent-grid%2ftoc.json#create-a-message-endpoint

Clarification regarding storage account in web applications

I have an on-premises mvc application with a database calls to one more server.
When I deploy this application to windows azure, I am curious to know what will be stored in the storage account for this cloud service?
Is it database records or something else?
Given you mentioned creating a Cloud Service (so, I'm assuming Web Role for your MVC app): The deployment needs a storage account, at a minimum, for storing diagnostic log information, as well as your cloud service package and configuration.
Storage account is mostly used for "Blob" storage. In Azure environment we should not prefer to store blob data( like image and doc/PDF ) in database.best practice to store blob storage link.
Azure Storage provides the flexibility to store and retrieve large amounts of unstructured data, such as documents and media files with Azure Blobs; structured nosql based data with Azure Tables; reliable messages with Azure Queues and use SMB based Azure Files for migrating on-premises applications to the cloud.
for Overview and reference : http://azure.microsoft.com/en-in/documentation/services/storage/

Resources