# Referencing CloudFormation Outputs

**URL:** <https://forum.serverless.com/t/referencing-cloudformation-outputs/2273>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [July 11, 2017, 4:17pm UTC](https://forum.serverless.com/t/referencing-cloudformation-outputs/2273 "2017-07-11T16:17:36Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ProbablePrime](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/probableprime/32/785_2.png) [@ProbablePrime](https://forum.serverless.com/u/ProbablePrime)\
**Post date:** [July 11, 2017, 8:38pm UTC](https://forum.serverless.com/t/referencing-cloudformation-outputs/2273/2 "2017-07-11T20:38:24Z")

</div>

Hey does your serverless file similar this: [https://github.com/ProbablePrime/serverless-sns-issue/blob/master/serverless.yml](https://github.com/ProbablePrime/serverless-sns-issue/blob/master/serverless.yml) ?

I’m having what sounds like a similar issue. There’s some discussion here:

> [@DependsOn for Functions?](http://forum.serverless.com/t/dependson-for-functions/2254/6):
>
> Ahh, that seems problematic. In the JS SDK i can only publish to a topic via ARN. Ok thank you for the full explanation, i’ll use the join for now :). I’ll also see what resources in the AWS space are available to help out here, from an outside perspective i would assume GetAtt should be able to get an Arn if the resource has one. I figured this out using Ref [https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html) which will get you the sns topic A…

I’m looking around for some details and found: [Create a subscription between my Amazon SQS queue and an Amazon SNS topic in CloudFormation | AWS re:Post](https://aws.amazon.com/premiumsupport/knowledge-center/sqs-sns-subscribe-cloudformation/) which seems helpful.

I’ll be trying out some stuff on the above repo today and will let you know if i get anywhere.

Edit: I Fixed it!!!

> **[GitHub - ProbablePrime/serverless-sns-issue: A repro to help people answer a...](https://github.com/ProbablePrime/serverless-sns-issue)**
>
> A repro to help people answer a query i have regarding sns and stuff - GitHub - ProbablePrime/serverless-sns-issue: A repro to help people answer a query i have regarding sns and stuff

The key part here is the `Ref` function available in cloudformation. [Ref - AWS CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-ref.html)

---

_[View the full topic](https://forum.serverless.com/t/referencing-cloudformation-outputs/2273)._
