We try to obtain the latest Ubuntu AMI ID here.
|
latest_ami_id="$(aws ec2 describe-images --owners 099720109477 --filters 'Name=name,Values=ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-????????' 'Name=state,Values=available' --output json | jq -r '.Images | sort_by(.CreationDate) | last(.[]).ImageId')" |
But this returns null (probably because the Ubuntu version we are looking for is deprecated).
We could either update the Ubuntu version (if it is safe to do so), or add the additional option --include-deprecated to fetch the AMI IDs of old Ubuntu versions.
We try to obtain the latest Ubuntu AMI ID here.
performance-common/distribution/scripts/cloudformation/cloudformation-common.sh
Line 605 in aec8493
But this returns null (probably because the Ubuntu version we are looking for is deprecated).
We could either update the Ubuntu version (if it is safe to do so), or add the additional option
--include-deprecatedto fetch the AMI IDs of old Ubuntu versions.