He instalado aws cli usando un script de powershell
$command = "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12" Invoke-Expression $command Invoke-WebRequest -Uri "https://awscli.amazonaws.com/AWSCLIV2.msi" -Outfile C:\AWSCLIV2.msi $arguments = "/i `"C:\AWSCLIV2.msi`" /quiet" Start-Process msiexec.exe -ArgumentList $arguments -Wait aws --version Cuando trato de imprimir aws --version da el siguiente error.
aws : The term 'aws' 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. At line:1 char:1 + aws + ~~~Pude solucionar esto agregando la siguiente línea después de instalar aws cli:
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine")código completo:
$command = "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12" Invoke-Expression $command Invoke-WebRequest -Uri "https://awscli.amazonaws.com/AWSCLIV2.msi" -Outfile C:\AWSCLIV2.msi $arguments = "/i `"C:\AWSCLIV2.msi`" /quiet" Start-Process msiexec.exe -ArgumentList $arguments -Wait $env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") aws --version aws s3 ls