add installation aws session manager for windows

This commit is contained in:
Dmitry Shibanov
2020-07-03 12:45:39 +03:00
parent f6f93dad71
commit c7a98685ab
4 changed files with 47 additions and 0 deletions

View File

@@ -509,6 +509,12 @@
"{{ template_dir }}/scripts/Installers/Install-AWS-SAM.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-AWS-CLI-SM.ps1"
]
},
{
"type": "powershell",
"scripts":[
@@ -707,6 +713,12 @@
"{{ template_dir }}/scripts/Installers/Validate-AWS-SAM.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-AWS-CLI-SM.ps1"
]
},
{
"type": "powershell",
"scripts":[

View File

@@ -476,6 +476,12 @@
"{{ template_dir }}/scripts/Installers/Install-AWS-SAM.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Install-AWS-CLI-SM.ps1"
]
},
{
"type": "powershell",
"scripts":[
@@ -692,6 +698,12 @@
"{{ template_dir }}/scripts/Installers/Validate-AWS-SAM.ps1"
]
},
{
"type": "powershell",
"scripts":[
"{{ template_dir }}/scripts/Installers/Validate-AWS-CLI-SM.ps1"
]
},
{
"type": "powershell",
"scripts":[

View File

@@ -0,0 +1,9 @@
################################################################################
## File: Install-AWS-CLI-SM.ps1
## Desc: Install AWS CLI Session Manager
################################################################################
$sessionManagerName = "SessionManagerPluginSetup.exe"
$sessionManagerUrl = "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/windows/$sessionManagerName"
Install-Binary -Url $sessionManagerUrl -Name $sessionManagerName -ArgumentList ("/silent", "/install")
Add-MachinePathItem -PathItem "C:\Program Files\Amazon\SessionManagerPlugin\bin"

View File

@@ -0,0 +1,14 @@
################################################################################
## File: Validate-AWS-CLI-SM.ps1
## Desc: Validate aws cli session manager
################################################################################
$sessionMessage = session-manager-plugin
if ($sessionMessage -Match "*plugin was installed successfully*") {
Write-Host "$sessionMessage"
exit 0
} else {
Write-Host "$sessionMessage"
exit 1
}