skip to Main Content

My version of vscode is 1.69.0 and my version of sam is 1.53.0. I have this error here and just wanted to know which environment is being referred to?

2022-08-01 14:38:50 [INFO]: Preparing to debug locally: Lambda ""
2022-08-01 14:38:50 [INFO]: Building SAM application...
2022-08-01 14:38:50 [INFO]: Command: (not started) [/usr/local/bin/sam build --build-dir /tmp/aws-toolkit-vscode/vsctkG9KjVg/output --template /Users/user/directory/repository/file.yaml]
2022-08-01 14:38:52 [INFO]: Building codeuri: /Users/user/directory/repository/src/folder runtime: dotnet6 metadata: {} architecture: x86_64 functions: xfer

2022-08-01 14:38:52 [INFO]: 
Build Failed

2022-08-01 14:38:52 [INFO]: Error: DotnetCliPackageBuilder:Resolver - No dotnet cli executable found!

2022-08-01 14:38:52 [WARN]: "sam build" failed: /Users/user/directory/repository/file.yaml

2

Answers


  1. Chosen as BEST ANSWER

    I found the solution. You have to run the following to symlink it:

    ln -s /usr/local/share/dotnet/dotnet /usr/local/bin
    

  2. By default, the sam build step is performed on the local (host) machine, not in the Docker container.

    If you set the containerBuild option (see documentation), then the sam build step is performed in the Docker container.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search