【以下的问题经过翻译处理】 为什么对于标准的Amazon Linux 2 AMI ami-03af6a70ccd8cb578(“amzn2-ami-kernel-5.10-hvm-2.0.20211201.0-x86_64-gp2”),aws ec2 describe-images --image-ids ami-03af6a70ccd8cb578
正常工作并显示:
{
"Images": [
{
"Architecture": "x86_64",
"CreationDate": "2021-12-01T20:06:29.000Z",
"ImageId": "ami-03af6a70ccd8cb578",
"ImageLocation": "amazon/amzn2-ami-kernel-5.10-hvm-2.0.20211201.0-x86_64-gp2",
"ImageType": "machine",
"Public": true,
"OwnerId": "137112412989",
"PlatformDetails": "Linux/UNIX",
"UsageOperation": "RunInstances",
"State": "available",
"BlockDeviceMappings": [
{
"DeviceName": "/dev/xvda",
"Ebs": {
"DeleteOnTermination": true,
"SnapshotId": "snap-0d3c07fe7b24df1b8",
"VolumeSize": 8,
"VolumeType": "gp2",
"Encrypted": false
}
}
],
"Description": "Amazon Linux 2 Kernel 5.10 AMI 2.0.20211201.0 x86_64 HVM gp2",
"EnaSupport": true,
"Hypervisor": "xen",
"ImageOwnerAlias": "amazon",
"Name": "amzn2-ami-kernel-5.10-hvm-2.0.20211201.0-x86_64-gp2",
"RootDeviceName": "/dev/xvda",
"RootDeviceType": "ebs",
"SriovNetSupport": "simple",
"VirtualizationType": "hvm"
}
]
}
但执行这个操作:
aws ec2 export-image --image-id 'ami-03af6a70ccd8cb578' --disk-image-format VMDK --s3-export-location S3Bucket=XXX,S3Prefix=exports/
抛出:
An error occurred (InvalidParameter) when calling the ExportImage operation: The image ID (ami-03af6a70ccd8cb578) provided does not exist. Please make sure the ID is correct.