No executable found matching command "dotnet-lambda" on TRAVIS CI

So I use Travis CI and dotnet lambda, and below one of the stage:

  script:
    - echo "Deploy to AWS"
    - dotnet tool install --global Amazon.Lambda.Tools
    - dotnet tool update --global Amazon.Lambda.Tools
    - dotnet lambda package --configuration release --framework netcoreapp2.1 --output-package bin/release/netcoreapp2.1/deploy-package.zip

When the dotnet lambda is run:

the Error is: No executable found matching command “dotnet-lambda”

As you can see, I have installed Amazon.Lambda.Tools in the line before dotnet lambda

So I am not sure what the issue is

My guess is you need to add the directory where the tool was installed to PATH.