Getting error while import-snapshot an VHD from AWS S3 to EC2

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rajaganesh
    New Member
    • May 2023
    • 3

    Getting error while import-snapshot an VHD from AWS S3 to EC2

    Dear Experts!

    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.

    Code:
    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:
    Code:
    An error occurred (AuthFailure) when calling the ImportSnapshot operation: AWS was not able to validate the provided access credentials

    Attached Policies:
    1. S3 Full Access
    2. EC2 Full Access
    3. KMS Full Acess
    4. VM import/export
    5. STS


    Is need to attach any more policies?
    Please can anyone help/suggest getting resolve this issue?


    Thanks
    Rajaganesh
Working...