# How can we do cross-stack reference from serverless.yml to aws cdk code

**URL:** <https://discourse.sst.dev/t/how-can-we-do-cross-stack-reference-from-serverless-yml-to-aws-cdk-code/2147>\
**Category:** Chapter Comments\
**Created:** [October 28, 2020, 10:36am UTC](https://discourse.sst.dev/t/how-can-we-do-cross-stack-reference-from-serverless-yml-to-aws-cdk-code/2147 "2020-10-28T10:36:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aabhusan](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/aabhusan/32/982_2.png) [@Aabhusan](https://discourse.sst.dev/u/Aabhusan)\
**Post date:** [October 28, 2020, 10:36am UTC](https://discourse.sst.dev/t/how-can-we-do-cross-stack-reference-from-serverless-yml-to-aws-cdk-code/2147/1 "2020-10-28T10:36:18Z")

</div>

i have my lambda’s setup in serverless frame work. I want to import the the endpoint of the lambda to aws cdk. i have already exported the output in the serverless.yml file how can Import it to aws cdk\>\> SST .

---

<div class="post-metadata">

**Author:** ![jayair](https://yyz2.discourse-cdn.com/flex032/user_avatar/discourse.sst.dev/jayair/32/9_2.png) [@jayair](https://discourse.sst.dev/u/jayair)\
**Post date:** [November 13, 2020, 3:25am UTC](https://discourse.sst.dev/t/how-can-we-do-cross-stack-reference-from-serverless-yml-to-aws-cdk-code/2147/2 "2020-11-13T03:25:18Z")

</div>

You’ll need to do a CloudFormation import:

```auto
import * as cdk from '@aws-cdk/core';

cdk.Fn.importValue(“export-name”)

```
