Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Cloud Dev with Azure Functions - DogFoodCon 2018 - Brian T Jackett

35 views

Published on

Code samples: https://github.com/BrianTJackett/Presentations/tree/master/DogFoodCon2018

Dipping Your Toe into Cloud Development with Azure Functions. Presented at DogFoodCon 2018 by Brian T. Jackett.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Cloud Dev with Azure Functions - DogFoodCon 2018 - Brian T Jackett

  1. 1. Dipping Your Toe into Cloud Development with Azure Functions Brian T. Jackett Sr. Premier Field Engineer Microsoft
  2. 2. Sr. Premier Field Engineer at Microsoft Office 365 Dev / Admin, Azure Dev Stir Trek Conference Organizer Blog: www.BrianTJackett.com Twitter: @BrianTJackett Email: Brian.Jackett@Microsoft.com
  3. 3. Azure Functions v1 • .Net Framework 4.7 • Windows-only Azure Functions v2 • .Net Core 2.x • Cross-platform • GA at Ignite
  4. 4. Azure Functions Design Considerations Authentication Security Concerns Durable Functions Tips and Tricks
  5. 5. What are Azure Functions? Code that runs in response to a triggered event Components • Trigger – condition to initiate function • Input binding – (optional) additional input at start • Output binding – (optional) where to send output
  6. 6. Trigger Input Output Blob Storage    Cosmos DB    Event Grid  Event Hubs   HTTP / Webhook   Mobile Apps   Notification Hubs  Queue Storage   SendGrid  Service Bus   Table Storage   Timer  Twilio 
  7. 7. Two styles of functions • Pre-compiled (ex. Visual Studio) • Uncompiled (ex. VS Code or Azure Portal) Supported languages Experimental languages
  8. 8. SharePoint Online Storage queue 1) Scheduled Azure Function 2) Read data from SPO 3) Place records on queue to be processed 4) Queue triggered Azure Function 5) Perform designated actions on targets Azure Log Analytics (operational run data)
  9. 9. Azure Azure Portal Local development (same runtime) Visual Studio 2017 version 15.5+ -or- Visual Studio Code + Azure Functions Core Tools
  10. 10. Optional but highly recommended Azure Storage Explorer • https://aka.ms/azurestorageexplorer Azure Service Bus Explorer • https://aka.ms/servicebusexplorer HTTP API testing tool (Postman or similar)
  11. 11. Portal Visual Studio Authentication + Security Super Special Demo
  12. 12. https://aka.ms/BTJAFDemo
  13. 13. Portal Visual Studio Authentication + Security Super Special Demo
  14. 14. Azure Functions Design Considerations Authentication Security Concerns Durable Functions Tips and Tricks
  15. 15. Don’t re-invent the wheel https://docs.microsoft.com/en-us/azure/architecture/patterns/
  16. 16. Event driven programming
  17. 17. A different style of thinking Design code to run as fast as possible with smallest footprint
  18. 18. Consumption • Pay per use • Auto resource allocation • Max timeout 10 minutes (default 5) Dedicated • Pay monthly = App Service Plan • No “warm up” (Always On setting) • Flexible resource allocation • Run > 10 minutes
  19. 19. Sample costs: www.HaveIBeenPwned.com • Uses: 4MM hits / week • Cost: $7.40 / week
  20. 20. Efficiency
  21. 21. Azure Functions Design Considerations Authentication Security Concerns Durable Functions Tips and Tricks
  22. 22. What are you connecting to? • SharePoint Online • MS Graph • Azure Storage • … How are you storing credentials? • App Settings • Azure Key Vault
  23. 23. Connect to data source (ex. SharePoint Online) https://aka.ms/BTJAFCertAuth
  24. 24. Authentication libraries
  25. 25. App Service “Managed Service Identity”
  26. 26. App Service App Settings Azure Key Vault
  27. 27. Azure Functions Design Considerations Authentication Security Concerns Durable Functions Tips and Tricks
  28. 28. Azure Services with Public Endpoints • App service (function) • Storage Secure these properly!
  29. 29. App Service (function) • Configure authentication • Disable anonymous access
  30. 30. App Service (function) • Disable the default homepage • App Setting • AzureWebJobsDisableHomepage = True
  31. 31. Access keys = keys to the kingdom • Read / write to entire storage account • Rotate regularly • Store securely • Caution with who has access to keys
  32. 32. Shared Access Signature (SAS) token • Use SAS tokens when possible • Scoped to Account or Container • Time bound • Allowed Permissions • Allowed IPs
  33. 33. Portal Visual Studio Authentication + Security Super Special Demo
  34. 34. Azure Functions Design Considerations Authentication Security Concerns Durable Functions Tips and Tricks
  35. 35. Announcements Stateful functions
  36. 36. How to handle errors?
  37. 37. Function Chaining Fan-out / fan-in Human interaction
  38. 38. Portal Visual Studio Authentication + Security Super Special Demo
  39. 39. Automatically apply retention labels in SharePoint Online SharePoint Online Storage queue 1) Scheduled Azure Function 2) Read data from SPO 3) Place records on queue to be processed 4) Queue triggered Azure Function 5) Perform designated actions on targets
  40. 40. Azure Functions Design Considerations Authentication Security Concerns Durable Functions Tips and Tricks
  41. 41. • Azure Storage Explorer to see data in storage • If using app service plan, enable “Always On” setting • Run Functions locally = no money spent • Freebies per month…
  42. 42. Date / Time Session Thurs 3:20pm From Zero to Serverless – Chad Green Fri 2:10pm Building an Ultra-Scalable API Using Azure Functions… - Chad Green
  43. 43. Brian.Jackett@microsoft.com http://aka.ms/azureicons

×