awslabs / pireporter

A comprehensive tool for capturing performance metrics and workload snapshots, and generating in-depth comparison reports for Amazon Aurora PostgreSQL databases. Helps to troubleshoot problems, optimize instance size and cost.
Apache License 2.0
8 stars 4 forks source link

Support pireporter running remotely not in AWS environment #11

Open alecl opened 4 days ago

alecl commented 4 days ago

I managed to get this working locally by:

1) Explicitly setting AWS_REGION so the code doesn't attempt to get it from IMDS 2) Adding some fixes via the moment JS library for my machine not being in UTC like RDS is for snapshot naming

This made it far easier to iterate on the pireporter code, debug in VSCode, etc.

I authorized via my AD integrated account via

aws sso login --profile <profile> eval "$(aws configure export-credentials --profile <profile> --format env)"

aychin-aws commented 1 day ago

Thank you for sharing this.

As you shared it is possible to run the tool locally. You need to set AWS_REGION because there is no way to call IMDS from local machine and you must authenticate yourself. The AWS principal must have the pireporter policy attached.