It is a really small fix but it took me some time to figure this out. The error I was getting is:
Running "lambda_deploy:default" (lambda_deploy) task
Warning: Unable to find lambda function arn:aws:lambda:eu-west-1:<redacted>:function:<redacted>, verify the lambda function name and AWS region are correct. Use --force to continue.
In my grunt file I have had added the following snippet to the initConfig
The docs specify other option as optional "if the ARN is provided"
Specify the AWS region your functions will be uploaded to. Note that if an ARN is supplied this option is not required.
At last I started looking through the code to see what is happening and realised that if I don't specify region in the options, it is being extracted from the ARN, but a little bit too late.
I'm moving it below couple line, so that it works in both cases - either region provided by options or extracted from ARN.
There is already pull request fixing this #74. I missed it checking initially: I guess I was looking through reported issues, and forgot to see if a PR fixing this is already in place.
It is a really small fix but it took me some time to figure this out. The error I was getting is:
In my grunt file I have had added the following snippet to the
initConfig
The docs specify other option as optional "if the ARN is provided"
At last I started looking through the code to see what is happening and realised that if I don't specify region in the options, it is being extracted from the ARN, but a little bit too late.
I'm moving it below couple line, so that it works in both cases - either region provided by options or extracted from ARN.