bucket-blocker
Command line options:
Bucket blocker takes up to 3 flags:
-
profile: Required. The profile to use when connecting to AWS.
-
region: Required. The region where the bucket is located.
-
dry-run: Optional. Defaults to true, meaning no operation will be performed.
-
exclusions: Optional. Comma-delimited list of buckets to exclude from blocking.
-
max: Optional. The maximum number of buckets to block. Between 1 and 100. Defaults to 100, which is the maximum number of buckets that can exist in an AWS account.
You will also need credentials for the relevant AWS account from Janus.
Running the binary
This app runs as a binary executable on both Intel and Apple Silicon architectures. To run the binary, you can either build it from source or download it from the releases page. Apple Silicon users should download the darwin-arm64
binary, while Intel users should download the darwin-amd64
binary.
- Recommended:
wget https://github.com/guardian/bucket-blocker/releases/download/v<VERSION>/bucket-blocker-<ARCHITECTURE>
into a directory of your choice. You can see a list of releases
here. chmod +x
the binary.
- Clone the repository and build the binary using
./build.sh
- Download the binary from the releases page and
chmod +x
the binary
Once you have the binary, you can run it, passing in the desired flags, for example:
./bucket-blocker-darwin-arm64 --profile deployTools --region eu-west-1
Local development
When committing your changes, please use the conventional commit format. This will allow us to automatically generate a changelog and correctly version the application when it is released.
While developing locally, you can test the application using the following command from the root of the repository,
without needing to build the binary:
go run main.go -profile=<PROFILE> -region=<REGION> [OPTIONAL_FLAGS]