serverless-next.js: multiple-instance-environment example doesn't load env variables

Describe the bug The multiple environment example isn’t loading the env variables to populate the domain key in the yml.

When logging the output from await template({ template: 'serverless.yml' }) I’m getting

{"AppNameHere":{"appUrl":"cloudfrontURL,"bucketName":"someRandomBucketName"}}

However, the environment variable domain is correctly set and available when the template function is executed, so it seems the domain is effectively being ignored.

Expected behavior env variables to be used by serverless.yml


This is my first time using serverless so if this falls out of this package’s scope please let me know.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 21 (9 by maintainers)

Most upvoted comments

fixed by using

domain:
      - ${env.subdomain}
      - mydomain.com

in the .yml

thanks for the help @barrysteyn