cli icon indicating copy to clipboard operation
cli copied to clipboard

"fn lambda create-function ...." this command not found

Open Littermonkey opened this issue 7 years ago • 3 comments
trafficstars

How to create the docker image by run the command create-function? what should I do?

Littermonkey avatar May 09 '18 06:05 Littermonkey

Hi! have you tried aws-import:

fn lambda aws-import -h
NAME:
   fn lambda aws-import - converts an existing Lambda function to an image, where the function code is downloaded to a directory in the current working directory that has the same name as the Lambda function.

USAGE:
   fn lambda aws-import [command options] <arn> <region> <image/name>

OPTIONS:
   --payload value  Payload to pass to the Lambda function. This is usually a JSON object. (default: "{}")
   --version value  Version of the function to import. (default: "$LATEST")
   --download-only  Only download the function into a directory. Will not create a Docker image.
   --config value   function configuration

this command will import the function code from the AWS region to a directory called ./user/my-function. Inside the directory, you will find the func.yml, Dockerfile. With Dockerfile you can build an image.

If that doesn't work, let me know. Meanwhile, i recommend you to read how to import lambda function to Fn: https://github.com/fnproject/fn/tree/master/docs/lambda

denismakogon avatar May 09 '18 06:05 denismakogon

May this issue be closed?

josephholsten avatar Sep 18 '18 23:09 josephholsten

This feature was removed because was not supported well, so, yeah, let’s close this.

denismakogon avatar Sep 19 '18 00:09 denismakogon