I’ve zipped up my “AwsSamCli” folder and uploaded it as a package to Octopus.
I included the package in my step and I can verify via logs it’s downloading and unzipping the AWSSAMCLI package.
However, I’m still not able to invoke sam.cmd
When my script contains the below line, I receive the error:
& “AWSSAMCLI\bin\sam.cmd” --help
The module 'AWSSAMCLI' could not be loaded. For more information, run 'Import-Module AWSSAMCLI'.
I then tried the below command and received the error.
& “.\AWSSAMCLI\bin\sam.cmd” --help
The term '.\AWSSAMCLI\bin\sam.cmd' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
I’m using the Cloud Hosted version of Octopus Server. I can see from the logs that the AWSSAMCLI package is being unzipped and it exists. I’m confused why the PowerShell script isn’t recognizing sam.cmd.
Thanks.