VM Export: An error occurred (Invalid Parameter) when calling the ExportImage operation: Access denied to the bucket

0

Trying to export the VM with the following command

aws ec2 export-image \
    --image-id *******  \
    --disk-image-format VMDK \
    --s3-export-location S3Bucket=auditor-updates,S3Prefix=export/

And getting the following error: An error occurred (InvalidParameter) when calling the ExportImage operation: Access denied to the bucket auditor-updates

The bucket and the folder definitely exist, typo is impossible.

I launched the command under the AWS CLI credentials corresponding to the DevOps role, however, I also tried root access just to make sure actual account permissions are not the reason.

1 回答
0

Hello Vector-t13,

It looks like you are trying to export your ec2 VM to your S3 bucket and are receiving the following error: An error occurred (InvalidParameter) when calling the ExportImage operation: Access denied to the bucket auditor-updates

One thing you may need to do, is to make sure you attach an access control List (ACL) to your S3 bucket to grant permissions to AWS to write to the bucket [1]. The exact ACL depends on the region the EC2 instance resides in. An overview of ACLs and other resources can be found in the links below [2].

Also, as a reminder, please remember not to share any sensitive information on re:Post since it is a public platform.

Let me know if you have any other questions.

References:
[1]https://docs.aws.amazon.com/vm-import/latest/userguide/vmexport.html#vmexport-prerequisites
[2]https://docs.aws.amazon.com/AmazonS3/latest/userguide/acl-overview.html

已回答 2 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则