Auth¶
Authentication helper for NASA Earthdata S3 access. Call get_nsidc_s3_credentials once in your orchestrator before invoking workers --- credentials are valid for approximately 1 hour.
zagg.auth.get_nsidc_s3_credentials ¶
get_nsidc_s3_credentials() -> dict
Authenticate with NASA Earthdata and return S3 credentials for NSIDC.
Call this ONCE in the orchestrator before invoking Lambda functions. Credentials are valid for ~1 hour, which is longer than Lambda max execution time (15 minutes).
Returns:
-
dict–S3 credentials with keys: - accessKeyId: str - secretAccessKey: str - sessionToken: str - expiration: str (ISO timestamp)
Examples:
creds = get_nsidc_s3_credentials()
print(f"Credentials expire: {creds.get('expiration')}")
# Pass to Lambda invocation
event = {
"parent_morton": -6134114,
"s3_credentials": creds,
# ... other params
}