Skip to content

Commit

Permalink
Clean up code slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
Tehnix committed May 24, 2022
1 parent 5d5b5f2 commit 8845dfd
Show file tree
Hide file tree
Showing 5 changed files with 667 additions and 1,219 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Sends daily breakdowns of AWS costs to a Slack channel.
```

1. Install pipenv

```
pip install pipenv
```
Expand All @@ -44,7 +44,7 @@ Sends daily breakdowns of AWS costs to a Slack channel.
You can also run it once to verify that it works:

```
serverless invoke --function report_cost --stage="prod" --param="slack_url=https://hooks.slack.com/services/xxx/yyy/zzzz"
serverless invoke --function reportCost --stage="prod" --param="slack_url=https://hooks.slack.com/services/xxx/yyy/zzzz"
```

## Support for AWS Credits
Expand All @@ -61,7 +61,7 @@ If you have AWS credits on your account and want to see them taken into account

## Support for other Dimensions

If you have and AWS Organisation established and would like to see a breakdown by account, you can override the default dimensions with parameters:
If you have and AWS Organisation established and would like to see a breakdown by account, you can override the default dimensions with parameters:

```
serverless deploy \
Expand All @@ -73,18 +73,18 @@ If you have and AWS Organisation established and would like to see a breakdown b
Possible value for `group` are:

* AZ
* INSTANCE_TYPE
* LINKED_ACCOUNT
* INSTANCE_TYPE
* LINKED_ACCOUNT
* OPERATION
* PURCHASE_TYPE
* PURCHASE_TYPE
* SERVICE
* USAGE_TYPE
* PLATFORM
* USAGE_TYPE
* PLATFORM
* TENANCY
* RECORD_TYPE
* LEGAL_ENTITY_NAME
* INVOICING_ENTITY
* DEPLOYMENT_OPTION
* LEGAL_ENTITY_NAME
* INVOICING_ENTITY
* DEPLOYMENT_OPTION
* DATABASE_ENGINE
* CACHE_ENGINE
* INSTANCE_TYPE_FAMILY
Expand All @@ -97,7 +97,7 @@ Possible value for `group` are:

## Other Useful CLI Arguments Related to your AWS account

By default, `AWS_PROFILE` and `AWS_REGION` are defaulting to `default` and `us-east-1`. These value can be changed by modifying the environment. For aws account, sensible default is attempted to be retrieved. For example, boto3 is used to try and determine your AWS account alias if it exists, and if not your AWS account ID.
By default, `AWS_PROFILE` and `AWS_REGION` are defaulting to `default` and `us-east-1`. These value can be changed by modifying the environment. For aws account, sensible default is attempted to be retrieved. For example, boto3 is used to try and determine your AWS account alias if it exists, and if not your AWS account ID.
Additionally, for your AWS region the environment variables `AWS_REGION`, then `AWS_DEFAULT_REGION` are read and used if present, otherwise fallback to 'us-east-1' (N. Virginia).

```
Expand Down
1 change: 0 additions & 1 deletion handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import datetime
import os
import requests
import sys

n_days = 7
yesterday = datetime.datetime.today() - datetime.timedelta(days=1)
Expand Down
Loading

0 comments on commit 8845dfd

Please sign in to comment.