Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sam commands in codecatalyst dev env may fail if they inherit the local setting #4640

Open
justinmk3 opened this issue Apr 4, 2024 · 0 comments
Labels
bug We can reproduce the issue and confirmed it is a bug. remote-execute SSM, remote-ssh, CodeCatalyst dev env sam service:codecatalyst settings

Comments

@justinmk3
Copy link
Contributor

justinmk3 commented Apr 4, 2024

Problem

sam cli commands fail in codecatalyst remote dev envs if the aws.samcli.location setting is set in "user" settings (i.e. on the local machine).

Steps to reproduce the issue

  1. set aws.samcli.location to something on the local vscode settings (aka "User" settings).
    • note: must be different than /usr/local/bin/sam
  2. open a codecatalyst dev env
  3. run the AWS: Create Lambda SAM Application command
  4. the command fails:
    2024-04-04 21:42:46 [INFO]: SAM CLI location (from settings): /opt/homebrew/bin/sam
    2024-04-04 21:42:46 [ERROR]: Error creating new SAM Application. Check the logs by running the "View AWS Toolkit Logs" command from the Command Palette.
    2024-04-04 21:42:46 [ERROR]: Error creating new SAM Application: 'Error: SAM CLI has an invalid version [InvalidSamCliVersion]'
    

Expected behavior

When running in a remote context (vscode remote-ssh), sam functionality in the Toolkit should ignore the "User" scoped aws.samcli.location setting inherited from the local machine. Because the local machine path is usually not valid for a remote machine.

Proposal

  • Declare aws.samcli.location with a different scope?
  • When running in a remote context, ignore aws.samcli.location inherited from "User"/Global scope.
@justinmk3 justinmk3 added bug We can reproduce the issue and confirmed it is a bug. sam service:codecatalyst settings remote-execute SSM, remote-ssh, CodeCatalyst dev env labels Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug We can reproduce the issue and confirmed it is a bug. remote-execute SSM, remote-ssh, CodeCatalyst dev env sam service:codecatalyst settings
Projects
None yet
Development

No branches or pull requests

1 participant