Skip to content

How-To Guides

AWS Profile Configuration

  • Install AWS CLI - Command line tool.
  • Create an AWS AMI user then extract Access ID & key.
  • Configure AWS CLI profile by:
aws configure <--profile [PROFILE_NAME]>
# ensure you set a defalut region.

Check installed Python version

  • Ensure you Python version is >= 3.12.3 by:
python --version

# Consider update Python version if less than 3

Install eraXplor

  • Install eraxplor too by:
pip install eraXplor

How-To use

eraXplor-aws have multiple arguments set with a default values -explained below-, Adjsut these arguments as required.

eraXplor-aws <--start-date [yyyy-MM-DD]> <--end-date [yyyy-MM-DD]> \
<--profile [PROFILE-NAME]> \
<--groupby [LINKED_ACCOUNT | SERVICE | PURCHASE_TYPE | USAGE_TYPE | LINKED_ACCOUNT-With-SERVICE | LINKED_ACCOUNT-With-PURCHASE_TYPE | LINKED_ACCOUNT-With-USAGE_TYPE]> \
<--out [file.csv]>
<--granularity [DAILY | MONTHLY]>

For Windows/PowerShell users restart your terminal, and you may need to use the following command:

python3 -m eraXplor-aws

# Or
python -m eraXplor-aws

# to avoid using this command, apend the eraXplor to your paths.
# Normaly its under: C:\Users\<YourUser>\AppData\Local\Programs\Python\Python<version>\Scripts\
Note

Ensure you run the command in a place you have sufficient permission to replace file. The eraXport tool sorting cost reult into a CSV file, by default The CSV will replace for next run.

Argument Reference

  • --start-date or -s: (Optional) Default value set as Three months before.
  • --end-date or -e: (Optional) Default value set as Today date.
  • --profile or -p: (Optional) Default value set as default.
  • --groupby or -g: (Optional) Default value set as LINKED_ACCOUNT. The available options are (LINKED_ACCOUNT, SERVICE, PURCHASE_TYPE, USAGE_TYPE, LINKED_ACCOUNT-With-SERVICE, LINKED_ACCOUNT-With-PURCHASE_TYPE, LINKED_ACCOUNT-With-USAGE_TYPE)
  • --out or -o: (Optional) Default value set as cost_repot.csv.
  • --granularity or -G: (Optional) Default value set as MONTHLY. The available options are (MONTHLY, DAILY)