diff --git a/images/win/Windows2016-Azure.json b/images/win/Windows2016-Azure.json index 8732a9fb..55a1e611 100644 --- a/images/win/Windows2016-Azure.json +++ b/images/win/Windows2016-Azure.json @@ -454,6 +454,12 @@ "{{ template_dir }}/scripts/Installers/Install-AWS.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-AWS-SAM.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -615,6 +621,12 @@ "{{ template_dir }}/scripts/Installers/Validate-AzureCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-AWS-SAM.ps1" + ] + }, { "type": "powershell", "scripts":[ diff --git a/images/win/Windows2019-Azure.json b/images/win/Windows2019-Azure.json index e66147fc..ab28c810 100644 --- a/images/win/Windows2019-Azure.json +++ b/images/win/Windows2019-Azure.json @@ -433,6 +433,12 @@ "{{ template_dir }}/scripts/Installers/Install-AWS.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Install-AWS-SAM.ps1" + ] + }, { "type": "powershell", "scripts":[ @@ -612,6 +618,12 @@ "{{ template_dir }}/scripts/Installers/Validate-AzureCli.ps1" ] }, + { + "type": "powershell", + "scripts":[ + "{{ template_dir }}/scripts/Installers/Validate-AWS-SAM.ps1" + ] + }, { "type": "powershell", "scripts":[ diff --git a/images/win/scripts/Installers/Install-AWS-SAM.ps1 b/images/win/scripts/Installers/Install-AWS-SAM.ps1 new file mode 100644 index 00000000..e94d7bd5 --- /dev/null +++ b/images/win/scripts/Installers/Install-AWS-SAM.ps1 @@ -0,0 +1,7 @@ +################################################################################ +## File: Install-AWS-SAM.ps1 +## Desc: Install aws sam cli +## https://aws.amazon.com/serverless/sam/ +################################################################################ + +Install-MSI -MsiUrl "https://github.com/awslabs/aws-sam-cli/releases/latest/download/AWS_SAM_CLI_64_PY3.msi" -MsiName "AWS_SAM_CLI_64_PY3.msi" \ No newline at end of file diff --git a/images/win/scripts/Installers/Validate-AWS-SAM.ps1 b/images/win/scripts/Installers/Validate-AWS-SAM.ps1 new file mode 100644 index 00000000..d953229d --- /dev/null +++ b/images/win/scripts/Installers/Validate-AWS-SAM.ps1 @@ -0,0 +1,27 @@ +################################################################################ +## File: Validate-AWS-SAM.ps1 +## Desc: Validate aws sam cli +################################################################################ + +$command = Get-Command -Name 'sam' + +if ($command) +{ + Write-Host "AWS SAM CLI on path" +} +else +{ + Write-Host 'AWS SAM CLI is not on path' + exit 1 +} + +# Adding description of the software to Markdown +$SoftwareName = "AWS SAM CLI" + +$version = (sam --version).Split(" ")[3] + +$Description = @" +_Version:_ $version
+"@ + +Add-SoftwareDetailsToMarkdown -SoftwareName $SoftwareName -DescriptionMarkdown $Description \ No newline at end of file