Serverless Compute
An important revolution in public cloud technology—the invention of serverless computing—occurred years ago. Sure enough, serverless compute has remained a hugely important part of public cloud. Cloud customers no longer need to spin up virtual machines that they then must manage. Instead, serverless computing makes a pool of compute horsepower available to cloud users. With serverless compute, AWS guarantees reliability and performance, and customers can take advantage of subsecond billing for the compute resources they actually consume.
Lambda
AWS Lambda is an exciting alternative to EC2 instances that you must operate and maintain. Lambda provides compute resources in a fully managed (by AWS) serverless compute cloud. You send compute requirements to Lambda in a variety of different manners (such as a call from a web app), and Lambda takes care of the compute requirements for you. Subsecond metering is used for your cost calculations, so quite often Lambda is a very inexpensive way to provide the compute resources you require. It also supports many different programming languages to ease use. With Lambda, a typical workflow follows these steps:
Step 1. You upload your code to AWS Lambda.
Step 2. You set up your code to trigger from either other AWS services, HTTP endpoints, or in-app activity.
Step 3. Lambda runs your code when triggered, consuming only the resources needed. (It is important to realize that like most other AWS services, Lambda provides continuous scaling, as needed.)
Step 4. You pay for just the compute time required.
Figure 13-3 shows the creation of a Hello World function in AWS Lambda.
Figure 13-3 Creating a Hello World Function in Lambda
Elastic Beanstalk
Elastic Beanstalk provides a very quick and simple method for getting your applications into the AWS Cloud. It is actually a platform as a service (PaaS) offering. The infrastructure and platform are quickly built for you in the cloud, which enables quick deployment of your applications.
Elastic Beanstalk also reduces the ongoing management complexity of a deployment. Importantly, you maintain control of the platform. For example, if you want to scale your applications more aggressively, you have complete control.
Another great aspect to this service is that it supports a wide variety of languages and platforms, such as Go, Java SE, PHP, Python, and Node.js. Application upgrades are simple, as you just deploy them to Elastic Beanstalk as needed.
While it is easy to implement, Elastic Beanstalk is also robust. You supply the application code, and AWS provides components such as the following:
Application services
HTTP services
Required operating systems
Required language interpreters
The physical hosts required
Figure 13-4 shows the Elastic Beanstalk interface in AWS.
Figure 13-4 Elastic Beanstalk in AWS
Exam Preparation Tasks
As mentioned in the section “How to Use This Book” in the Introduction, you have a few choices for exam preparation: the exercises here, Chapter 22, “Final Preparation,” and the exam simulation questions in the Pearson Test Prep Software Online.
Review All Key Topics
Review the most important topics in this chapter, noted with the Key Topics icon in the outer margin of the page. Table 13-2 lists these key topics and the page number on which each is found.