def Save(self, backup, config): conn = S3Connection(config['access_key'], config['secret_key']) bucket = conn.create_bucket('get_name_from_backup') newKey = Key(bucket) newKey.name = backup.description newKey.key = backup.name newKey.set_contents_to_filename(backup.file_location)