https://github.com/mostlygeek/s3-file-maker
Makes random files in S3 to test SQS S3 Events
https://github.com/mostlygeek/s3-file-maker
Last synced: about 1 year ago
JSON representation
Makes random files in S3 to test SQS S3 Events
- Host: GitHub
- URL: https://github.com/mostlygeek/s3-file-maker
- Owner: mostlygeek
- Created: 2018-05-15T19:42:10.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-15T19:43:33.000Z (about 8 years ago)
- Last Synced: 2025-02-12T16:51:49.094Z (over 1 year ago)
- Language: Go
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# S3 File generator
This has a pretty specific use case, [BuildHub#456](https://github.com/mozilla-services/buildhub/issues/465). This will generate random files into S3 and every so often generate a [buildhub.json](https://bugzilla.mozilla.org/show_bug.cgi?id=1442306) file.
## AWS Credentials
Make sure your AWS DEV IAM credentials are in `./aws/config`. Right now it only supports them being your `[default]` credentials... `¯\_(ツ)_/¯`.
## Install and Usage
```
# install dependencies
$ dep ensure
# build it
$ go build main.go
# run it
$ ./main
# run-time options
$ ./main --help
Usage of ./main:
-bucket string
s3 bucket name (default "buildhub-sqs-test")
-chance int
chance out of 100 a buildhub.json file is generated (default 25)
-delay int
milliseconds between creating files (default 2000)
-num int
how many random files will be generated (default 100)
## GENERATE FOR A LONG TIME
$ ./main -num 100000 -delay 1000
## GENERATE LOTS OF FILES QUICKLY
$ ./main -delay 10
## GENERATE LOTS OF BUILDHUB.JSON FILES
$ ./main -chance 80
```