aws-billing-reporting

command module
v0.0.0-...-da76d11 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2020 License: MIT Imports: 15 Imported by: 0

README

aws-billing-reporting

Go Report Card

Small serverless service for monthly AWS usage reporting

The service sends notifications in Slack channel with aggregated costs for Billing tag in AWS

Deployment
  1. Copy .env-sample to .env and fill it. You need to specify only (AWS_ACCESS_KEY and AWS_SECRET_ACCESS_KEY) or AWS_PROFILE for terraform. User should be able to create new IAM roles/policies and use Lambda and CloudWatch services
  2. Define TF_VAR_SLACK_WEBHOOK_URL as a Slack incomming webhook URL
  3. Load environment variables

export $(xargs < .env)

  1. Compile and archive lambda function

GOOS=linux go build main.go && zip main.zip main

  1. Deploy serivice to AWS using terraform

cd iac && terraform apply

Schedule can be adjusted by modifying schedule_expression in cost-reporter.tf using rate or cron expressions: AWS Scheduled Events

Slack notification format
2020-05-01 - 2020-06-01
Projects hardware expences (AWS):
project_1: $232.32
project_x: $140.96
project_foo: $102.2

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL