{"id":1153,"date":"2024-10-31T23:28:34","date_gmt":"2024-11-01T03:28:34","guid":{"rendered":"https:\/\/jasonralph.org\/?p=1153"},"modified":"2024-10-31T23:29:55","modified_gmt":"2024-11-01T03:29:55","slug":"importerror-cannot-import-name-is_s3express_bucket","status":"publish","type":"post","link":"https:\/\/jasonralph.org\/?p=1153","title":{"rendered":"ImportError: cannot import name &#8216;is_s3express_bucket&#8217;"},"content":{"rendered":"<p>Another day another odd error, my colleague and I were alerted to an issue on one of our MWAA Airflow 2.5.1 environments. <\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\nImportError: cannot import name 'is_s3express_bucket'\r\n<\/pre>\n<p>The above error was happening when a new DAG tried to instantiate S3 via botocore\/boto3. We traced it down to the S3transfer package. Apparently in this commit:<br \/>\n<a href=\"https:\/\/github.com\/boto\/s3transfer\/commit\/3b50c31bb608188cdfb0fc7fd8e8cd03b6b7b187\">https:\/\/github.com\/boto\/s3transfer\/commit\/3b50c31bb608188cdfb0fc7fd8e8cd03b6b7b187<\/a><\/p>\n<p>Support was added for S3express, and from what we gathered we needed to upgrade 3 packages in our constraints.txt to solve the import issue. <\/p>\n<pre class=\"theme:solarized-dark lang:default decode:true \" >\r\n\r\n=========================================\r\n--constraint \"\/usr\/local\/airflow\/dags\/constraints.txt\"\r\n\r\nairflow==2.5.1\r\ns3transfer==0.10.3\r\nboto3==1.35.52\r\nbotocore==1.35.52\r\n...................................\r\n# Other existing packages\r\n=========================================\r\n<\/pre>\n<p>After making these package version changes we were back in business. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Another day another odd error, my colleague and I were alerted to an issue on one of our MWAA Airflow 2.5.1 environments. ImportError: cannot import name &#8216;is_s3express_bucket&#8217; The above error was happening when a new DAG tried to instantiate S3 via botocore\/boto3. We traced it down to the S3transfer package. Apparently in this commit: https:\/\/github.com\/boto\/s3transfer\/commit\/3b50c31bb608188cdfb0fc7fd8e8cd03b6b7b187 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,4],"tags":[103,62,145,146,144,24,79],"class_list":["post-1153","post","type-post","status-publish","format-standard","hentry","category-general-code","category-python","tag-airflow","tag-aws","tag-boto3","tag-botocore","tag-is_s3express","tag-python-2","tag-s3"],"_links":{"self":[{"href":"https:\/\/jasonralph.org\/index.php?rest_route=\/wp\/v2\/posts\/1153","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jasonralph.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jasonralph.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jasonralph.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jasonralph.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1153"}],"version-history":[{"count":2,"href":"https:\/\/jasonralph.org\/index.php?rest_route=\/wp\/v2\/posts\/1153\/revisions"}],"predecessor-version":[{"id":1155,"href":"https:\/\/jasonralph.org\/index.php?rest_route=\/wp\/v2\/posts\/1153\/revisions\/1155"}],"wp:attachment":[{"href":"https:\/\/jasonralph.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1153"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jasonralph.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1153"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jasonralph.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1153"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}