当月の前日までのAWS利用料金をslackに通知します
Add this line to your application's Gemfile:
gem 'notify_aws_cost', git: 'https://github.com/higeojisan/notify_aws_cost.git'
And then execute:
$ bundle
export SLACK_WEBHOOK_URL='......'
export AWS_ACCESS_KEY_ID='.......'
export AWS_SECRET_ACCESS_KEY='.....'
export AWS_REGION='us-east-1'
require 'notify_aws_cost'
notify = NotifyAwsCost::Notify.new
notify.send
cutomize name and icon
require 'notify_aws_cost'
notify = NotifyAwsCost::Notify.new({name: "higeojisan", icon_emoji: ":smile:"})
notify.send
set warning and critical threshold or either of them
require 'notify_aws_cost'
notify = NotifyAwsCost::Notify.new({warning: 2, critical: 3})
notify.send