AWS Webiny Deploying Apps


#1

Hi all,

I am working on deploying Webiny in AWS from a cloud9 environment and had run into a few issues. I have gotten stuck on deploying the applications and receiving an api endpoint.

I was following the set of instructions and deployed the apis running

>deploy-api --env=dev

everything gets setup correctly and I can access the graphQL page form the returned CDN URL

Next, I go to deploy the applications running

deploy-apps --env=dev
...
Compiled successfully.
168s › admin › Deploying ..

and then we receive the following error

Error: invalid reference ${api.url}
    at Object.<anonymous> (/home/ubuntu/.nvm/versions/node/v10.17.0/lib/node_modules/@webiny/cli/sls/template/utils.js:32:27)
    at walker (/home/ubuntu/.nvm/versions/node/v10.17.0/lib/node_modules/@webiny/cli/node_modules/traverse/index.js:190:22)
    at /home/ubuntu/.nvm/versions/node/v10.17.0/lib/node_modules/@webiny/cli/node_modules/traverse/index.js:208:29
    at Array.forEach (<anonymous>)
    at forEach (/home/ubuntu/.nvm/versions/node/v10.17.0/lib/node_modules/@webiny/cli/node_modules/traverse/index.js:298:31)
    at walker (/home/ubuntu/.nvm/versions/node/v10.17.0/lib/node_modules/@webiny/cli/node_modules/traverse/index.js:203:13)
    at /home/ubuntu/.nvm/versions/node/v10.17.0/lib/node_modules/@webiny/cli/node_modules/traverse/index.js:208:29
    at Array.forEach (<anonymous>)
    at forEach (/home/ubuntu/.nvm/versions/node/v10.17.0/lib/node_modules/@webiny/cli/node_modules/traverse/index.js:298:31)
    at walker (/home/ubuntu/.nvm/versions/node/v10.17.0/lib/node_modules/@webiny/cli/node_modules/traverse/index.js:203:13)

So at the end where the error comes in, I should be expected to have a CDN URL to access the applications yes? How may I go about resolving the issue


#2

@PAUL_ITE The ${api.url} is referenced from the cdn component, so it looks like the api component failed somehow. You can add a --debug flag to the command, to see the debug output during deploy. It should give you more information about what went wrong.

Could you please retry the deployment using webiny deploy-apps --env=dev --debug and post the output regarding webiny:api? Thanks!


#3

I have run with debugger enabled

webiny:site Successfully deployed lambda XXXXXXX in the us-east-1 region. +967ms
  webiny Tracking component: @webiny/serverless-app (deploy) +1s
  webiny:api Input was not changed, no action required. +0ms
  webiny Tracking component: @webiny/serverless-api-gateway (deploy) +86ms
Error: invalid reference ${api.url}

thanks!


#5

Had to correct the user name for mongoDB instance :man_facepalming: got it!


#6

Just to clarify, have you managed to deploy the apps?

To be honest, I’m not sure how mongodb could influence the deployment of apps.


#7

Yes, I have everything deployed successfully. There was another issue when I ran the debug when deploying the api. I forgot to record late last night to find what had occurred, but that’s where I noticed the mongoDB connection issue, tried to solve it to no avail. This morning I had just created a fresh AWS environment and setup everything smoothly!

Let’s chalk this one up to Human Error Yesterday!


#8

Great, if you encounter more problems let us know :slight_smile: Cheers!