antonio-antuan opened a new issue, #29640: URL: https://github.com/apache/airflow/issues/29640
### Apache Airflow Provider(s) amazon ### Versions of Apache Airflow Providers apache-airflow-providers-amazon==7.2.0 ### Apache Airflow version 2.4.3 ### Operating System Arch Linux ### Deployment Docker-Compose ### Deployment details the same for MWAA (aws-managed airflow) ### What happened exception is raised: ``` [2023-02-20, 14:32:02 UTC] {subprocess.py:92} INFO - [[34m2023-02-20, 14:32:02 UTC[0m] {[34mconnectionpool.py:[0m475} WARNING[0m - Failed to parse headers url=[https://BUCKET.s3.us-west-2.amazonaws.com:443/object-key.json:[NoBoundaryInMultipartDefect()], unparsed data: ''[0m [2023-02-20, 14:32:02 UTC] {subprocess.py:92} INFO - Traceback (most recent call last): [2023-02-20, 14:32:02 UTC] {subprocess.py:92} INFO - File "/home/***/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 469, in _make_request [2023-02-20, 14:32:02 UTC] {subprocess.py:92} INFO - assert_header_parsing(httplib_response.msg) [2023-02-20, 14:32:02 UTC] {subprocess.py:92} INFO - File "/home/***/.local/lib/python3.7/site-packages/urllib3/util/response.py", line 91, in assert_header_parsing [2023-02-20, 14:32:02 UTC] {subprocess.py:92} INFO - raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data) [2023-02-20, 14:32:02 UTC] {subprocess.py:92} INFO - urllib3.exceptions.HeaderParsingError: [NoBoundaryInMultipartDefect()], unparsed data: '' ``` ### What you think should happen instead shouldn't be such an exception :) ### How to reproduce the code that downloads data is simple: ``` def download_from_s3(key: str, bucket_name: str, local_path: str) -> str: boto3.set_stream_logger('boto3.resources', logging.DEBUG) hook = S3Hook(aws_conn_id='s3_conn') file_name = hook.download_file(key=key, bucket_name=bucket_name, preserve_file_name=True) return file_name ``` ### Anything else anyway, file is downldaed and looks valid. some logs: ``` [[34m2023-02-20, 15:18:38 UTC[0m] {[34mconnection_wrapper.py:[0m337} INFO[0m - AWS Connection (conn_id='s3_conn', conn_type='aws') credentials retrieved from login and password.[0m 2023-02-20, 15:18:38 UTC boto3.resources.factory [DEBUG] Loading s3:s3 [[34m2023-02-20, 15:18:38 UTC[0m] {[34mfactory.py:[0m66} DEBUG[0m - Loading s3:s3[0m 2023-02-20, 15:18:38 UTC boto3.resources.factory [DEBUG] Loading s3:Object [[34m2023-02-20, 15:18:38 UTC[0m] {[34mfactory.py:[0m66} DEBUG[0m - Loading s3:Object[0m 2023-02-20, 15:18:38 UTC boto3.resources.action [DEBUG] Calling s3:head_object with {'Bucket': 'BUCKET', 'Key': 'object_key.json'} [[34m2023-02-20, 15:18:38 UTC[0m] {[34maction.py:[0m85} DEBUG[0m - Calling s3:head_object with {'Bucket': 'BUCKET', 'Key': 'object_key.json'}[0m [[34m2023-02-20, 15:18:40 UTC[0m] {[34mconnectionpool.py:[0m475} WARNING[0m - Failed to parse headers (url=https://BUCKET.s3.us-west-2.amazonaws.com:443/object_key.json): [NoBoundaryInMultipartDefect()], unparsed data: ''[0m Traceback (most recent call last): File "/home/***/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 469, in _make_request assert_header_parsing(httplib_response.msg) File "/home/***/.local/lib/python3.7/site-packages/urllib3/util/response.py", line 91, in assert_header_parsing raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data) urllib3.exceptions.HeaderParsingError: [NoBoundaryInMultipartDefect()], unparsed data: '' 2023-02-20, 15:18:40 UTC boto3.resources.action [DEBUG] Response: {'ResponseMetadata': {'RequestId': 'W3J4VRW3WQVV8AV7', 'HostId': 'uRLn/mC6mUAPtgAZRcPbdIlkzWNQ8/AKuPn5HuHjJK1CLNAxfES3DXQsnF7HYSia4guuylFLItY=', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amz-id-2': 'uRLn/mC6mUAPtgAZRcPbdIlkzWNQ8/AKuPn5HuHjJK1CLNAxfES3DXQsnF7HYSia4guuylFLItY=', 'x-amz-request-id': 'W3J4VRW3WQVV8AV7', 'date': 'Mon, 20 Feb 2023 15:18:40 GMT', 'last-modified': 'Thu, 09 Feb 2023 10:34:28 GMT', 'etag': '"e7d2a315e24716624b1085cfa7f31ad8"', 'x-amz-server-side-encryption': 'AES256', 'accept-ranges': 'bytes', 'content-type': 'multipart/form-data', 'server': 'AmazonS3', 'content-length': '7004'}, 'RetryAttempts': 0}, 'AcceptRanges': 'bytes', 'LastModified': datetime.datetime(2023, 2, 9, 10, 34, 28, tzinfo=tzutc()), 'ContentLength': 7004, 'ETag': '"e7d2a315e24716624b1085cfa7f31ad8"', 'ContentType': 'multipart/form-data', 'ServerSideEncryption': 'AES256', 'Metadata': {}} [[34m2023-02-20, 15:18:40 UTC[0m] {[34maction.py:[0m90} DEBUG[0m - Response: {'ResponseMetadata': {'RequestId': 'W3J4VRW3WQVV8AV7', 'HostId': 'uRLn/mC6mUAPtgAZRcPbdIlkzWNQ8/AKuPn5HuHjJK1CLNAxfES3DXQsnF7HYSia4guuylFLItY=', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amz-id-2': 'uRLn/mC6mUAPtgAZRcPbdIlkzWNQ8/AKuPn5HuHjJK1CLNAxfES3DXQsnF7HYSia4guuylFLItY=', 'x-amz-request-id': 'W3J4VRW3WQVV8AV7', 'date': 'Mon, 20 Feb 2023 15:18:40 GMT', 'last-modified': 'Thu, 09 Feb 2023 10:34:28 GMT', 'etag': '"e7d2a315e24716624b1085cfa7f31ad8"', 'x-amz-server-side-encryption': 'AES256', 'accept-ranges': 'bytes', 'content-type': 'multipart/form-data', 'server': 'AmazonS3', 'content-length': '7004'}, 'RetryAttempts': 0}, 'AcceptRanges': 'bytes', 'LastModified': datetime.datetime(2023, 2, 9, 10, 34, 28, tzinfo=tzutc()), 'ContentLength': 7004, 'ETag': '"e7d2a315e24716624b1085cfa7f31ad8"', 'ContentType': 'multipart/form-data', 'ServerSideEncryption': 'AES256', 'Metadata': {}}[0m [[34m2023-02-20, 15:18:40 UTC[0m] {[34mconnectionpool.py:[0m475} WARNING[0m - Failed to parse headers (url=https://BUCKET.s3.us-west-2.amazonaws.com:443/object_key.json): [NoBoundaryInMultipartDefect()], unparsed data: ''[0m Traceback (most recent call last): File "/home/***/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 469, in _make_request assert_header_parsing(httplib_response.msg) File "/home/***/.local/lib/python3.7/site-packages/urllib3/util/response.py", line 91, in assert_header_parsing raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data) urllib3.exceptions.HeaderParsingError: [NoBoundaryInMultipartDefect()], unparsed data: '' [[34m2023-02-20, 15:18:40 UTC[0m] {[34mconnectionpool.py:[0m475} WARNING[0m - Failed to parse headers (url=https://BUCKET.s3.us-west-2.amazonaws.com:443/object_key.json): [NoBoundaryInMultipartDefect()], unparsed data: ''[0m Traceback (most recent call last): File "/home/***/.local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 469, in _make_request assert_header_parsing(httplib_response.msg) File "/home/***/.local/lib/python3.7/site-packages/urllib3/util/response.py", line 91, in assert_header_parsing raise HeaderParsingError(defects=defects, unparsed_data=unparsed_data) urllib3.exceptions.HeaderParsingError: [NoBoundaryInMultipartDefect()], unparsed data: '' ``` ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org