public void deleteAttachment(ERS3Attachment attachment)
throws MalformedURLException, IOException {
AWSAuthConnection conn = attachment.awsConnection();
String bucket = attachment.bucket();
String key = attachment.key();
Response response = conn.delete(bucket, key, null);
if (failed(response)) {
throw new IOException("Failed to delete '" + bucket + "/" + key
+ "' to S3: Error " + response.connection.getResponseCode()
+ ": " + response.connection.getResponseMessage());
}