awslabs / ec2-spot-labs

Collection of tools and code examples to demonstrate best practices in using Amazon EC2 Spot Instances.
https://aws.amazon.com/ec2/spot/
Other
942 stars 319 forks source link

Syntax errors in policy #25

Closed shubhamagarwal92 closed 5 years ago

shubhamagarwal92 commented 5 years ago

Hi,

I have been following this blog to spawn multiple spot instances. However, while, creating the policy using the command below,

aws iam create-policy \
    --policy-name ec2-permissions-dl-training  \
    --policy-document ec2-permissions-dl-training.json

I am facing the error:

An error occurred (MalformedPolicyDocument) when calling the CreatePolicy operation: Syntax errors in policy.

Could you suggest what could be the issue with this policy document that is used.

shubhamagarwal92 commented 5 years ago

Nevermind, I found the solution.

There has to be file:// before the document name.