-
Type: Technical Debt
-
Resolution: Won't Do
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Not Applicable
-
3
-
StorEng - Defined Pipeline
Context
Currently from WT-10460, we default the s3 bucket to the ap-southeast region. S3 all has two buckets within ap-southeast and us-west. The reason for this is to test different region network latencies and how they affect the performance of the test. Ideally the default behaviour is that the bucket is used for which the evergreen instance was created. This can be done via calling this
EC2_AVAIL_ZONE=`curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone` EC2_REGION="`echo \"$EC2_AVAIL_ZONE\" | sed 's/[a-z]$//'`"
and was grabbed from:
https://stackoverflow.com/questions/4249488/find-region-from-within-an-ec2-instance
Once the region is grabbed we can grab it, and match it with the instance's region.
Definition of Done
Create a new function that calls check_aws_region() which will automatically select the correct bucket for what instance region we are in.