Get Lambda Arn into Type: AWS::Lambda::Permission

I have the following in my serverless yml file :

Type: AWS::Lambda::Permission
FunctionName: ServiceLambdaFunctionQualifiedArn
Action: ‘lambda:InvokeFunction’

and i have the following in the Outputs section :

‘Fn::GetAtt’: [ lambdaQueueFirst, Arn ]

this comes back with a message : Template error: instance of Fn::GetAtt references undefined resource lambdaQueueFirst

Am i missing something and if so, what ? since there is very little in terms of help or examples…
Also, is there a better of getting the lambda arn into the permissions code ? if so, what is it ?

Could you share your full serverless.yml.

Also, if you are trying to assing IAM permissions to a lambda function you don’t need to go the route of setting it via CloudFormation. You can define IAM permissions as a part of the Serverless Framework in a much simpler way:

Hi Gareth
Thanks for your reply. The suggestion you submitted is exactly what I did. I hadnt relized at the time, as I am quite new to building large(ish) aws structure.

Thanks again, much appreciated