# Sls deploy -s test =\> "stack with id XX does not exist"

**URL:** <https://forum.serverless.com/t/sls-deploy-s-test-stack-with-id-xx-does-not-exist/3607>\
**Category:** Serverless Framework\
**Tags:** aws\
**Created:** [January 26, 2018, 8:43am UTC](https://forum.serverless.com/t/sls-deploy-s-test-stack-with-id-xx-does-not-exist/3607 "2018-01-26T08:43:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yonahforst](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/yonahforst/32/1561_2.png) [@yonahforst](https://forum.serverless.com/u/yonahforst)\
**Post date:** [January 26, 2018, 8:43am UTC](https://forum.serverless.com/t/sls-deploy-s-test-stack-with-id-xx-does-not-exist/3607/1 "2018-01-26T08:43:50Z")

</div>

In my serverless.yml, I’m setting an environment variable like so:  
`USERPOOL_ARN: ${cf:${self:provider.environment.STACK_NAME}.UserPoolArn}`

Works fine when I deploy to the default stage, but when I try to deploy to a different stage, I get an error saying stack does not exist. I checked in cloudformation and the stack definitely exists.

However, this works:  
`AWS_PROFILE=testProfile sls deploy -s test`

---

<div class="post-metadata">

**Author:** ![yonahforst](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.serverless.com/yonahforst/32/1561_2.png) [@yonahforst](https://forum.serverless.com/u/yonahforst)\
**Post date:** [January 26, 2018, 8:50am UTC](https://forum.serverless.com/t/sls-deploy-s-test-stack-with-id-xx-does-not-exist/3607/2 "2018-01-26T08:50:33Z")

</div>

Just realized this is the wrong place to post. I opened an issue:

> <https://github.com/serverless/serverless/issues/4685>
>
> \<!--
> 1. If you have a question and not a bug/feature request please ask it at h…ttp://forum.serverless.com
> 2. Please check if an issue already exists so there are no duplicates
> 3. Check out and follow our Guidelines: https://github.com/serverless/serverless/blob/master/CONTRIBUTING.md
> 4. Fill out the whole template so we have a good overview on the issue
> 5. Do not remove any section of the template. If something is not applicable leave it empty but leave it in the Issue
> 6. Please follow the template, otherwise we'll have to ask you to update it
> \--\>
> 
> \# This is a Bug Report
> 
> \## Description
> In my serverless.yml, I’m setting an environment variable like so:
> \`USERPOOL\_ARN: ${cf:${self:provider.environment.STACK\_NAME}.UserPoolArn}\`
> 
> Works fine when I deploy to the default stage, but when I try to deploy to a different stage, I get an error saying stack does not exist. I checked in cloudformation and the stack definitely exists.
> 
> However, this works:
> \`AWS\_PROFILE=testProfile sls deploy -s test\`
> 
> \## Additional Data
> \`\`\`
> Serverless Error ---------------------------------------
>  
> Stack with id physician-manager-test does not exist
>  
> Get Support --------------------------------------------
> Docs: docs.serverless.com
> Bugs: github.com/serverless/serverless/issues
> Forums: forum.serverless.com
> Chat: gitter.im/serverless/serverless
>  
> Your Environment Information -----------------------------
> OS: darwin
> Node Version: 8.6.0
> Serverless Version: 1.16.0
> \`\`\`

Can’t figure out how to delete the post, tho 🤔
