auth_vars['csrf_ts'] = csrf_tokens['CSRFTokenConfig']['csrf_ts']
should just be:
auth_vars['csrf_ts'] = csrf_tokens['csrf_ts']
The JSON in amznMusic.appConfig now just has csrf_ts included in CSRFTokenConfig