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.