# Serverless 1.28.0 cannot read stage variables from a yml file

**URL:** <https://forum.serverless.com/t/serverless-1-28-0-cannot-read-stage-variables-from-a-yml-file/5104>\
**Category:** Serverless Framework\
**Created:** [July 17, 2018, 3:11pm UTC](https://forum.serverless.com/t/serverless-1-28-0-cannot-read-stage-variables-from-a-yml-file/5104 "2018-07-17T15:11:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bayh](https://avatars.discourse-cdn.com/v4/letter/b/50afbb/32.png) [@bayh](https://forum.serverless.com/u/bayh)\
**Post date:** [July 17, 2018, 3:11pm UTC](https://forum.serverless.com/t/serverless-1-28-0-cannot-read-stage-variables-from-a-yml-file/5104/1 "2018-07-17T15:11:25Z")

</div>

I updated my serverless project to latest version (1.28.0) and I can’t deploy my project anymore. The problem is the sls cannot read my stage variables referred in a yml file located in a folder (stage\_vars) in the root directory. I defined all the stage variables like “awsProfile” and “envName” in a file like “dev.yml” (located in the “stage\_vars” folder) and referring them in the serverless.yml file for example:

custom:  
stageVars: {file(stage\_vars/{opt:stage}.yml)}

provider:  
profile: ${self:custom.stageVars.awsProfile, self:custom.defaultAwsProfile}  
variableSyntax: ‘${((((self|opt):)|file)((?!${).)+?)}’

If I provide the profile name directly as a string it would work but it is not working using the above syntax. Am I missing something in the new version?
