From a0e0a6ba54eda8832d77ddc6249d945024c4fc10 Mon Sep 17 00:00:00 2001 From: hwdsl2 Date: Thu, 27 Aug 2020 22:47:46 -0500 Subject: [PATCH] Update AWS template - Filter AMIs using official Ubuntu and Debian AWS account IDs - Change Debian AMI names back to using wildcards - Closes: #841 --- aws/cloudformation-template-ipsec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aws/cloudformation-template-ipsec b/aws/cloudformation-template-ipsec index ed7869b..9fd5211 100644 --- a/aws/cloudformation-template-ipsec +++ b/aws/cloudformation-template-ipsec @@ -584,10 +584,10 @@ " elif distribution == 'Ubuntu20.04':", " IAMName = 'ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-*'", " elif distribution == 'Debian9':", - " IAMName = 'debian-stretch-hvm-x86_64-gp2-2020-07-20-58035'", + " IAMName = 'debian-stretch-hvm-x86_64-gp2-*'", " elif distribution == 'Debian10':", - " IAMName = 'debian-10-amd64-20200803-347'", - " response = ec2.describe_images(Filters=[{'Name':'name', 'Values':[IAMName]}])", + " IAMName = 'debian-10-amd64-*'", + " response = ec2.describe_images(Filters=[{'Name':'name', 'Values':[IAMName]}], Owners=['099720109477', '136693071363', '379101102735'])", " images = response['Images']", " images.sort(key=creation_date,reverse=True)", " AMIId = images[0]['ImageId']",