aws-elastic-beanstalk-cli-setup icon indicating copy to clipboard operation
aws-elastic-beanstalk-cli-setup copied to clipboard

Apparently successful installation on Windows 11 is actually completely broken on use

Open pgoldweic opened this issue 7 months ago • 9 comments

I've followed thoroughly the install instructions (including pre-requisites) for Windows in order to install this EB CLI (I've migrated to another Windows desktop, so I need it now installed there!). Specifically, I installed the following pre-requisite packages first: python via pyenv-win (version 3.13.2-win32), virtualenv via pipx (which in turn required scoop). Then I run the ebcli_installer.py as explained in the instructions (actually using Git Bash), and got success messages when running everything. Eventually I tried to use the 'eb' command and I get the following error messages no matter what it is that I try to do with it:

eb -help Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in run_code File "C:\Users\myself.ebcli-virtual-env\Scripts\eb.exe_main.py", line 4, in from ebcli.core.ebcore import main File "C:\Users\myself.ebcli-virtual-env\Lib\site-packages\ebcli\core\ebcore.py", line 35, in from ebcli.controllers.migrate import MigrateController, MigrateExploreController, MigrateCleanupController File "C:\Users\myself.ebcli-virtual-env\Lib\site-packages\ebcli\controllers\migrate.py", line 33, in clr.AddReference(r"C:\Windows\System32\inetsrv\Microsoft.Web.Administration.dll") ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ System.IO.FileNotFoundException: Unable to find assembly 'C:\Windows\System32\inetsrv\Microsoft.Web.Administration.dll'. at Python.Runtime.CLRModule.AddReference(String name)

Do you have any recommendations on how to fix this install? If I were to try with another version of python, which one should I use, and which specific commands would be needed?

pgoldweic avatar Apr 30 '25 19:04 pgoldweic

Thanks for reporting this. We've fixed it as part of 3.23.3. The problem prior to this was the EB CLI would assume that you always had Web-Administration enabled, which, of course, on non server machines was a bad expectation.

rahulrajaram avatar May 01 '25 23:05 rahulrajaram

Thanks so much @rahulrajaram for your response. Unfortunately, I've just used this specific version to get the EB CLI installed via scripts again and on typing 'eb' I get the exact same error message, so apparently it hasn't been fixed :-(.

pgoldweic avatar May 02 '25 14:05 pgoldweic

@pgoldweic , any chance you could try:

pip uninstall -y awsebcli ; pip install awsebcli==3.23.3 ; eb --help

rahulrajaram avatar May 05 '25 23:05 rahulrajaram

Thanks @rahulrajaram for writing back on this. Another AWS representative connected with me and explained that I needed to enable some of the dlls in IIS in order to have those scripts work (so I guess this is what you were getting at when mentioning 'web administration enabled' (and it certainly does work when I enable it) If I understand this correctly, this suggests that 3.23.3 is no different than prior versions in this respect then, contradicting what you said above. BTW, I did not install via pip since I wanted to get it into a virtual environment. Perhaps you are suggesting that the installer works differently than the python install scripts with respect to the 'web administration' requirement?

pgoldweic avatar May 09 '25 16:05 pgoldweic

Same her: Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in run_code File "C:\Users<user>.ebcli-virtual-env\Scripts\eb.exe_main.py", line 4, in File "C:\Users<user>.ebcli-virtual-env\Lib\site-packages\ebcli\core\ebcore.py", line 35, in from ebcli.controllers.migrate import MigrateController, MigrateExploreController, MigrateCleanupController File "C:\Users<user>.ebcli-virtual-env\Lib\site-packages\ebcli\controllers\migrate.py", line 33, in clr.AddReference(r"C:\Windows\System32\inetsrv\Microsoft.Web.Administration.dll") System.IO.FileNotFoundException: Unable to find assembly 'C:\Windows\System32\inetsrv\Microsoft.Web.Administration.dll'. at Python.Runtime.CLRModule.AddReference(String name)

### Fix: Open Control Panel and click Programs and Features > Turn Windows features on or off. Enable Internet Information Services. (Which is just dull!)

Thanks to @pgoldweic

VoodbooV avatar May 09 '25 17:05 VoodbooV

@pgoldweic You shouldn't have to enable IIS for this. I think what's happening is that your eb is still linking back to your previous EB CLI.

Have you also tried deleting: C:\Users\myself.ebcli-virtual-env\ ?

@VoodbooV

Could you try deleting C:\Users<user>.ebcli-virtual-env? and reinstalling with pip?

rahulrajaram avatar May 10 '25 22:05 rahulrajaram

Hi @rahulrajaram , that's what I was initially suspecting myself, but it doesn't make sense as an explanation because I have been deleting the virtual environment created every single time before re-installing, (so the eb command is gone with every delete).

pgoldweic avatar May 12 '25 14:05 pgoldweic

Hi, I can confirm the issue. Solved by adding Internet Information Services Management Console

andrea-avogadro-archiva avatar Jun 05 '25 10:06 andrea-avogadro-archiva

Can confirm this still does not work on Windows 11 with awsebcli 3.24.1. Only working fix is to enable IIS sadly @rahulrajaram

danjohnso avatar Jun 22 '25 15:06 danjohnso

Same her: Traceback (most recent call last): File "", line 198, in run_module_as_main File "", line 88, in run_code File "C:\Users.ebcli-virtual-env\Scripts\eb.exe__main.py", line 4, in File "C:\Users.ebcli-virtual-env\Lib\site-packages\ebcli\core\ebcore.py", line 35, in from ebcli.controllers.migrate import MigrateController, MigrateExploreController, MigrateCleanupController File "C:\Users.ebcli-virtual-env\Lib\site-packages\ebcli\controllers\migrate.py", line 33, in clr.AddReference(r"C:\Windows\System32\inetsrv\Microsoft.Web.Administration.dll") System.IO.FileNotFoundException: Unable to find assembly 'C:\Windows\System32\inetsrv\Microsoft.Web.Administration.dll'. at Python.Runtime.CLRModule.AddReference(String name)

### Fix: Open Control Panel and click Programs and Features > Turn Windows features on or off. Enable Internet Information Services. (Which is just dull!)

Thanks to @pgoldweic

^^^ can confirm that this is the solution.

I installed this on a brand new machine a few days ago following this link. No pre-existing EB CLI or Python. Still run into the problem and the solution provided works.

Thomas-Boi avatar Jun 30 '25 20:06 Thomas-Boi

Surprised they haven't been linked yet, but same issue here: https://github.com/aws/aws-elastic-beanstalk-cli/issues/551

BobDankert avatar Aug 06 '25 17:08 BobDankert

I had the same issue. Enabling Internet Information Services fixes the problem. Thank you @VoodbooV

albanassim avatar Sep 24 '25 20:09 albanassim

We've fixed this in 3.25.1 . Going forward, you shouldn't have to enable IIS. This is something you would need to do only if you want to execute eb migrate

rahulrajaram avatar Oct 01 '25 20:10 rahulrajaram