Step 2.3: Create a Lambda
Function

Execute the following Lambda CLI create-function command to create a
Lambda function. You provide the deployment package and IAM role ARN as parameters.
Note that the Runtime parameter uses nodejs6.10 but you can also specify nodejs4.3.

Optionally, you can upload the .zip file to an
Amazon S3 bucket in the same AWS region, and then specify the bucket and
object name in the preceding command. You need to replace the
--zip-file parameter by the --code
parameter, as shown following:

Copy

--code S3Bucket=bucket-name,S3Key=zip-file-object-key

For more information, see CreateFunction. AWS Lambda creates the function and returns
function configuration information as shown in the following example: