Go based cost exploration tool for AWS on multiple accounts
Refer Setup Instructions
-
In Visual Studio Code, Click the Green Button as shown in the image below and select.
-
Start the server
$ go mod tidy $ aws-env go run main.go start
-
In another terminal, query the rest end point
$ AWS_PROFILE=<profile_name> $ http localhost:3000/aws/iam/account 'profile:$AWS_PROFILE'
Get Identity by account - validate setup
$ aws-whoami <aws_profile>
For previous month using aws-vault via aws cli
-
Get Identity by account. Select aws-vault
$ /workspaces/tools/all_bills.sh
-
View Bill
$ column -t -s, /tmp/reports/aws-cost-hub/aws-cli/bill.csv
-
Refer Server Start Flow
-
In Visual Studio Code devcontainer Terminal, Install Go Packages needed for TDD
touch .dev make install-packages
-
Running All Tests
make tdd-unit aws-env make tdd-integration
-
Running Package Level Tests
gotestsum --format testname -- -coverprofile=coverage/coverage.out github.com/rajasoun/aws-hub/app/...