Sls deploy not working since upgrade to 1.36.0

Running a deploy of my stack was working using version 1.35.1

Serverless: Stack update finished...
Service Information
service: AccountsCRUD
stage: dev
region: us-west-2
stack: AccountsCRUD-dev
api keys:
  None
endpoints:
  ANY - https://xxxxxx.execute-api.us-west-2.amazonaws.com/dev/
  ANY - https://xxxxxx.execute-api.us-west-2.amazonaws.com/dev/{proxy+}
functions:
  accounts: AccountsCRUD-dev-accounts
layers:
  None
Serverless: Removing old service artifacts from S3...


   ╭───────────────────────────────────────╮
   │                                       │
   │   Update available 1.35.1 → 1.36.0    │
   │    Run npm i serverless to update     │
   │                                       │
   ╰───────────────────────────────────────╯

Since updating to 1.36.0, I am seeing it get through to the point where it does the AWS sts and it doesn’t do anything else.

Reverting to 1.35.1 seems to fix whatever is causing the failure.

RobWeaver:AccountsCRUD robweaver$ sls deploy list --stage dev --region us-west-2 --aws-profile wf-cloud-dev --verbose --profile wf-cloud-dev --provider aws

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 config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Invoke deploy:list
Serverless: [AWS sts 200 0.42s 0 retries] assumeRole({ RoleArn: 'arn:aws:iam::<myaccountid>:role/admin',
RoleSessionName: 'aws-sdk-js-1547174627781' })

No more output after the above line …

My current workaround is npm i serverless@1.35.1 -g

If there was an error message I might be able to figure out why it is dying, my suspicion is there’s some problem with the role assumption.

Also, It has the other problem when deploy using this version

serverless.yml

service:
  name: react-client-ssr

provider:
  name: aws
  runtime: nodejs8.10
  stage: ${env:NODE_ENV} # Set the default stage used. Default is dev
  region: ap-northeast-2 # Overwrite the default region used. Default is us-east-1
  memorySize: 512 # Overwrite the default memory size. Default is 1024
  environment:
    NODE_ENV: ${self:provider.stage}
  deploymentBucket:
    name: moducampus-client.sls.${self:provider.stage} # Overwrite the default deployment bucket
    serverSideEncryption: AES256 # when using server-side encryption

functions: ${file(./config/handlers.yml)}

config/handlers.yml

ssr:
  handler: src/handler.ssr
  events:
    - http: 
        path: /
        method: GET
    - http: 
        path: /{proxy+}
        method: ANY
    - http: 
        path: /{proxy+}
        method: OPTIONS

then, I show me the error logs when deploy on CI/CD Tools on gitlab

(...)
Serverless: Load command config:credentials
 
  Type Error ---------------------------------------------
 
  Cannot use 'in' operator to search for '0' in ${file(./config/handlers.yml)}
 
     For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
 
  Stack Trace --------------------------------------------
 
TypeError: Cannot use 'in' operator to search for '0' in ${file(./config/handlers.yml)}
    at Service.getFunction (/usr/local/lib/node_modules/serverless/lib/classes/Service.js:261:22)
    at Service.getAllEventsInFunction (/usr/local/lib/node_modules/serverless/lib/classes/Service.js:284:17)
    at AwsProvider.serverless.service.getAllFunctions.forEach.funcName (/usr/local/lib/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:207:41)
    at Array.forEach (<anonymous>)
    at new AwsProvider (/usr/local/lib/node_modules/serverless/lib/plugins/aws/provider/awsProvider.js:206:47)
    at PluginManager.addPlugin (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:52:28)
    at plugins.forEach (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:92:14)
    at Array.forEach (<anonymous>)
    at PluginManager.loadPlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:88:13)
    at PluginManager.loadCorePlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:129:10)
    at PluginManager.loadAllPlugins (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:83:10)
    at service.load.then (/usr/local/lib/node_modules/serverless/lib/Serverless.js:70:28)
    at <anonymous>
From previous event:
    at runCallback (timers.js:810:20)
    at tryOnImmediate (timers.js:768:5)
    at processImmediate [as _immediateCallback] (timers.js:745:5)
From previous event:
    at /usr/local/lib/node_modules/serverless/bin/serverless:29:46
    at Object.<anonymous> (/usr/local/lib/node_modules/serverless/bin/serverless:66:4)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3
 
  Get Support --------------------------------------------
     Docs:          docs.serverless.com
     Bugs:          github.com/serverless/serverless/issues
     Issues:        forum.serverless.com
 
  Your Environment Information -----------------------------
     OS:                     linux
     Node Version:           8.12.0
     Serverless Version:     1.36.0

I have experienced the same exact problem when upgrading from 1.35.1 to 1.36.1. Serverless deploys exit immediately after entering an MFA TOTP.

Deploys that do not require MFA are successful. Downgrading to 1.35.1 solves the problem.

I’d be more than happy to help debug if someone can point me in the right direction.

We use role assumption (CARA) with gimme-aws-creds on our side, so I’m pretty sure it is related to that.

I’d be glad to work with somebody on debugging, currently I get NO errors even with SLS_DEBUG turned on.