Is there a way to configure an Amazon S3 bucket, or the AWS SDK on iOS, so that all uploads to a bucket are atomic?
That is, I want to configure the bucket or the SDK so that if an upload does not complete successfully, it does not leave the partially uploaded file or any other new object in the bucket.
Like it was said on the comments, if you're not using multipart uploads, you should get that out of the box.
If you are using multipart uploads, there are two things to consider:
You can create a bucket lifecycle policy that cleans up incomplete uploads (AbortIncompleteMultipartUpload policy), as detailed in the lifecycle guidelines:
Amazon S3 supports a bucket lifecycle rule that you can use to direct Amazon S3 to abort multipart uploads that don't complete within a specified number of days after being initiated. When a multipart upload is not completed within the time frame, it becomes eligible for an abort operation and Amazon S3 aborts the multipart upload (and deletes the parts associated with the multipart upload).
You can attach a rule to only certain prefixes or to the entire bucket, which sounds more appropriate to your use case. You can find more details about bucket lifecycles in the S3 lifecycle rules docs.