Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using AWSCognito and unable to get environment for DOMAIN

See original GitHub issue

So i’m using TLJH

Running the config

root@ip-172-*.*.*:/home/ubuntu# tljh-config show
  - insightadmin
  type: oauthenticator.awscognito.AWSCognitoAuthenticator

With this config…

root@ip-172.*.*.*:/home/ubuntu# cat /opt/tljh/config/jupyterhub_config.d/
root@ip-172-*.*.*:/home/ubuntu# printenv | grep AWS

When I hit the site, it doesn’t pick up the environment variable and I get


If I hard code the url into

i.e. change




It works fine, where am I missing setting the environment variable ?

I’ve tried it in /etc/environment and running


all to no avail…

And testing it in python gives

root@ip-172-*.*.*:/home/ubuntu# python3
Python 3.6.9 (default, Nov  7 2019, 10:44:02)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> print(os.getenv('AWSCOGNITO_DOMAIN'))

Any help would be great.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

budgestercommented, Dec 3, 2019

I’ll create a howto on TLJH docs over the next couple of days.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configure the Amazon Cognito hosted web UI
In the Amazon Cognito console, choose User pools, and then choose your user pool. · Under App integration, choose Domain name, and then...
Read more >
Configuring a Custom Domain with Cognito | A Cloud Guru
Navigate to the user pool. Under App integration, select Domain name. Choose Use your domain. Use auth.<labdomain> (where <labdomain> ...
Read more >
Cognito own domain name required A Record - Stack Overflow
9 Answers 9 · Sign in to the Route 53 console. · If you don't have a hosted zone in Route 53, set...
Read more >
Custom domain support with Cognito · Issue #1880 - GitHub
We configured custom domain for cognito hosted UI and when user tries to login it calls both cognito domain (ending up with invalid_grant...
Read more >
User authentication with AWS Cognito: The good, the bad and ...
You can only make mistakes. With a managed service you don't need to care about the passwords of your users, security protocols, or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found