mardi 6 octobre 2015

S3 warning: "No content length specified for stream data"

I suddenly started seeing this warning message being logged, even though there were no changes in the usage of or on the underlying aws libs. I've been using aws-java-sdk version 1.6.9.1

No content length specified for stream data. Stream contents will be buffered in memory and could result in out of memory errors.

This is howthe file is uploaded:

client.putObject(bucketName, key, new ByteArrayInputStream(data), new ObjectMetadata())

I suspect I may be seeing this because I'm not setting the content length on the ObjectMetadata object, but that's how it was before and no warning was being generated.

Anyone has any insight as to why this warning message would suddenly start appearing?

Thanks!




Aucun commentaire:

Enregistrer un commentaire