Reputation:
While running cloud formation templated I got
E0000 mapping values are not allowed in this context
Line number is Properties:
where error occurs
InvokePermission:
Type: AWS::Lambda::Permission
Properties:
Action:
- lambda:InvokeFunction
FunctionName: !Ref FunctionLambda
Principal: sns.amazonaws.com
Upvotes: 0
Views: 1020
Reputation: 9665
Your definition is wrong, as per the documentation
Action should be a string, something like below:
permission:
Type: AWS::Lambda::Permission
Properties:
FunctionName: !GetAtt function.Arn
Action: lambda:InvokeFunction
Principal: 123456789012
Plus this is explained in YAML mapping values are not allowed in this context as well.
So the correct definition would be:
InvokePermission:
Type: AWS::Lambda::Permission
Properties:
Action: lambda:InvokeFunction
FunctionName: !Ref FunctionLambda
Principal: sns.amazonaws.com
Upvotes: 2