cli
cli copied to clipboard
"fn lambda create-function ...." this command not found
How to create the docker image by run the command create-function? what should I do?
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
May this issue be closed?
This feature was removed because was not supported well, so, yeah, let’s close this.