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 Answer
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

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions