Instead of manually defining the service name in serverless.yml
I'd like to read the name
from the package.json
To achieve a dynamic service name based on the package.json
app name I took advantage of the variable import Serverless Framework feature.
This loads the file package.json
and specifies that the name property should be applied to the service entry.
# serverless.yml
service: ${file(./package.json):name}