Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services “我为什么要这样做?”;磁盘验证失败[S3源位置无效]”;“边做边做”;aws ec2导入图像;?_Amazon Web Services_Amazon S3_Amazon Ec2 - Fatal编程技术网

Amazon web services “我为什么要这样做?”;磁盘验证失败[S3源位置无效]”;“边做边做”;aws ec2导入图像;?

Amazon web services “我为什么要这样做?”;磁盘验证失败[S3源位置无效]”;“边做边做”;aws ec2导入图像;?,amazon-web-services,amazon-s3,amazon-ec2,Amazon Web Services,Amazon S3,Amazon Ec2,我正在尝试将VM导入ec2。 mycontainers.json文件 [ { "Description": "Cloudera task", "Format": "ova", "UserBucket": { "S3Bucket": "cdh-5.5.0.0-sandbox", "S3Key": "cloudera-quickstart-vm-5.5.0-0-virtualbox.ova" } } ] 我的命令是: aws ec2 import-im

我正在尝试将VM导入ec2。 mycontainers.json文件

[
 {
   "Description": "Cloudera task",
   "Format": "ova",
   "UserBucket": {
    "S3Bucket": "cdh-5.5.0.0-sandbox",
    "S3Key": "cloudera-quickstart-vm-5.5.0-0-virtualbox.ova"
    }
 }
]
我的命令是:

aws ec2 import-image --description "Cloudera Sandbox" --disk-containers file://containers-cdh.json
然而,我的导入任务失败了

"StatusMessage": "ClientError: Disk validation failed [Invalid S3 source location]"
  • s3存储桶和我的默认CLI设置位于同一位置
  • ova文件已上载到s3存储桶
  • S3Key是s3存储桶中.ova文件的文件名

此错误可能是由于s3存储桶名称无效造成的。s3存储桶名称不应包含连字符。

您确定存储桶名称正确吗?水桶存在吗?可以运行CLI命令吗
aws s3 ls s3://cdh-5.5.0.0-sandbox
?它会给你一个线索

命令语法或Amazon S3存储桶名称不正确

分辨率


在适当的区域创建一个新的Amazon S3 bucket,仅用于VM导入,并将VM文件上载到bucket的根。

这是一个bucket名称问题。一般而言,以及。允许在bucket名称中使用,但在本例中似乎不起作用。使用“cdhsandbox”作为bucket名称有效。