问题
I am trying to export an EC2 instance (instance created with AMI which was imported earlier using VM import export service) to S3 bucket which is constantly failing . I also tried changing the bucket access to public still the error continues . I used both python SDK and CLI commands where both returns the same error
CLI used :
aws ec2 create-instance-export-task --instance-id i-***** --target-environment vmware --export-to-s3-task file://C:\file.json
json file containing bucket and VM image details
Error :An error occurred (AuthFailure) when calling the CreateInstanceExportTask operation: vm-import-export@amazon.com must have WRITE and READ_ACL permission on the S3 bucket.
I'm not able to add vm-import-export@amazon.com as a grantee .
Any help would be highly appreciated
Thanks in advance
回答1:
Attach an access control list (ACL) to your S3 bucket containing the following grant**:
- grantee: c4d8eabf8db69dbe46bfe0e517100c554f01200b104d59cd408e777ba442a322
- permissions: READ and WRITE
More information at Exporting an Instance as a VM Using VM Import/Export.
** unless you're targeting an S3 bucket in Bahrain, Hong Kong, Beijing, or GovCloud (US-West), which have different grantees, see the docs.
回答2:
Making the S3 Bucket Public just grants access to Read its contents.
What you're trying to do is to create an object on S3.
Based on the error you're getting the destination bucket must grant WRITE and READ_ACL permissions to the vm-import-export@amazon.com AWS account.
来源:https://stackoverflow.com/questions/59175204/unable-to-export-ec2-instance-to-s3