Book Image

Ansible 2 Cloud Automation Cookbook

By : Aditya Patawari, Vikas Aggarwal
Book Image

Ansible 2 Cloud Automation Cookbook

By: Aditya Patawari, Vikas Aggarwal

Overview of this book

Ansible has a large collection of inbuilt modules to manage various cloud resources. The book begins with the concepts needed to safeguard your credentials and explain how you interact with cloud providers to manage resources. Each chapter begins with an introduction and prerequisites to use the right modules to manage a given cloud provider. Learn about Amazon Web Services, Google Cloud, Microsoft Azure, and other providers. Each chapter shows you how to create basic computing resources, which you can then use to deploy an application. Finally, you will be able to deploy a sample application to demonstrate various usage patterns and utilities of resources.
Table of Contents (11 chapters)

Managing Lambda

AWS Lambda is a serverless compute service, also known as function as a service, which can be invoked in response to events. AWS Lambda functions can be invoked for various events generated by multiple AWS services, such as the creation of an S3 object, running an EC2 instance, or receiving HTTP requests through an Amazon API gateway. AWS Lambda currently supports many popular programming languages, such as Java, Node.js, C#, and Python. AWS Lambda also lets us control various platform parameters, such as the allowed execution time, memory utilization, and environment variables.

In this recipe, we will be creating a lambda function that will print Hello World on its execution. To keep this task simple, we will be executing a lambda function using the Ansible module execute_lambda.

...