fix deleting bucket

This commit is contained in:
Chris Lu
2018-11-08 22:15:21 -08:00
parent 70008b093e
commit 2697d6a4fb
2 changed files with 10 additions and 1 deletions

View File

@@ -79,6 +79,13 @@ public class PutObject {
// test deletes
s3Client.deleteObject(bucketName, stringObjKeyName);
// delete bucket
String tmpBucket = "tmpbucket";
s3Client.createBucket(tmpBucket);
s3Client.putObject(tmpBucket, stringObjKeyName, stringContent);
s3Client.deleteBucket(tmpBucket);
} catch (AmazonServiceException e) {
// The call was transmitted successfully, but Amazon S3 couldn't process
// it, so it returned an error response.