I am getting this error when I deploy:
The CloudFormation template is invalid: Template format error: Unresolved resource dependencies [IamPolicyLambdaExecution] in the Resources block of the template
I have tried creating my function first and still get the error.
Here is my serverless.yml:
service: serverless-kinesis-streams
provider:
name: aws
runtime: nodejs4.3
stage: dev
iamRoleStatements:
- Effect: "Allow"
Action:
- "kinesis:DescribeStream"
- "kinesis:GetRecords"
- "kinesis:GetShardIterator"
- "kinesis:ListStreams"
- "logs:CreateLogGroup"
- "logs:CreateLogStream"
- "logs:PutLogEvents"
Resource: "*"
custom:
stage: ${opt:stage, self:provider.stage}
functions:
dataReceiver:
handler: handler.dataReceiver
memorySize: 128
resources:
Resources:
KinesisStream:
Type: AWS::Kinesis::Stream
Properties:
Name: data-receiver
ShardCount: 1
KinesisTestMap:
Type: AWS::Lambda::EventSourceMapping
DependsOn :
- "handler"
- "IamPolicyLambdaExecution"
Properties:
BatchSize: 10
EventSourceArn:
Fn::GetAtt:
- "KinesisStream"
- "Arn"
FunctionName:
Fn::GetAtt:
- "handler"
- "Arn"
StartingPosition: "TRIM_HORIZON"