aws-doc-sdk-examples icon indicating copy to clipboard operation
aws-doc-sdk-examples copied to clipboard

S3Client must be closed

Open gogo-boot opened this issue 6 years ago • 1 comments

Hi,

I just tried the example and got out of memory exception when I upload 1000 of files. to aovid the OoME, S3Client instance must be closed after using.

https://github.com/awsdocs/aws-doc-sdk-examples/blob/216e553160767d0e4671886ea6d91526ccbe2a47/javav2/example_code/s3/src/main/java/com/example/s3/PutObject.java#L51-L55

gogo-boot avatar Nov 19 '20 13:11 gogo-boot

Line 57:

s3.close();

Doug-AWS avatar Nov 19 '20 14:11 Doug-AWS