Tim-B / grunt-aws-lambda

A grunt plugin to assist in developing functions for AWS Lambda.
MIT License
247 stars 100 forks source link

Missing required key 'FunctionName' in params #84

Open benbowler opened 8 years ago

benbowler commented 8 years ago

Running "lambda_deploy:prod" (lambda_deploy) task

AWS API request failed with undefined - MissingRequiredParameter: Missing required key 'FunctionName' in params

I've set the function option but I can't seem to avoid this message deploying to Lambda. Have there been API updates?

Here's my full conf.

    // Lambda
    lambda_invoke: {
        default: {
        }
    },
    lambda_deploy: {
        default: {
            options: {
                // aliases: 'prod',
                // enableVersioning: true
            },
            function: '<%= aws.AWSLambdaFunctionName =>',
            arn: '<%= aws.AWSLambdaARN %>'
        }
        // prod: {
        //     options: {
        //         aliases: 'prod',
        //         enableVersioning: true
        //     },
        //     arn: '<%= aws.AWSLambdaARN %>'
        // }
    },
    lambda_package: {
        default: {
        },
        prod: {
        }
    }
  });
akwasin commented 6 years ago

@ben Did you find a solution to this issue ?

Edit: The solution is to add necessary key value pair to the Environment variables in your specific Lambda configuration inside AWS.