Learn the basics of serverless computing and how to develop event-driven architectures with the three major cloud platforms: Amazon Web Services, Microsoft Azure, and Google Cloud. This hands-on guide dives into the foundations of serverless computing, its use cases, and how to apply it using developer tools such as Node.js, Visual Studio Code, Postman, and Serverless Framework. You will apply the fundamentals of serverless technology from the ground up, and come away with a greater understanding of its power and how to make it work for you. This book teaches you how to quickly and securely develop applications without the hassle of configuring and maintaining infrastructure. You will learn how to harness serverless technology to rapidly reduce production time and minimize your costs, while still having the freedom to customize your code, without hindering functionality. Upon completion, you will have the knowledge and resources to build your own serverless application hosted in AWS, Azure, or Google Cloud and will have experienced the benefits of event-driven technology for yourself. What You'll Learn Gain a deeper understanding of serverless computing and when to use itUse development tools such as Node.js, Postman, and VS code to quickly set up your serverless development environment and produce applicationsApply triggers to your serverless functions that best suit the architecture for the problem the functions are solvingBegin building applications across cloud providers that utilize the power of serverless technologyUnderstand best development practices with serverless computing to maintain scalable and practical solutionsCode with an agnostic approach to cloud providers to minimize provider dependencyWho This Book Is ForAny developer looking to expand current knowledge of serverless computing, its applications, and how to architect serverless solutions, or someone just beginning in these areas.;Chapter 1: Understanding Serverless Computing -- Chapter 2: Getting Started -- Chapter 3: Amazon Web Services -- Chapter 4: Azure -- Chapter 5: Google Cloud -- Chapter 6: Agnostic Approach. Contents 5 About the Author 10 About the Technical Reviewer 11 Chapter 1: Understanding Serverless Computing 12 What Is Serverless Computing? 12 Serverless As an Event-Driven Computation 12 Functions as a Service (FaaS) 13 How Does Serverless Computing Work? 14 How Is It Different? 15 Development 16 Independent Processes 16 Benefits and Use Cases 17 Rapid Development and Deployment 18 Ease of Use 18 Lower Cost 18 Enhanced Scalability 18 Netflix Case Study with AWS 19 Limits to Serverless Computing 20 Control of Infrastructure 20 Long-Running Server Application 20 Vendor Lock-In 21 “Cold Start” 23 Shared Infrastructure 24 Limited Number of Testing Tools 24 Conclusion 25 Chapter 2: Getting Started 26 What Each Provider Offers 26 AWS Lambda 26 Azure Functions 28 Google Cloud Functions 30 Explore Triggers and Events 31 What Are Triggers? 31 Triggers within Cloud Providers 33 Development Options, Toolkits, SDKs 33 TypeScript with Node.JS 33 AWS SDK 35 Azure SDK 37 Google Cloud SDK 38 Developing Locally vs. Using the Console 39 Local Development 39 Deployment of Functions and Resources 39 Developing and Testing in the Cloud Console 41 The Tools 41 Installing VS Code or Choosing Your IDE 41 Node.js 41 Postman 43 Environment Setup 44 Navigating VS Code 45 Node Package Manager: What It Does and How to Use It 48 Serverless Framework 49 Organizing your Development Environment 49 Conclusion 51 Chapter 3: Amazon Web Services 52 Explore the UI 52 Navigation 53 Pricing 55 Lambda 56 Security IAM 58 IAM Console 58 Roles, Policies, and Users 59 Roles for Lambda 60 Your First Code 61 Hello World 61 Testing 63 CloudWatch 66 Environment Variables 68 What Are Environment Variables 68 Using Environment Variables in Hello World 69 HTTP Event 70 Exploring API Gateway 71 Using API Gateway as a Trigger 76 Response to Trigger 79 Storage Event 85 Amazon S3 85 Using S3 as a Trigger 86 Response to Trigger 88 Conclusion 92 Chapter 4: Azure 93 Explore the UI 93 Navigation 94 Pricing 98 Azure Functions 99 Azure Security 101 Implement Recommendations 103 Set Security Policies 104 Your First Code 105 Hello World 106 Testing 111 Application Insights 113 HTTP Events 117 Create a GitHub WebHook Trigger 117 Build Upon Our Hello World API Trigger 121 The Storage Event 127 Azure Queue Storage 127 Create the Function 128 Microsoft Azure Storage Explorer 130 Finish Our Function 133 Conclusion 138 Chapter 5: Google Cloud 139 Explore the UI 139 Navigation 141 Pricing 142 Cloud Functions 144 Security IAM 145 IAM Console 145 Roles 146 Policies 147 Your First Code 148 Hello World 149 Stackdriver Logging 151 Stage Bucket 155 HTTP Event 159 Firebase Realtime Database 161 Avoid Nesting Data 168 Flatten Data Structures 169 Create Data That Scales 169 Storage Event 170 Create our Storage Triggered Function 170 Reacting to the Triggered Event 173 Pub/Sub Event 178 What Is Google Cloud Pub/Sub? 178 Creating Our Pub/Sub Function 180 Conclusion 183 Chapter 6: An Agnostic Approach 184 Need for Agnostic Solutions 184 The Current State 184 Business Problems 188 Recommended Solution 189 Define the Approach 190 Explore the Code 195 Code and Example Using the Database 199 Conclusion 204 Index 205 Learn the basics of serverless computing and how to develop event-driven architectures with the three major cloud platforms: Amazon Web Services, Microsoft Azure, and Google Cloud. This hands-on guide dives into the foundations of serverless computing, its use cases, and how to apply it using developer tools such as Node.js, Visual Studio Code, Postman, and Serverless Framework. You will apply the fundamentals of serverless technology from the ground up, and come away with a greater understanding of its power and how to make it work for you. This book teaches you how to quickly and securely develop applications without the hassle of configuring and maintaining infrastructure. You will learn how to harness serverless technology to rapidly reduce production time and minimize your costs, while still having the freedom to customize your code, without hindering functionality. Upon completion, you will have the knowledge and resources to build your own serverless application hosted in AWS, Azure, or Google Cloud and will have experienced the benefits of event-driven technology for yourself. What You'll Learn: Gain a deeper understanding of serverless computing and when to use it Use development tools such as Node.js, Postman, and VS code to quickly set up your serverless development environment and produce applications Apply triggers to your serverless functions that best suit the architecture for the problem the functions are solving Begin building applications across cloud providers that utilize the power of serverless technology Understand best development practices with serverless computing to maintain scalable and practical solutions Code with an agnostic approach to cloud providers to minimize provider dependency This book is for any developer looking to expand current knowledge of serverless computing, its applications, and how to architect serverless solutions, or someone just beginning in these areas. Maddie Stigler is a professional developer at CapTech Ventures. She is a part of the core team for Women Who Code in Richmond, Virginia and is involved in many local Microsoft and Amazon meetups. Maddie has maintained a fascination with serverless technology from the beginning, and applies principles of serverless design and architecture both in her professional and personal work Learn the basics of serverless computing and how to develop event-driven architectures with the three major cloud platforms: Amazon Web Services, Microsoft Azure, and Google Cloud. This hands-on guide dives into the foundations of serverless computing, its use cases, and how to apply it using developer tools such as Node.js, Visual Studio Code, Postman, and Serverless Framework. You will apply the fundamentals of serverless technology from the ground up, and come away with a greater understanding of its power and how to make it work for you. This book teaches you how to quickly and securely develop applications without the hassle of configuring and maintaining infrastructure. You will learn how to harness serverless technology to rapidly reduce production time and minimize your costs, while still having the freedom to customize your code, without hindering functionality. Upon completion, you will have the knowledge and resources to build your own serverless application hosted in AWS, Azure, or Google Cloud and will have experienced the benefits of event-driven technology for yourself. What You'll Learn Gain a deeper understanding of serverless computing and when to use it Use development tools such as Node.js, Postman, and VS code to quickly set up your serverless development environment and produce applications Apply triggers to your serverless functions that best suit the architecture for the problem the functions are solving Begin building applications across cloud providers that utilize the power of serverless technology Understand best development practices with serverless computing to maintain scalable and practical solutions Code with an agnostic approach to cloud providers to minimize provider dependency Who This Book Is For Any developer looking to expand current knowledge of serverless computing, its applications, and how to architect serverless solutions, or someone just beginning in these areas Annotation Learn the basics of serverless computing and how to develop event-driven architectures with the three major cloud platforms: Amazon Web Services, Microsoft Azure, and Google Cloud. This hands-on guide dives into the foundations of serverless computing, its use cases, and how to apply it using developer tools such as Node.js, Visual Studio Code, Postman, and Serverless Framework. You will apply the fundamentals of serverless technology from the ground up, and come away with a greater understanding of its power and how to make it work for you. This book teaches you how to quickly and securely develop applications without the hassle of configuring and maintaining infrastructure. You will learn how to harness serverless technology to rapidly reduce production time and minimize your costs, while still having the freedom to customize your code, without hindering functionality Front Matter ....Pages i-xiii Understanding Serverless Computing (Maddie Stigler)....Pages 1-14 Getting Started (Maddie Stigler)....Pages 15-40 Amazon Web Services (Maddie Stigler)....Pages 41-81 Azure (Maddie Stigler)....Pages 83-128 Google Cloud (Maddie Stigler)....Pages 129-173 An Agnostic Approach (Maddie Stigler)....Pages 175-195 Back Matter ....Pages 197-199