In the API Gateway Domains chapter the guides talks about referencing table names from a different serverless.yml file but if the database service is in a different repo we can’t do this:
provider:
name: aws
runtime: nodejs8.10
stage: dev
region: us-east-1
# These environment variables are made available to our functions
# under process.env.
environment:
tableName:
${file(../database/serverless.yml):custom.tableName} <-- serverless.yml won't be available
...
How would we reference the dynamo table name if we split out the database into a different repo?
provider:
name: aws
runtime: nodejs8.10
stage: dev
region: us-east-1
# These environment variables are made available to our functions
# under process.env.
environment:
tableName:
'Fn::ImportValue': NotesTableName
...