Building Serverless Web Applications
上QQ阅读APP看书,第一时间看更新

Amazon Web Services

AWS is the largest cloud vendor in terms of revenues. Often considered the best with regards to features, it offers great serverless products. This is why we have chosen AWS. If you prefer to use another cloud vendor, the following providers are other great options for serverless:

  • Google Cloud Engine: This is where you can use Google Cloud Functions for serverless code execution with Node.js, and Google Cloud Datastore as a serverless database. Also, Google has integrated the Firebase platform, which offers many tools and serverless services for mobile and web applications like storage, authentication, and messaging.
  • Microsoft Azure: This offers Azure Functions for serverless code execution, supporting C#, Node.js, Python, and PHP.
  • IBM Cloud: This offers IBM Bluemix OpenWhisk for serverless code execution, supporting C#, Node.js, Java, and Swift.

All code examples in this book were designed for AWS using Node.js. They can be ported to other clouds, but this won't be an easy task. As previously stated in Chapter 1, Understanding the Serverless Model, one of the disadvantages of serverless is the vendor lock-in. However, you can use this book to learn the concepts and maybe mix services from different vendors. For example, you could use Azure Functions with Amazon SimpleDB.

If you are just starting with AWS and don't have any previous experience, that's not a problem since we'll start right from the basics. You can start by creating a new account at https://aws.amazon.com. For 12 months, you benefit from a free tier (https://aws.amazon.com/free) that is designed to enable you to learn and get hands-on experience for free while building demo applications. There are also some services that offer a permanent free tier that goes beyond the 12 months period.

The next sections will cover a selection of services that will be used in this book. Note that AWS has an official categorization of products (https://aws.amazon.com/products) that is different from this book's categories. This is because, instead of grouping services in their main field of application, we are grouping them based on how they will be used in our use case. For example, the IoT service will be used for notifications and not to connect devices. Also, Cognito is commonly used in mobile applications, but we will use its security features for a website:

  • Security services
    • AWS IAM
    • Amazon Cognito
  • Management
    • AWS SDKs
    • AWS CLI
    • AWS CloudFormation
    • Amazon CloudWatch
  • Frontend services
    • Amazon S3
    • Amazon Route 53
    • Amazon CloudFront
    • AWS Certificate Manager
  • Messaging and notifications
    • Amazon SNS
    • AWS IoT
  • Backend services
    • AWS Lambda
    • Amazon API Gateway
  • Database services
    • Amazon SimpleDB
    • Amazon DynamoDB