Skip to content

Commit 5d20676

Browse files
authored
Use python3 to install aws-cli V1 (actions#3740)
* Starting from version 1.20 aws-cli dropped python2 support
1 parent 8f8dfb1 commit 5d20676

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

images/linux/scripts/installers/aws.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ if isUbuntu20 ; then
1515
/tmp/aws/install -i /usr/local/aws-cli -b /usr/local/bin
1616
fi
1717

18+
# The installation should be run after python3 is installed as aws-cli V1 dropped python2 support
1819
if isUbuntu16 || isUbuntu18 ; then
1920
download_with_retries "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" "/tmp" "awscli-bundle.zip"
2021
unzip -qq /tmp/awscli-bundle.zip -d /tmp
21-
/tmp/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
22+
python3 /tmp/awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
2223
fi
2324

2425
download_with_retries "https://s3.amazonaws.com/session-manager-downloads/plugin/latest/ubuntu_64bit/session-manager-plugin.deb" "/tmp" "session-manager-plugin.deb"

images/linux/ubuntu1804.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@
199199
"{{template_dir}}/scripts/installers/bicep.sh",
200200
"{{template_dir}}/scripts/installers/aliyun-cli.sh",
201201
"{{template_dir}}/scripts/installers/apache.sh",
202-
"{{template_dir}}/scripts/installers/aws.sh",
203202
"{{template_dir}}/scripts/installers/clang.sh",
204203
"{{template_dir}}/scripts/installers/swift.sh",
205204
"{{template_dir}}/scripts/installers/cmake.sh",
@@ -250,7 +249,8 @@
250249
"{{template_dir}}/scripts/installers/android.sh",
251250
"{{template_dir}}/scripts/installers/yq.sh",
252251
"{{template_dir}}/scripts/installers/pypy.sh",
253-
"{{template_dir}}/scripts/installers/python.sh"
252+
"{{template_dir}}/scripts/installers/python.sh",
253+
"{{template_dir}}/scripts/installers/aws.sh"
254254
],
255255
"environment_vars": [
256256
"HELPER_SCRIPTS={{user `helper_script_folder`}}",

0 commit comments

Comments
 (0)