This slack bot helps you manage AWS resources via Slack.
- Download package
go get -u github.com/odg0318/aws-slack-bot/cmd/aws-slack-bot
- Go to the package path
cd $GOPATH/odg0318/aws-slack-bot/cmd/aws-slack-bot
- Make sure that config.yml is valid. You can see an example in config.sample.yml
- Build and run
go build && ./aws-slack-bot --config=/path/to/config.yml
Dockefile
is located in docker
directory.
$ make docker-build
$ make docker-run
NOTE: Regular expression is available.
@botname ec2 -name="ec2-name"
@botname ec2 -id="i-xxxx"
NOTE: Name doesn't mean Name
in tags but instance name in Opsworks. To search Name
in tag, use ec2
command.
@botname opsworks -name="instance-name"
debug: false
bot:
name: "BOT_NAME"
emoji: "BOT_EMOJI"
slack:
token: "SLACK_TOKEN_HERE"
aws:
- region: "AWS_REGION"
access_key: "AWS_ACCESS_KEY"
secret_access_key: "AWS_SECRET_ACCESS_KEY"
Configuration is very simple but aws
section needs some explaination.
To use multiple regions or accounts, aws
section should be configured as an array including api key information.
aws:
- region: "us-east-1"
access_key: "AWS_ACCESS_KEY"
secret_access_key: "AWS_SECRET_ACCESS_KEY"
- region: "ap-northeast-2"
access_key: "AWS_ACCESS_KEY"
secret_access_key: "AWS_SECRET_ACCESS_KEY"