lib/aws_ec2/scripts/cloudwatch/install/ubuntu.sh in aws-ec2-1.4.4 vs lib/aws_ec2/scripts/cloudwatch/install/ubuntu.sh in aws-ec2-1.4.5
- old
+ new
@@ -2,10 +2,13 @@
# https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/QuickStartEC2Instance.html
REGION=$(curl -s 169.254.169.254/latest/meta-data/placement/availability-zone | sed s'/.$//')
-type python || apt-get install -y python-pip
+if ! type python ; then
+ apt-get update
+ apt-get install -y python-pip
+fi
# Install awslogs and the jq JSON parser
curl -s https://s3.amazonaws.com/aws-cloudwatch/downloads/latest/awslogs-agent-setup.py -O
# in order to install awslogs non-interactively we need a filler configfile