-
Notifications
You must be signed in to change notification settings - Fork 138
Open
Labels
type: enhancementNew feature or requestNew feature or request
Description
In some of our DAAC notebooks, we include the following Boto3 snippet to check if the notebook is being executed inside us-west-2, and throws a ValueError (with emojis) if you are not, preventing the notebook from being fully executed:
if (boto3.client('s3').meta.region_name == 'us-west-2'):
display(Markdown('### us-west-2 Region Check: ✅'))
else:
display(Markdown('### us-west-2 Region Check: ❌'))
raise ValueError('Your notebook is not running inside the AWS us-west-2 region, and will not be able to directly access NASA Earthdata S3 buckets')
It may be useful to include a method that the user can call to check if they are in us-west-2 for direct S3 access and will throw an error like this, possibly using an fsspec transitive dependency, or the existing authorization checks.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: enhancementNew feature or requestNew feature or request
Type
Projects
Status
🤝 Decision Finalized