AWS Lambda
Developer Guide

Managing AWS Lambda Functions

A function is a resource that you can invoke to run your code in AWS Lambda. A function has code that processes events, and a runtime that passes requests and responses between Lambda and the function code. You provide the code, and you can use of the provided runtimes or create your own.

You can author functions in the Lambda console, or with an IDE toolkit, command line tools, or SDKs. The Lambda console provides a code editor for non-compiled languages that lets you modify and test code quickly. The AWS CLI gives you direct access to the Lambda API for advanced configuration and automation use cases.

Your function's code consists of scripts or compiled programs and their dependencies. When you author functions in the Lambda console or a toolkit, the client creates a ZIP archive of your code called a deployment package and sends it to the Lambda service. When you manage functions with the Lambda API, command line tools, or SDKs, you create the deployment package. You also need to create a deployment package manually for compiled languages and to add dependencies to your function.

Authoring specific vary between runtimes, but all runtimes share a common programming model that defines the interface between your code and the runtime code. You tell the runtime which method to run by defining a handler in the function configuration, and the runtime runs that method. The runtime passes in objects to the handler that contain the invocation event, and context such as the function name and request ID.

For a hands-on introduction to these concepts in your preferred programming language, see the following chapters.