title: C# S3 API DeleteObject throwing 409 Conflict: The bucket your tried to delete is not empty
body: <p>When attempting to delete an object via the S3 API (AWSSDK.S3 v3.1.0.0)
  I receive the following error messaging</p>
  
  <pre><code>[WebException: The remote server returned an error: (409) Conflict.]
  [AmazonS3Exception: The bucket you tried to delete is not empty]
  </code></pre>
  
  <p>I am NOT attempting to delete a bucket, nor do I wish to delete a bucket.</p>
  
  <p>This is the code in my class:</p>
  
  <pre><code>    public static void Delete(string filename)
      {
          using (AmazonS3Client client = new AmazonS3Client(ACCESS_KEY_ID, SECRET_ACCESS_KEY, RegionEndpoint.USEast1))
          {
              var deleteRequest = new DeleteObjectRequest();
              deleteRequest.BucketName = BUCKET;
              deleteRequest.Key = Path.GetFileName(filename); //ensure only the filename is sent as key, not the path
              client.DeleteObject(deleteRequest);
          }
      }
  </code></pre>
  
  <p>The API is pretty simple, the calling conventions are straight forward, any ideas why I would be getting a failure to delete a bucket while calling DeleteObject?</p>