This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# A small daemon-like script that looks for checks with "freshness_threshold" attribute and applies it. | |
# Meant to be used with a process supervisor like runit, so it just fails if exception occurs. | |
require 'eventmachine' | |
require 'json' | |
require 'net/http' | |
require 'sensu/transport' | |
require 'sensu/settings' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove "Everyone" from every key on a S3 bucket. | |
# | |
# Environment variables (see boto for more information): AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY | |
# | |
# -b, --bucket: The bucket to scan. | |
# -l, --log: Only log level is INFO, to list the keys being checked and changed. | |
# | |
# Run: remove-everyone.py -b BUCKET -l INFO | |
import argparse, boto, logging |