From 1cc55a5bd221945b262686a3bbc95a2cc459d142 Mon Sep 17 00:00:00 2001 From: Dmitry Shibanov Date: Wed, 8 Jul 2020 10:30:15 +0300 Subject: [PATCH] Aws session manager for linux (#1169) * add installation aws session manager for linux * move logic to one file * change order * removed unnecessary exit * move echo line * add plugin word Co-authored-by: Dmitry Shibanov --- images/linux/scripts/installers/aws.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/images/linux/scripts/installers/aws.sh b/images/linux/scripts/installers/aws.sh index 6d5b403b8..edf9b1a5c 100644 --- a/images/linux/scripts/installers/aws.sh +++ b/images/linux/scripts/installers/aws.sh @@ -32,6 +32,17 @@ if ! command -v aws; then exit 1 fi +curl "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" -o "session-manager-plugin.deb" +sudo dpkg -i session-manager-plugin.deb + +sessionPlugin=$(session-manager-plugin) +echo "$sessionPlugin" +if ! [[ $sessionPlugin == *"was installed successfully"* ]] +then + exit 1 +fi + # Document the installed version echo "Document the installed version" DocumentInstalledItem "AWS CLI ($(aws --version 2>&1))" +DocumentInstalledItem "AWS CLI Session manager plugin ($(session-manager-plugin --version 2>&1))"