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

Hi
I have the following in my serverless yml file :

lambdaQueueFirstInvokePermission:
Type: AWS::Lambda::Permission
Properties:
FunctionName: ServiceLambdaFunctionQualifiedArn
Action: ‘lambda:InvokeFunction’
Principal: sqs.amazonaws.com

and i have the following in the Outputs section :

Outputs:
ServiceLambdaFunctionQualifiedArn:
Value:
‘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: https://serverless.com/framework/docs/providers/aws/guide/iam/#iam

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