lumigo-io / lumigo-CLI

Open source CLI tool to help you develop and manage serverless applications.
https://lumigo.io
Apache License 2.0
331 stars 21 forks source link

powertune-lambda returns only functionName #78

Open dobeerman7 opened 4 years ago

dobeerman7 commented 4 years ago

I was trying to tune my lambda, but faced the execution problem:

$ lumigo-cli powertune-lambda -n xxx-dev-xxx -r eu-central-1 -s cost -i 10
checking the aws-lambda-power-tuning SAR in [eu-central-1]
the latest version of aws-lambda-power-tuning SAR is 3.2.4
looking for deployed CloudFormation stack [serverlessrepo-lumigo-cli-powertuning-lambda] in [eu-central-1]
stack is deployed and up-to-date
the State Machine is arn:aws:states:eu-central-1:xxxxxxxxxxxx:stateMachine:powerTuningStateMachine-IVMxiPxxxxxx
State Machine execution started
execution ARN is arn:aws:states:eu-central-1:xxxxxxxxxxx:execution:powerTuningStateMachine-IVMxiPxxxxxx:9db4e1d2-642d-43ae-b02f-94037dee8079
........
{
  "functionName": "xxx-dev-xxx"
}

Any suggestions?

theburningmonk commented 4 years ago

@dobeerman7 I think the step function has silently failed, can you pop into the Step Functions console and have a look at the execution?

dobeerman7 commented 4 years ago

@theburningmonk state machine execution was successful, but the following error:

{
  "lambdaARN": "arn:aws:lambda:eu-central-1:xxxxxxxxxxx:function:xxx-dev-xxx",
  "num": 10,
  "payload": "{}",
  "parallelInvocation": false,
  "strategy": "cost",
  "powerValues": [
    "128",
    "256",
    "512",
    "1024",
    "1536",
    "3008"
  ],
  "error": {
    "Error": "ResourceNotFoundException",
    "Cause": "{\"errorType\":\"ResourceNotFoundException\",\"errorMessage\":\"Function not found: arn:aws:lambda:eu-central-1:xxxxxxxxxxxx:function:xxx-dev-xxx:RAM1024\",\"trace\":[\"ResourceNotFoundException: Function not found: arn:aws:lambda:eu-central-1:xxxxxxxxxxxx:function:xxx-dev-xxx:RAM1024\",\"    at Object.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:51:27)\",\"    at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/rest_json.js:55:8)\",\"    at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20)\",\"    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10)\",\"    at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14)\",\"    at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10)\",\"    at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12)\",\"    at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10\",\"    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9)\",\"    at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)\"]}"
  }
}

But, I might confirm, function was executed successfully, coz I surprisingly found 1k results of execution on another service :)

ninaraminelli commented 4 years ago

@theburningmonk @dobeerman7

I have exactly the same issue. How did you solve it? { "error": "ResourceNotFoundException", "cause": { "errorType": "ResourceNotFoundException", "errorMessage": "Function not found: arn:aws:lambda:eu-west-1:xxxxxxxxxxx:function:lambda-xyz:RAM1024",

jlarmstrongiv commented 3 years ago

@ninaraminelli were you able to find a solution? I ran into the same issue