18

I am trying to create the policy as per the document in amazon doc. But I am facing this error as "An error occurred: Policy document should not specify a principal"

Doc below: http://docs.aws.amazon.com/vm-import/latest/userguide/import-vm-image.html

Any idea how to resolve this?

thulasi39
  • 521
  • 2
  • 5
  • 19
  • 1
    There are two different kinds of policies mentioned on the page you referenced. Which step are you working on, and what does your policy look like? More clarification is needed. – Michael - sqlbot Sep 19 '16 at 11:37
  • Hi, Thanks for the reply. I am talking the about to create service role (trust-policy.json) – thulasi39 Sep 20 '16 at 07:38

2 Answers2

15

Sorry if I'm jumping too late here, but looks like may be you are trying to create IAM identity-based policy and you cannot use the Principal element in an IAM identity-based policy.

You can learn more from here: https://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_identity-vs-resource.html

Atish Kumbhar
  • 579
  • 1
  • 8
  • 21
0

I know that this is not the best solution but this worked to export/import image. After the role was created on command line vmimport, I manually go to AWS console, search the role vmimport and attach the policy AdministratorAccess