The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

dsmith (4) [Avatar] Offline
Apologies if this is answered later in the course...

After finishing the CI/CD section, it appears that to run the acceptance tests we need to know the endpoint that will be associated with the deployment, which gets hard-coded into the script in package.json. This means that the stack was deployed at least once before hand, and that the pipeline is coupled to that deployment.

In practice is this something that is done, or would a next logical step be to add some aws cli commands to extract the stack resources associated with the sls deploy as part of the build script to derive the environment at build time in the pipeline? Or are there other approaches we should consider.

Yan Cui (73) [Avatar] Offline
Unfortunately I don't think we'll have the time to address this properly in the course, but I can mention something in the wrap-up video.

In practice, this problem is solved by having custom domain names - well known URLs that follow some convention, e.g. See this post on how to set it up using the Serverless framework and a plugin.

In which case, you can automate the creation of the domain with your build script, but, since it takes 40mins to provision the new custom domain name, the first time it runs for a new environment the acceptance tests would still fail, unless you manually create the domain ahead of time.