iceberg-python: There is a bug with the new version of boto used by s3fs that prevents writes to non-AWS S3 buckets
Apache Iceberg version
0.8.1 (latest release)
Please describe the bug ๐
Here is a link to the relevant boto issue: https://github.com/boto/boto3/issues/4398
Attempting to use table.append or table.overwrite when using the 1.36.x version installed by default with s3fs causes a very confusing error botocore.exceptions.ClientError: An error occurred (MissingContentLength) when calling the PutObject operation: None
The workaround is to downgrade back to botocore 1.35.99 manually.
Iโm unsure if thereโs work on the pyiceberg side to resolve this but I am posting this issue for others like me googling this issue and struggling to find answers.
I might also suggest pyiceberg consider a library that doesnโt rely on AWS controlled boto and uses something more like s2cmd that is more S3-agnostic for those of us using things like Digital Ocean, minio, backblaze, etc.
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 15 (5 by maintainers)
Just an update, setting the environment variable as such fixes the issue:
export AWS_REQUEST_CHECKSUM_CALCULATION='WHEN_REQUIRED'I updated the s3fs issue as well. I guess now we wait for next steps. This will fix it for people in the meantime however without having to downgrade.
IMO locking the version seems like an ok temp fix, but the better fix is likely to figure out how to get the extra params down to botocore. I commented in the s3fs issue with a link to the issue in botocore that mentions the configs to disable this on the botocore side.
Edit: According to the s3fs people there is an env var we can try, and if it fixes the issue they will figure out a way to expose it programmatically - then on the pyiceberg side it should be possible to resolve this without locking to an issue. I will attempt to try this in the next day or 2 unless someone beats me to it.