22# ###############################################################################
33# # File: aws.sh
44# # Desc: Installs the AWS CLI, Session Manager plugin for the AWS CLI, and AWS SAM CLI
5+ # # Supply chain security: AWS SAM CLI - checksum validation
56# ###############################################################################
67
78# Source the helpers for use with the script
@@ -15,11 +16,16 @@ unzip -qq /tmp/awscliv2.zip -d /tmp
1516download_with_retries " https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" " /tmp" " session-manager-plugin.deb"
1617apt install /tmp/session-manager-plugin.deb
1718
18- # Download & install the latest aws sam cli release
19- zipName=" aws-sam-cli-linux-x86_64.zip"
20- zipUrl=" https://github.com/aws/aws-sam-cli/releases/latest/download/${zipName} "
21- download_with_retries $zipUrl " /tmp" $zipName
22- unzip /tmp/${zipName} -d /tmp
19+ # Download the latest aws sam cli release
20+ aws_sam_cli_zip_name=" aws-sam-cli-linux-x86_64.zip"
21+ download_with_retries " https://github.com/aws/aws-sam-cli/releases/latest/download/${aws_sam_cli_zip_name} " " /tmp" $aws_sam_cli_zip_name
22+
23+ # Supply chain security - AWS SAM CLI
24+ aws_sam_cli_hash=$( get_github_package_hash " aws" " aws-sam-cli" " ${aws_sam_cli_zip_name} .. " )
25+ use_checksum_comparison " /tmp/${aws_sam_cli_zip_name} " " $aws_sam_cli_hash "
26+
27+ # Install the latest aws sam cli release
28+ unzip /tmp/${aws_sam_cli_zip_name} -d /tmp
2329/tmp/install
2430
2531invoke_tests " CLI.Tools" " AWS"
0 commit comments