Closed macfarmw closed 2 years ago
I reviewed the source code for the installer. The VERBOSE message about deleting the temp folder happens in a finally block after the error. It's not clear if the installer is deleting the files before they are read or if the files were never downloaded. I ran the installer again and I could see that it created a new temp folder. The folder was present for a couple of seconds so I could open it, but when I did it was empty. I'm not certain if the files were downloaded and deleted before I could see them or if they were just never downloaded at all.
I repeated this test a few times and even if I open the folder very quickly after it appears the .nupkg file never appears. It looks like the file is not being downloaded at all. I'm checking with our infrastructure team to see of one of the security tools is blocking the download.
Hi @macfarmw,
Good morning.
Thanks for reporting the issue. Based on your comment, please check with your infrastructure team if security tools is blocking the download. Also noticed that you already launched Windows PowerShell as Administrator. I have tried using Install-AWSToolsModule
several times and have not seen this kind of error (though there are weird errors with Windows PowerShell, not seen on PowerShell 7.x).
Thanks, Ashish
Hi @ashishdhingra
We disabled the security software but that did not make any difference. Yesterday I tried running this same installation with PowerShell 7 and it works fine on this same server. The scripts running under 5.1 can't load the modules installed under PS 7 by default so I abandoned that approach. We're not ready to move our modules over the PS 7 quite yet.
Since there does not appear to be a simple way to fix this we will abandon attempts to use AWS.Tools.* for now and try calling the AWS CLI from our scripts. It's not ideal but we have move on with the project.
Hi @macfarmw,
Thanks for your response. I have seen issues with Windows PowerShell 5.1 which subsequently self resolve by itself. Not sure the root cause, may be Windows PowerShell rebuilds it's cache and could not load modules due to incorrect directory naming initially. Unfortunately, these issues with Windows PowerShell is beyond control of AWS PowerShell tools installer. Does using Install-Module
directly works?
Thanks, Ashish
It seemed to work better with Install-Module
but then the Get-SECSecretValue
function fails with an HttpResponse error. I was hoping that if I could install the modules with Install-AWSToolsModule
that it would fix that issue. I also tried downloading the zip file and copying AWS.Tools.Common and AWS.Tools.SecretsManager into the Modules folder. With that method I had to go into the folder and unblock the dlls so that could use Import-Module
. Even then Get-SECSecretValue
still fails. I'm hoping that with the CLI it will work better. I'll be trying that later today.
@macfarmw Closing this issue since we cannot reproduce it at our end. Feel free to open a new issue in case of any issue.
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
FWIW, @ashishdhingra I'm able to reproduce this issue when trying to install AWS-Tools-S3
.
Running Install-Module
does not help resolve the lack of installation issue, either.
Description
I am unable to install AWS.Tools.SecretsManager with the Install-AWSToolsModule command. It ends up trying to load a .nupkg file from a temp file location after the temp file has been deleted.
Reproduction Steps
Install-Module AWS.Tools.Installer -Force -Repository PSGallery -Scope AllUsers
Install-AWSToolsModule AWS.Tools.SecretsManager -RequiredVersion 4.1.13 -Scope AllUsers -CleanUp -Verbose -AllowClobber
Results
Logs
Environment
Resolution
According the VERBOSE output the installer deletes the folder C:\Users\mmacfarland\AppData\Local\Temp\9\2u5nzoz1.g0m but it also tries to load C:\Users\mmacfarland\AppData\Local\Temp\9\2u5nzoz1.g0m\AWS.Tools.SecretsManager.4.1.13.0.nupkg from that same folder. It appears from this output that the delete is happening too soon.
This is a :bug: bug-report