diff --git a/s3/src/main/java/com/yahoo/ycsb/db/S3Client.java b/s3/src/main/java/com/yahoo/ycsb/db/S3Client.java
index f9f5b2daddbd1e4ced604ec3e3a27cf610b016f5..8ef3f5be38c30bf7f342440bab2203c87a585a47 100644
--- a/s3/src/main/java/com/yahoo/ycsb/db/S3Client.java
+++ b/s3/src/main/java/com/yahoo/ycsb/db/S3Client.java
@@ -353,6 +353,7 @@ public class S3Client extends DB {
         int sizeOfFile = (int)objectAndMetadata.getValue().getContentLength();
         fieldCount = sizeOfFile/sizeArray;
         totalSize = sizeOfFile;
+        objectAndMetadata.getKey().close();
       } catch (Exception e){
         System.err.println("Not possible to get the object :"+key);
         e.printStackTrace();
@@ -431,6 +432,7 @@ public class S3Client extends DB {
       objectData.read(inputStreamToByte, 0, sizeOfFile);
       result.put(key, new ByteArrayByteIterator(inputStreamToByte));
       objectData.close();
+      objectAndMetadata.getKey().close();
     } catch (Exception e){
       System.err.println("Not possible to get the object "+key);
       e.printStackTrace();