-1
I am trying to create a service in AWS using serverless but when trying to execute the command sls deploy, I am presented with the following error: An error occurred: Iamrolelambdaexecution - Syntax errors in policy. (Service: Amazonidentitymanagement; Status Code: 400; Error Code: Malformedpolicydocument; Request ID: 79ded390-d2b7-4987-86a4-facaad77b2f7; Proxy: null).
this is my serverless.yml file
service: analysis
provider:
name: aws
runtime: nodejs12.x
iamRoleStatements:
- Effect: "Allow"
Action:
- rekognition: DetectLabels
Resource: "*"
functions:
analysis:
handler: handler.main
events:
- http:
path: analyse
method: get