View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017035 | CentOS-7 | Cloud-Images | public | 2020-02-11 08:30 | 2020-03-18 08:12 |
Reporter | thoris | Assigned To | |||
Priority | high | Severity | major | Reproducibility | always |
Status | assigned | Resolution | open | ||
Product Version | 7.7-1908 | ||||
Summary | 0017035: The latest AWS CentOS 7 image disappeared from search by product code in us-east-1 | ||||
Description | The current version of the official CentOS7 cloud image in the us-east-1 region of AWS is ami-02eac2c0129f6376b, however, this AMI somehow "lost" its product code some when between Feb 7 10:48 CET and Feb 10 13:29 CET. The product code is no longer listed in the web console AMI search (see attached screenshot). This breaks automated selection of the latest AMI e.g. in terraform and other API based management solutions and scripts. | ||||
Steps To Reproduce | Search with in us-east-1 for product code aw0evgkw8e5c1q413zgy5pjce: Example 1 (aws cli): aws ec2 describe-images --region us-east-1 --filter "Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce" --output json --query 'Images[*].ImageId ' [ "ami-02e98f78", "ami-46c1b650", "ami-4bf3d731", "ami-6d1c2007", "ami-9887c6e7", "ami-b81dbfc5", "ami-d5bf2caa", "ami-db48ada1" ] Expected result: ami-02eac2c0129f6376b included in result array. Example 2 (terraform) : provider "aws" { alias = "us" region = "us-east-1" } data "aws_ami_ids" "ami_lnx_centos_7_ids_us" { provider = "aws.us" owners = ["aws-marketplace"] filter { name = "product-code" values = ["aw0evgkw8e5c1q413zgy5pjce"] } filter { name = "architecture" values = ["x86_64"] } } locals { ami_lnx_centos_7_id_us = "${element(concat(data.aws_ami_ids.ami_lnx_centos_7_ids_us.ids, list("")), 0)}" } output "ami_lnx_centos_7_id_us" { value = "${local.ami_lnx_centos_7_id_us}" } output "ami_lnx_centos_7_ids_us" { value = "${data.aws_ami_ids.ami_lnx_centos_7_ids_us.ids}" } terraform apply data.aws_ami_ids.ami_lnx_centos_7_ids_us: Refreshing state... Apply complete! Resources: 0 added, 0 changed, 0 destroyed. Outputs: ami_lnx_centos_7_id_us = ami-9887c6e7 ami_lnx_centos_7_ids_us = [ ami-9887c6e7, ami-d5bf2caa, ami-b81dbfc5, ami-4bf3d731, ami-02e98f78, ami-db48ada1, ami-46c1b650, ami-6d1c2007 ] Expected result: Outputs: ami_lnx_centos_7_id_us = ami-02eac2c0129f6376b ami_lnx_centos_7_ids_us = [ ami-02eac2c0129f6376b, ami-9887c6e7, ami-d5bf2caa, ami-b81dbfc5, ami-4bf3d731, ami-02e98f78, ami-db48ada1, ami-46c1b650, ami-6d1c2007 ] | ||||
Tags | No tags attached. | ||||
abrt_hash | |||||
URL | |||||
|
|
I just had a look in us-east-1, tried to deploy an instance, search in marketplace for CentOS 7 and here is the link we have for the AMI : https://aws.amazon.com/marketplace/pp/B00O7WM7QW?ref=cns_srchrow EC2 instance was provisioned with "CentOS Linux 7 x86_64 HVM EBS ENA 1901_01-b7ee8a69-ee97-4a49-9e68-afaee216db2e-ami-05713873c6794f575.4 (ami-02eac2c0129f6376b)" |
|
Hi, thanks for looking into this! Yes, the 1901_01 AMI seems to be available in the marketplace and it is possible to deploy an instance in us-east-1 from the marketplace and from the AMI when it is searched for directly by ami id in the ec2 console. However, when you try to access it by searching for the product code (from https://wiki.centos.org/Cloud/AWS) via the AWS API it will not show up. Example in us-east-1: Search for product code aw0evgkw8e5c1q413zgy5pjce, the 1901_01 ami is missing: aws ec2 describe-images --region us-east-1 --filter "Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce" --output json --query 'Images[*].ImageId' [ "ami-02e98f78", "ami-46c1b650", "ami-4bf3d731", "ami-6d1c2007", "ami-9887c6e7", "ami-b81dbfc5", "ami-d5bf2caa", "ami-db48ada1" ] Product code id of on of the images returned by the last search: aws ec2 describe-images --region us-east-1 --filter "Name=image-id,Values=ami-02e98f78" --output json --query 'Images[*].ProductCodes[].ProductCodeId' [ "aw0evgkw8e5c1q413zgy5pjce" ] Product code id of the 1901_01 image returns empty in us-east-1: [thr@cos8-1 ~]$ aws ec2 describe-images --region us-east-1 --filter "Name=image-id,Values=ami-02eac2c0129f6376b" --output json --query 'Images[*].ProductCodes[].ProductCodeId' [] In eu-west-1 for instance, the search for product code id returns the ami id of the 1901_01 image as expected: aws ec2 describe-images --region eu-west-1 --filter "Name=product-code,Values=aw0evgkw8e5c1q413zgy5pjce" --output json --query 'Images[*].ImageId' [ "ami-061b1560", "ami-0ff760d16d9497662", "ami-192a9460", "ami-1caef165", "ami-3548444c", "ami-4c457735", "ami-5f76b626", "ami-6e28b517", "ami-7abd0209" ] and the ami-id is tagged with the product code id as expected. aws ec2 describe-images --region eu-west-1 --filter "Name=image-id,Values=ami-0ff760d16d9497662" --output json --query 'Images[*].ProductCodes[].ProductCodeId' [ "aw0evgkw8e5c1q413zgy5pjce" ] I contacted AWS support and they confirmed the problem, but told me to <quote> "As discussed the marketplace vendor must have done some changes with the mapping which we do not have visibility to product codes and control over as they are third party vendors." </quote> Thanks & best regards! |
|
Looks like someone uses this situation to start the fraud scheme. Some reddit user noticed that there are image from other company with the very same name but with hight price (subscription charge associated with them of $399 up to $23,999 depending on instance size!): Details: https://www.reddit.com/r/aws/comments/f9aruy/suspicious_centos_7_amis_on_aws_marketplace/ |
|
Hi, folks. You can work around this problem by including product-code in the lookup. You can get the product code from here: https://wiki.centos.org/Cloud/AWS Here's what it looks like in Ansible. Hopefully you are able to extrapolate from there for your needs. - name: lookup source amis ec2_ami_facts: owners: "679593333241" filters: name: "CentOS Linux 7 x86_64 HVM*" architecture: x86_64 virtualization-type: hvm root-device-type: ebs product-code: aw0evgkw8e5c1q413zgy5pjce register: source_amis Hope this helps! |
|
Hi, I see that AWS published the update CentOS 7 and CentOS 6 AMI on markeplace. Can you confirm that you can see the new one ? |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2020-02-11 08:30 | thoris | New Issue | |
2020-02-11 08:30 | thoris | File Added: ami-02eac2c0129f6376b.JPG | |
2020-02-13 06:50 | arrfab | Note Added: 0036280 | |
2020-02-13 06:54 | arrfab | Note Edited: 0036280 | |
2020-02-13 06:54 | arrfab | Status | new => feedback |
2020-02-13 08:39 | thoris | Note Added: 0036282 | |
2020-02-13 08:39 | thoris | Status | feedback => assigned |
2020-02-28 17:36 | bogdan.frankovskyi | Note Added: 0036404 | |
2020-03-13 21:11 | johnjeffers | Note Added: 0036504 | |
2020-03-18 08:12 | arrfab | Note Added: 0036529 |