删除桶策略

您可以使用 delete_bucket_policy 接口删除桶策略。以下代码展示如何删除一个桶的策略:

def delete_bucket_policy(client, bucket_name)
  client.delete_bucket_policy(bucket: bucket_name)
  puts 'Bucket policy deleted.'
rescue StandardError => e
  puts "Error deleting bucket policy: #{e.message}"
end