diff --git a/images/linux/scripts/installers/aws.sh b/images/linux/scripts/installers/aws.sh index 5bfab832c..337569dba 100644 --- a/images/linux/scripts/installers/aws.sh +++ b/images/linux/scripts/installers/aws.sh @@ -15,10 +15,11 @@ if isUbuntu20 ; then /tmp/aws/install -i /usr/local/aws-cli -b /usr/local/bin fi +# The installation should be run after python3 is installed as aws-cli V1 dropped python2 support if isUbuntu16 || isUbuntu18 ; then download_with_retries "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" "/tmp" "awscli-bundle.zip" unzip -qq /tmp/awscli-bundle.zip -d /tmp - /tmp/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws + python3 /tmp/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws fi download_with_retries "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" "/tmp" "session-manager-plugin.deb" diff --git a/images/linux/ubuntu1804.json b/images/linux/ubuntu1804.json index a91430fd9..6841b6180 100644 --- a/images/linux/ubuntu1804.json +++ b/images/linux/ubuntu1804.json @@ -199,7 +199,6 @@ "{{template_dir}}/scripts/installers/bicep.sh", "{{template_dir}}/scripts/installers/aliyun-cli.sh", "{{template_dir}}/scripts/installers/apache.sh", - "{{template_dir}}/scripts/installers/aws.sh", "{{template_dir}}/scripts/installers/clang.sh", "{{template_dir}}/scripts/installers/swift.sh", "{{template_dir}}/scripts/installers/cmake.sh", @@ -250,7 +249,8 @@ "{{template_dir}}/scripts/installers/android.sh", "{{template_dir}}/scripts/installers/yq.sh", "{{template_dir}}/scripts/installers/pypy.sh", - "{{template_dir}}/scripts/installers/python.sh" + "{{template_dir}}/scripts/installers/python.sh", + "{{template_dir}}/scripts/installers/aws.sh" ], "environment_vars": [ "HELPER_SCRIPTS={{user `helper_script_folder`}}",