# Issues referencing CloudFormation outputs in Serverless YML

**URL:** <https://forum.serverless.com/t/issues-referencing-cloudformation-outputs-in-serverless-yml/3646>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [January 31, 2018, 2:13pm UTC](https://forum.serverless.com/t/issues-referencing-cloudformation-outputs-in-serverless-yml/3646 "2018-01-31T14:13:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JBartlett86](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jbartlett86/32/1510_2.png) [@JBartlett86](https://forum.serverless.com/u/JBartlett86)\
**Post date:** [January 31, 2018, 2:13pm UTC](https://forum.serverless.com/t/issues-referencing-cloudformation-outputs-in-serverless-yml/3646/1 "2018-01-31T14:13:32Z")

</div>

Hi,

I am trying to reference CloudFormation outputs in my Serverless yaml file so that I can reference existing resources created in other services/stacks.  
e.g. role: ${cf:BaseSecurity.LambdaKinesisExecutionRole}

This seemed to work fine until I tried to change my provider region to include a default value;

**region** : ${opt:region, ‘eu-west-1’}

After adding this my info and deploy fail with the following;

Serverless Error ---------------------------------------

Inaccessible host: `cloudformation.'. This service may not be available in the `${opt:region, ‘eu-west-1’}’ region.

Your Environment Information -----------------------------  
OS: darwin  
Node Version: 9.4.0  
Serverless Version: 1.25.0

I can fix the issue by calling

> serverless info --region eu-west-1

however I would prefer not to always be forced to supply a region if possible.

Any help would be greatly appreciated.

Thanks,  
John

---

<div class="post-metadata">

**Author:** ![DavidWells](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/davidwells/32/201_2.png) [@DavidWells](https://forum.serverless.com/u/DavidWells)\
**Post date:** [January 31, 2018, 3:39pm UTC](https://forum.serverless.com/t/issues-referencing-cloudformation-outputs-in-serverless-yml/3646/2 "2018-01-31T15:39:24Z")

</div>

Looks like a variable parsing order bug.

Can you report this in the repo [https://github.com/serverless/serverless/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc](https://github.com/serverless/serverless/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc) for us to track it?

---

<div class="post-metadata">

**Author:** ![JBartlett86](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/jbartlett86/32/1510_2.png) [@JBartlett86](https://forum.serverless.com/u/JBartlett86)\
**Post date:** [January 31, 2018, 5:50pm UTC](https://forum.serverless.com/t/issues-referencing-cloudformation-outputs-in-serverless-yml/3646/3 "2018-01-31T17:50:35Z")

</div>

No problem - I have raised [https://github.com/serverless/serverless/issues/4702](https://github.com/serverless/serverless/issues/4702)

I assume for the moment I will need to supply --region into the serverless deploy command until this can be fixed?

Thanks,  
John
