I have the following serverless configuration file and I keep getting this error. I have no clue what to do. Please point me to what am I doing wrong.
An error occurred: IamRoleStateMachineExecution - Policy statement must contain resources. (Service: AmazonIdentityManagement; Status Code: 400; Error Code: MalformedPolicyDocument; Request ID: 1306e9e2-aa17-11e8-990a-1bb7f9dda8ba).
service: abc
plugins:
- serverless-step-functions
- serverless-pseudo-parameters
provider:
name: aws
runtime: go1.x
timeout: 30
region: eu-west-1
apiKeys:
- ${opt:stage}
iamRoleStatements:
- Effect: "Allow"
Action:
- "s3:GetObject"
- "s3:PutObject"
- "s3:DeleteObject"
- "logs:FilterLogEvents"
Resource: "*"
package:
exclude:
- ./**
include:
- ./create-task-fn
- ./s3-ftp-upload-fn
- ./${opt:stage}.config.json
functions:
CreateTask:
handler: create-task-fn
memorySize: 192
environment:
# Cloudwatch region
REGION: ${self:provider.region}
CONFIG: ${opt:stage}.config.json
S3FtpUpload:
handler: s3-ftp-upload-fn
memorySize: 256
environment:
CONFIG: ${opt:stage}.config.json
stepFunctions:
stateMachines:
abc:
events:
- http:
path: /
method: post
name: Abc
definition:
Comments: "Abc Step function reads logs from cloudwatch, Process them and uploads them to a FTP server"
StartAt: CreateTask
States:
CreateTask:
Type: Task
Resource: "arn:aws:lambda:${self:provider.region}:#{AWS::AccountId}:function:${self:service}-${opt:stage}-CreateTask"
Next: S3FtpUpload
S3FtpUpload:
Type: Task
Resource: "arn:aws:lambda:${self:provider.region}:#{AWS::AccountId}:function:${self:service}-${opt:stage}-S3FtpUpload"
End: true
resources:
Resources:
CreateTaskTempBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: create-task-temp-store