Getting error while creating import-snapshot with VHD from AWS S3 to EC2
I have a VHD file with Windows OS, it was uploaded to the AWS S3 bucket.
So I'm trying to create an import-snapshot of the VHD file from AWS S3 to EC2 by using AWS CLI with the below Linux command.
Expand|Select|Wrap|Line Numbers
- aws ec2 import-snapshot --disk-container "Format=VHD,UserBucket={S3Bucket=<s3_bucket_name>,S3Key=<S3_Key_of_vhd_file>}" --output json
When I'm trying to execute the above Linux command, getting the following error, and also attached a role to the EC2 with the below permissions/policies.
Error:
Expand|Select|Wrap|Line Numbers
- An error occurred (AuthFailure) when calling the ImportSnapshot operation: AWS was not able to validate the provided access credentials
Attached Policies:
- S3 Full-access
- EC2 Full-access
- KMS Full-access
- STS
- VM Import/Export
Is need to attach any more policies?
please can anyone help with this issue to get resolve.
Thanks
Rajaganesh