Can anyone help me find what's wrong?
I'm importing this cloudformation resources in my serverless yml. This is my function config:
Resources:
eventHandler:
Type: AWS::Serverless::Function
Properties:
CodeUri: eventLambda/
Handler: dist/app.eventHandler
Runtime: nodejs12.x
FunctionName: eventHandler
This where I'm referencing it:
eventSourceRule:
Type: 'AWS::Events::Rule'
Properties:
Name: eventSourceRule
EventBusName: omnibus-${self:custom.stage}
EventPattern: |
{
"source": ["op.api"]
}
RetryPolicy:
MaximumRetryAttempts: 5
MaximumEventAgeInSeconds: 900
DeadLetterConfig:
Type: SQS
QueueLogicalId: EBRuleDLQ
Targets:
- Arn:
Fn::GetAtt:
- 'EventHandlerLambdaFunction'
- 'Arn'
Id: 'eventSourceRule'
Notice that I've already tried eventHandler and EventHandler and none of these worked.
That's the error I'm receiving:
The CloudFormation template is invalid: Template error: instance of Fn::GetAtt references undefined resource EventHandlerLambdaFunction