Getting error while import-snapshot an VHD from AWS S3 to EC2
I have a VHD file and it contains Windows OS, it was uploaded to the AWS S3 bucket. So I'm trying to create an import-snapshot from AWS S3 to EC2 by using AWS CLI and by using 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 with the above Linux command, getting the below error, and also I have attached a role with the following 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 Acess
- VM import/export
- STS
Is need to attach any more policies?
Please can anyone help/suggest getting resolve this issue?
Thanks
Rajaganesh