AWS - Steps to upload a VM - Creating a vmimport user to upload the image

I'm following the steps to upload an image here:
http://docs.aws.amazon.com/vm-import/latest/userguide/import-vm-image.html

When I run the following command:
aws iam create-role --role-name vmimport --assume-role-policy-document file://trust-policy.json

I get this error:
H:\>aws iam create-role --role-name vmimport --assume-role-policy-document C:\Users\Stuart.Saxby\Desktop\trust-policy.json
An error occurred (MalformedPolicyDocument) when calling the CreateRole operation: This policy contains invalid Json


I've copied the JSON exactly and verified it in a JSON validator.  Any ideas on how I can troubleshoot this?
Stuart SaxbyBusiness AnalystAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Stuart SaxbyBusiness AnalystAuthor Commented:
Some steps I've taken:
1.)  Confirmed the JSON file is correct and at the correct location
2.)  Compared the JSON file contents with what's displayed on the website
3.)  Confirmed the JSON that's on the website is actually correctly formatted JSON

I'm wondering if it's actually a problem with the JSON or the error is pointing to some other problem.
0
Phil PhillipsDevOps ArchitectCommented:
You might have to try something like:

aws iam create-role --role-name vmimport --assume-role-policy-document file:///C:/Users/Stuart.Saxby/Desktop/trust-policy.json

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Stuart SaxbyBusiness AnalystAuthor Commented:
Champ!  That did it.  I tried as written and got:
Error parsing parameter '--assume-role-policy-document': Unable to load paramfile file:///C:/Users/Stuart.Saxby/Desktop/trust-policy.json: [Errno 2] No such file or directory: u'/C:/Users/Stuart.Saxby/Desktop/trust-policy.json'

Removed the additional '/' and the import worked correctly.  Thanks for your help!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
AWS

From novice to tech pro — start learning today.