Azure Serverless Computing Cookbook Solve problems at scale by leveraging Azure Functions Praveen Kumar Sreeram BIRMINGHAM - MUMBAI Azure Serverless Computing Cookbook Copyright © 2017 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: August 2017 Production reference: 1160817 Published by Packt Publishing Ltd. Livery Place 35 Livery Street Birmingham B3 2PB, UK. ISBN 978-1-78839-082-8 www.packtpub.com Credits Author Copy Editor Praveen Kumar Sreeram Stuti Srivastava Reviewer Project Coordinator Florian Klaffenbach Virginia Dias Commissioning Editor Proofreader Vijin Boricha Safis Editing Acquisition Editor Indexer Shrilekha Inani Aishwarya Gangawane Content Development Editor Graphics Sweeny Dias Kirk D'Penha Technical Editor Production Coordinator Komal Karne Aparna Bhagat Foreword It is my pleasure to write the foreword for Azure Serverless Computing Cookbook by Praveen Kumar Sreeram. Azure Functions is one of the key Platform as a service (PaaS) components from Microsoft and provides a rich experience for the event-driven, compute-on-demand programming model. To use Azure Functions, the user is not required to be a master of any specific programming language; rather, they can use their language of choice, such as C#, Node.js, JavaScript, PowerShell, and so on, to create highly scalable functions. Azure Serverless Computing Cookbook shows the author's dedication and hard work to come out with a gem that will not only benefit developers and architects, but also enterprises that want to leverage serverless solutions in Azure. The author has thoroughly gone through each parameter and every consideration in tackling the concept of Azure Functions. You will surely like the way numerous code samples and use cases blend together to create a knowledge repository for you to start with cloud development on the go. I would like to thank Packt, Mohd. Riyan Khan, and Shrilekha Inani for involving me in evaluating the content and giving me the opportunity to write this foreword. Abhishek Kumar Microsoft Azure MVP and Consultant – Datacom New Zealand About the Author Praveen Kumar Sreeram works as a Solution Architect at PennyWise Solutions (an Ogilvy and Mather Company). He has over 12 years of experience in the field of development, analysis, design, and delivery of applications of various technologies, including custom web development using ASP.NET and MVC to building mobile apps using the cross-platform technology Xamarin for domains such as insurance, telecom, and wireless expense management. He has been awarded two times as the Most Valuable Professional by one of the most leading social community websites, CSharpCorner, for his contributions toward writing articles and helping community members, mostly on Microsoft Azure. He is highly focused on learning about technology. He is an avid blogger who writes about his learning at his personal blog, called PraveenKumarSreeram and you can also follow him on twitter at @PrawinSreeram. His current focus is on analyzing business problems and providing technical solutions for various projects related to Microsoft Azure and Sitecore. First of all, my thanks go to the great editorial team at Packt Publishing for identifying my potential and giving me the opportunity to write this book, especially Shrilekha Inani, Sweeny Dias, Komal Karne, Yogesh Mishra, and the whole team who encouraged me a lot. Without them, I couldn’t have done it. I would like to thank my current employer, PennyWise Solutions, all of my management team, especially the CTOs, Mr. Pavan Pochu and Mr. Arup Dutta, for guiding me all the way, and my lovely colleagues who encouraged me a lot. I would like to thank my grandma Neelavatamma; dad, Kamalakar; mom, Seetha; my better half, Haritha; and my little princess, Rithwika; for being in my life and giving me courage all the time. I would like to express my deepest gratitude to Medeme Narasimhulu and Medeme Saraswathi (my uncle and aunt) who have been supporting me and encouraging me right from my college days. Without them, I wouldn't have even become a software professional. About the Reviewer Florian Klaffenbach started his IT career in 2004 as a 1st and 2nd level IT support technician and IT salesman trainee for a B2B online shop. After that, he changed to a small company working as IT project manager for planning, implementing, and integrating from industrial plants and laundries into enterprise IT. After a few years, he changed course to Dell Germany. There, he started from scratch as an enterprise technical support analyst and later worked on a project to start Dell technical communities and support over social media in Europe and outside of the US. Currently, he works as a Technology Solutions Professional for Microsoft, specializing in hybrid Microsoft cloud infrastructured. Additionally, he is active as a Microsoft blogger and lecturer. He blogs on his own page, Datacenter-Flo.de, and the Brocade Germany community. Together with a very good friend, he founded Windows Server User Group Berlin to create a network of Microsoft IT Pros in Berlin. Florian maintains a very tight network with many vendors such as Cisco, Dell, and Microsoft and several communities. This helps him grow his experience and get the best out of a solution for his customers. Since 2016, he has also been the Co-Chairman of the Azure community Germany. In April 2016, Microsoft awarded Florian the Microsoft Most Valuable Professional for Cloud and Datacenter Management. In 2017, after joining Microsoft, Florian became an MVP reconnect member. Florian has worked for several companies and Microsoft partners such as Dell Germany, CGI Germany, and msg services ag. Now he has joined Microsoft Germany in a technical presales role and supports customers in getting started with hybrid cloud infrastructures and topics. He has also worked on the following books: Taking Control with System Center App Controller Microsoft Azure Storage Essentials Mastering Cloud Development using Microsoft Azure Mastering Microsoft Deployment Toolkit 2013 Implementing Azure Design Patterns Windows Server 2016 Cookbook Mastering Active Directory Exchange PowerShell Cookbook Implementing Azure Solutions Acknowledgments I want to thank Packt Publishing for giving me the chance to review the book as well as my employer and my family for being accommodating of the time investment I have made in this project. There is a special thanks I need to make to Virginia Dias from Packt. It is always awesome to be a reviewer on her projects, and it’s a great pleasure to work with her. www.PacktPub.com For support files and downloads related to your book, please visit www.PacktPub.com. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. https://www.packtpub.com/mapt Get the most in-demand software skills with Mapt. Mapt gives you full access to all Packt books and video courses, as well as industry-leading tools to help you plan your personal development and advance your career. Why subscribe? Fully searchable across every book published by Packt Copy and paste, print, and bookmark content On demand and accessible via a web browser Customer Feedback Thanks for purchasing this Packt book. At Packt, quality is at the heart of our editorial process. To help us improve, please leave us an honest review on this book's Amazon page at https://www.amazon.com/dp/1788390822. If you'd like to join our team of regular reviewers, you can e-mail us at [email protected]. We award our regular reviewers with free eBooks and videos in exchange for their valuable feedback. Help us be relentless in improving our products!