Skip to content

Instantly share code, notes, and snippets.

View egallis31's full-sized avatar
πŸ’­
its all up πŸš€

Evan Gallis egallis31

πŸ’­
its all up πŸš€
View GitHub Profile
#!/usr/bin/env python3
"""
AWS SSO Profile Management Helper
Creates and manages AWS SSO profiles in ~/.aws/config.
Handles SSO login and profile authentication.
Usage:
# List accounts from SSO and create profiles
python3 scripts/aws-sso-profiles.py --discover --profile org-management
@egallis31
egallis31 / get-azure-prometheus-metrics-cost.py
Last active June 3, 2024 20:29
Get Azure Managed Promtheus metrics and guestimate cost per metric, with ability to search on job label
# Summarize per interval cost by Metric for Azure Managed Prometheus
# Author: egallis31
# Utilizes MSAL Native authentication to authenticated via OAUTH as required
# Requirements: prometheus_api_client, azure.identity
import json
from time import sleep
from azure.identity import DefaultAzureCredential
from prometheus_api_client import PrometheusConnect

Keybase proof

I hereby claim:

  • I am egallis31 on github.
  • I am egallis (https://keybase.io/egallis) on keybase.
  • I have a public key whose fingerprint is D412 00B5 807D D62A 5777 C329 5601 F28C F141 9981

To claim this, I am signing this object: