Hi - I’m running a notebook to access podaac LP2 sat data with xarray. I have it working in one 2i2c jupyterhub that we’re using for GridSST hackathon this week. However, when I try to run this exact same notebook in staging.pangeo jupyter hub (for larger RAM) I am not getting any credentials returning from temp_creds
. The credentials returned are used to access an AWS S3 bucket. See below for the snippet used with the GET request:
import requests
s3_cred_endpoint = {
'podaac':'https://archive.podaac.earthdata.nasa.gov/s3credentials',
'lpdaac':'https://data.lpdaac.earthdatacloud.nasa.gov/s3credentials',
'ornldaac':'https://data.ornldaac.earthdata.nasa.gov/s3credentials',
'gesdisc':'https://data.gesdisc.earthdata.nasa.gov/s3credentials'
}
def get_temp_creds():
temp_creds_url = s3_cred_endpoint['podaac']
return requests.get(temp_creds_url).json()
temp_creds = get_temp_creds()
temp_creds
I also tried using the auth
param in the GET request as follows, but this didn’t work:
from requests.auth import HTTPBasicAuth
def get_temp_creds():
temp_creds_url = s3_cred_endpoint['podaac']
return requests.get(temp_creds_url, auth=HTTPBasicAuth("username", "password")).json()
I should also note that others have been reporting the same issue while others can run the notebook successfully on the same 2i2c jupyterhub. Not sure why there is this inconsistency. Any help would be very much appreciated, thanks!