Is it possible to add this policy document to default IAM role?
I have this in resources:
IotPolicy:
Type: AWS::IAM::Policy
Properties:
PolicyName: "IoT"
PolicyDocument:
Version: "2012-10-17"
Statement:
-
Effect: "Allow"
Principal:
Service:
- iot.amazonaws.com
Action: "sts:AssumeRole"
Resource: "*"
Roles:
-
Ref: “IamRoleLambdaExecution”
And I got:
Serverless Error ---------------------------------------
An error occurred while provisioning your stack: IotPolicy
- Policy document should not specify a principal..