I'm making an RDP application, using the Amazon S3 Bucket service, to store images for viewing, and later deletion.
My current flow is as follow:
This whole process, is repeated once every half a second. So this doesn't actually store the images for very long, only the transfer rate is high.
This process also only runs, when the RDP Service I made is enabled, which could range from 30 seconds to 5 minutes. (So that's maximum of 600 upload requests, and 600 delete requests).
Now, taking into consideration these conditions, why would Amazon delete my Bucket automatically? Is this a restriction, an automatic abuse-mechanism or is it simply a bug?
What could I do to prevent this?
Upload code I use
TransferUtility aws = new TransferUtility(accessKeyId, secretAccessKey, Amazon.RegionEndpoint.EUWest1);
aws.Upload(imageFile, bucketName, imageKey + ".jpg");
Delete request code I use
var dor = new DeleteObjectRequest();
dor.Key = key;
dor.BucketName = bucketName;
Amazon.S3.AmazonS3Client sc = new Amazon.S3.AmazonS3Client(accessKeyId, secretAccessKey, Amazon.RegionEndpoint.EUWest1);
var response = sc.DeleteObject(dor);
I've not heard of AWS deleting buckets proactively - but there are limits on how many buckets you can create (I believe it is 100 without increasing an account override).
I do question why you keep creating and deleting buckets however - I would think you would be better of creating a bucket and then adding and deleting objects within that bucket, instead of deleting the bucket itself. There is no charge for having an empty bucket, if that is your concern.
Also, make sure the region you are creating the bucket in, is the same place you are looking to see the bucket - just in case you are looking in the wrong place.