Azure-Functions icon indicating copy to clipboard operation
Azure-Functions copied to clipboard

Guidance on Azure Functions - PowerShell vs Azure Automation

Open johnnliu opened this issue 7 years ago • 7 comments

  • For documentation issues, please provide exactly what is wrong/missing and why it's important.

I had a chat with @paulbatum about Azure Functions PowerShell vs. Azure Automation (which has PowerShell runbooks) at MSAUIgnite

I made this table of notes after attending some Automation sessions.

image

(sorry - OneNote pastes table as picture).

Talking to lots of power users and admin users - they are very keen on the differentiation of Azure Functions PowerShell vs Azure Automation.

This is mostly a moving target - but I ultimately see Azure Functions as a 'language neutral' way to write functions. And Azure Automation as specifically for running Admin PowerShell scripts.

I thought I get the ball rolling with this issue.

johnnliu avatar Mar 01 '17 07:03 johnnliu

@johnnliu Thanks for the table, this is super-helpful!

lindydonna avatar Mar 04 '17 02:03 lindydonna

Just noted some updates on AzureFunction's side:

  • Azure Functions can be extended to 10min max now via config. Default to 5min
  • Azure Functions can access managed identity and pull credentials out of Azure keyvault that way
  • Azure Functions can be 64bit in consumption as well

I haven't been following Azure Automation's side so the left column may be outdated.

johnnliu avatar Dec 21 '17 00:12 johnnliu

Something to note about Azure Automation is the ability to run against on-prem resources via Hybrid Runbook Workers. Not only does this let you run workflows on-prem, it lets you bypass the 3-hour fair-use run limit for Azure Automation Runbooks.

DouglasStuart avatar Feb 04 '18 19:02 DouglasStuart

Is there a way for an azure function to use a Service Principal (similar to Automation Connections using Get-AutomationConnection) for calling Azure api's from within the function ?

manishkp avatar Apr 11 '18 02:04 manishkp

Azure Functions supports AAD MSI which can be used to achieve this scenario: https://docs.microsoft.com/en-us/azure/app-service/app-service-managed-service-identity

paulbatum avatar Apr 11 '18 16:04 paulbatum

Is there a way for an azure function to use a Service Principal (similar to Automation Connections using Get-AutomationConnection) for calling Azure api's from within the function ?

I have similar kind of requirement.

I tried to call Azure APIs using SPNs in Function APP. It failed to execute with authentication failure error.

cmbtr4u avatar May 16 '20 16:05 cmbtr4u

If i would like to run a python script regularly, but need to store some files too. Which one would you use? or is there something else to automate a python script (Jupyter Notebook without GUI)?

  • Runbook because of possible memory- or time-limits?
  • Is there a Storage limit or Read/Write limits for temporary files?
  • Findings for Runbook https://docs.microsoft.com/en-us/answers/questions/90427/azure-powershell-runbooks-with-azure-storage.html https://github.com/azureautomation/runbooks/blob/master/Utility/Python/download_storage_container.py https://docs.microsoft.com/en-us/answers/questions/127460/access-storage-account-with-automatio-account-runb.html

  • Findings for Functions https://docs.microsoft.com/en-us/azure/azure-functions/storage-considerations https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-storage-blob https://docs.microsoft.com/en-us/azure/azure-functions/functions-add-output-binding-storage-queue-vs-code?tabs=in-process&pivots=programming-language-python

weyCC81 avatar Feb 28 '22 22:02 weyCC81