def s3_delete(id): s3conn = boto.connect_s3(AWS_ACCESS_KEY,AWS_SECRET_ACCESS_KEY) bucket = s3conn.get_bucket(S3_BUCKET) k = Key(bucket) k.key = 'id-' + str(id) k.delete()