Monitoring Deployments in Seed


#1

Link to chapter - https://serverless-stack.com/chapters/monitoring-deployments-in-seed.html


#2

During Seed deployments, I am getting failures when promoting and when manually triggering a build.

Log Output

Build v4 started…
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed

0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
100 9507k 100 9507k 0 0 37.6M 0 --:–:-- --:–:-- --:–:-- 37.7M

====================
:zap:️ Init

2018/06/21 03:02:53 Loading production build

2018/06/21 03:02:55 Using Serverless Framework version 1.26.0

====================
:hammer_and_wrench: Compile

2018/06/21 03:02:55 Installing Node Modules

$ yarn
yarn install v1.3.2
[1/4] Resolving packages…
[2/4] Fetching packages…
info fsevents@1.2.4: The platform “linux” is incompatible with this module.
info “fsevents@1.2.4” is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies…
[4/4] Building fresh packages…
Done in 13.61s.

====================
:package: Build

2018/06/21 03:03:09 Applying secret environment variables

====================
:rocket: Deploy

2018/06/21 03:03:09 Deploying to: prod

$ SLS_DEBUG=* serverless deploy --stage prod --package promote-artifacts --force
Serverless: Load command run
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command emit
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command webpack
Serverless: Load command offline
Serverless: Load command offline:start

Serverless Warning --------------------------------------

A valid file to satisfy the declaration ‘file(env.yml):prod,file(env.yml):default’ could not be found.

Serverless Warning --------------------------------------

A valid file to satisfy the declaration ‘file(env.yml):prod,file(env.yml):default’ could not be found.

Serverless Warning --------------------------------------

A valid service attribute to satisfy the declaration ‘self:custom.environment.stripeSecretKey’ could not be found.

Serverless: Invoke deploy
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:moveArtifactsToTemp
Serverless: Invoke aws:deploy:deploy
Serverless: Uploading CloudFormation file to S3…
Serverless: Uploading artifacts…
Serverless: Validating template…
Serverless: Updating Stack…
Serverless: Checking Stack update progress…

Serverless: Operation failed!

Serverless Error ---------------------------------------

An error occurred: BillingLambdaVersionX2Ou8TdE7c5cYSAIeOaEktqNaA2CSa8DPTmkTNuzFI - A version for this Lambda function exists ( 1 ). Modify the function to create a new version…

Stack Trace --------------------------------------------

ServerlessError: An error occurred: BillingLambdaVersionX2Ou8TdE7c5cYSAIeOaEktqNaA2CSa8DPTmkTNuzFI - A version for this Lambda function exists ( 1 ). Modify the function to create a new version…
at provider.request.then (/sls-1.26.0/node_modules/serverless/lib/plugins/aws/lib/monitorStack.js:112:33)
From previous event:
at AwsDeploy.monitorStack (/sls-1.26.0/node_modules/serverless/lib/plugins/aws/lib/monitorStack.js:26:12)
at provider.request.then (/sls-1.26.0/node_modules/serverless/lib/plugins/aws/lib/updateStack.js:84:30)
From previous event:
at AwsDeploy.update (/sls-1.26.0/node_modules/serverless/lib/plugins/aws/lib/updateStack.js:84:8)
From previous event:
at AwsDeploy.BbPromise.bind.then (/sls-1.26.0/node_modules/serverless/lib/plugins/aws/lib/updateStack.js:101:12)
From previous event:
at AwsDeploy.updateStack (/sls-1.26.0/node_modules/serverless/lib/plugins/aws/lib/updateStack.js:95:8)
From previous event:
at AwsDeploy.BbPromise.bind.then (/sls-1.26.0/node_modules/serverless/lib/plugins/aws/deploy/index.js:135:39)
From previous event:
at Object.aws:deploy:deploy:updateStack [as hook] (/sls-1.26.0/node_modules/serverless/lib/plugins/aws/deploy/index.js:131:10)
at BbPromise.reduce (/sls-1.26.0/node_modules/serverless/lib/classes/PluginManager.js:372:55)
From previous event:
at PluginManager.invoke (/sls-1.26.0/node_modules/serverless/lib/classes/PluginManager.js:372:22)
at PluginManager.spawn (/sls-1.26.0/node_modules/serverless/lib/classes/PluginManager.js:390:17)
at AwsDeploy.BbPromise.bind.then (/sls-1.26.0/node_modules/serverless/lib/plugins/aws/deploy/index.js:101:48)
From previous event:
at Object.deploy:deploy [as hook] (/sls-1.26.0/node_modules/serverless/lib/plugins/aws/deploy/index.js:97:10)
at BbPromise.reduce (/sls-1.26.0/node_modules/serverless/lib/classes/PluginManager.js:372:55)
From previous event:
at PluginManager.invoke (/sls-1.26.0/node_modules/serverless/lib/classes/PluginManager.js:372:22)
at PluginManager.run (/sls-1.26.0/node_modules/serverless/lib/classes/PluginManager.js:403:17)
at variables.populateService.then (/sls-1.26.0/node_modules/serverless/lib/Serverless.js:102:33)
at runCallback (timers.js:794:20)
at tryOnImmediate (timers.js:752:5)
at processImmediate [as _immediateCallback] (timers.js:729:5)
From previous event:
at Serverless.run (/sls-1.26.0/node_modules/serverless/lib/Serverless.js:89:74)
at serverless.init.then (/sls-1.26.0/node_modules/serverless/bin/serverless:42:50)
at

Your Environment Information -----------------------------
OS: linux
Node Version: 8.10.0
Serverless Version: 1.26.0

2018/06/21 03:03:52 Error: exec: internal error

====================
:wastebasket: Cleanup

2018/06/21 03:03:52 Post deploy cleanup

Do you have any idea what could cause this? I have found a few other github issues referencing this problem with suggestions, but nothing has worked and I’m almost out of deployments on my free tier Seed account.


#3

It seems like a really weird issue that people have run into in the past.

Did you see this error in your first deploy?


#4

I am not seeing the error message details in my Lambda log, instead I see “module initialization error: ReferenceError” as the entire content of text in that log message where the error is in the example, see attached pic. Is this a change in the Seed logging? Or AWS logging? Or could it be where I put the gibberish.what; in my code? (I put it at the very top of the create.js file, first line)


#5

Hmm not sure where the change is. But if you click on the ReferenceError line, what day you see?