calm-smartphone-49719
03/01/2023, 8:21 PMAn error occurred (IllegalLocationConstraintException) when calling the GetObject operation: The x-central-1 location constraint is incompatible for the region specific endpoint this request was sent to.calm-smartphone-49719
03/01/2023, 8:22 PMsort | md5sum), and there are no AWS or METAFLOW environment variables presentcalm-smartphone-49719
03/01/2023, 8:24 PMfrom metaflow import Run, namespace
from metaflow.plugins import aws
import metaflow
import boto3
print('metaflow version', metaflow.__version__)
print('boto3 version', boto3.__version__)
print('s3 endpoint', aws.aws_client.get_aws_client('s3').meta.endpoint_url)
namespace(None)
run = Run('PermissionValidationFlow/20074')
print(list(list(run.steps())[::-1][0].tasks())[0].data._artifacts['region'].data)calm-smartphone-49719
03/01/2023, 8:43 PM$ python mwe.py
metaflow version 2.8.0
boto3 version 1.24.35
s3 endpoint <https://s3.ap-southeast-2.amazonaws.com>
GBRcalm-smartphone-49719
03/01/2023, 8:44 PM$ python mwe.py
metaflow version 2.8.0
boto3 version 1.24.35
s3 endpoint <https://s3.ap-southeast-2.amazonaws.com>
...
Error: An error occurred (IllegalLocationConstraintException) when calling the GetObject operation: The x-central-1 location constraint is incompatible for the region specific endpoint this request was sent to.calm-smartphone-49719
03/01/2023, 8:45 PMaws s3 ls on the target bucket on all machines fail with the same IllegalLocationConstraintException error, so it seems the "working" behaviour is the anomaly, not the failure case.calm-smartphone-49719
03/01/2023, 8:47 PMcalm-smartphone-49719
03/01/2023, 9:10 PMancient-application-36103
03/01/2023, 9:29 PMAWS_DEFAULT_REGION to the region of the bucket?calm-smartphone-49719
03/01/2023, 9:34 PMcalm-smartphone-49719
03/01/2023, 9:36 PM$ env | grep AWS | wc -l
0
but now
$ python mwe.py
metaflow version 2.8.0
boto3 version 1.24.35
s3 endpoint <https://s3.ap-southeast-2.amazonaws.com>
GBR
works on computer 022calm-smartphone-49719
03/01/2023, 9:36 PMcalm-smartphone-49719
03/01/2023, 9:46 PMcalm-smartphone-49719
03/01/2023, 9:47 PMcalm-smartphone-49719
03/01/2023, 9:47 PMcalm-smartphone-49719
03/01/2023, 9:48 PMancient-application-36103
03/01/2023, 10:01 PMcalm-smartphone-49719
03/01/2023, 10:03 PMcalm-smartphone-49719
03/01/2023, 10:03 PMancient-application-36103
03/01/2023, 10:07 PMcalm-smartphone-49719
03/02/2023, 6:12 AMtask.stderr
3. if (2) fails due to incorrect region, try again with the next region
4. otherwise return the object
Not ideal but for an internal dashboard the UX is fast enough (regions ordered by usage) that no one is complaining yet :)