Skip to Content
Building Serverless Applications with Python
book

Building Serverless Applications with Python

by Jalem Raj Rohit
April 2018
Intermediate to advanced content levelIntermediate to advanced
272 pages
4h 52m
English
Packt Publishing
Content preview from Building Serverless Applications with Python

CloudFormation for serverless services

In this section, we will learn how CloudFormation can be used to build and deploy Lambda functions. We will do the following:

  1. We will write a CloudFormation template for a Lambda function that periodically pings a website and gives an error if there is any failure in the process. The CloudFormation template for this is as follows:
AWSTemplateFormatVersion: '2010-09-09'Transform: 'AWS::Serverless-2016-10-31'Description: 'Performs a periodic check of the given site, erroring out on test failure.'Resources:lambdacanary:    Type: 'AWS::Serverless::Function'    Properties:        Handler: lambda_function.lambda_handler        Runtime: python2.7        CodeUri: .        Description: >-            Performs a periodic check of the given site, erroring ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Serverless Microservices in Python

Building Serverless Microservices in Python

Richard Takashi Freeman

Publisher Resources

ISBN: 9781787288676Other