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

**URL:** <https://forum.serverless.com/t/get-lambda-arn-into-type-aws-permission/10018>\
**Category:** Serverless Framework\
**Created:** [December 4, 2019, 11:36am UTC](https://forum.serverless.com/t/get-lambda-arn-into-type-aws-permission/10018 "2019-12-04T11:36:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pb321](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@pb321](https://forum.serverless.com/u/pb321)\
**Post date:** [December 4, 2019, 11:36am UTC](https://forum.serverless.com/t/get-lambda-arn-into-type-aws-permission/10018/1 "2019-12-04T11:36:02Z")

</div>

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](http://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 ?

---

<div class="post-metadata">

**Author:** ![garethmcc](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/garethmcc/32/2276_2.png) [@garethmcc](https://forum.serverless.com/u/garethmcc)\
**Post date:** [December 6, 2019, 9:14am UTC](https://forum.serverless.com/t/get-lambda-arn-into-type-aws-permission/10018/2 "2019-12-06T09:14:13Z")

</div>

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](https://serverless.com/framework/docs/providers/aws/guide/iam/#iam)

---

<div class="post-metadata">

**Author:** ![pb321](https://avatars.discourse-cdn.com/v4/letter/p/ee7513/32.png) [@pb321](https://forum.serverless.com/u/pb321)\
**Post date:** [December 6, 2019, 11:57am UTC](https://forum.serverless.com/t/get-lambda-arn-into-type-aws-permission/10018/3 "2019-12-06T11:57:32Z")

</div>

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
