January 2019
Intermediate to advanced
520 pages
14h 32m
English
We need some values that are not known before deployment. We will use the sls info -v command to get the actual values that we need to configure the frontend. Create a bash script to add the necessary deployment functions. First, we need an extract function to get the second column aster space delimited of sls info output:
extract() { echo "$DATA" | grep $1 | cut -d " " -f2 }
To deploy an application with the Serverless Framework, you have to call the sls deploy command, but our application is more complex and we have to use a sequence of commands:
deploy() { echo "ASSETS DOWNLOADING" curl -L https://api.github.com/repos/aws-samples/aws-serverless-workshops/tarball \ | tar xz --directory assets --wildcards "*/WebApplication/1_StaticWebHosting/website" ...Read now
Unlock full access