import os,sys
import boto3
import datetime
import logging
import pandas as pd
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--months', type=int, default=3)
parser.add_argument('--SES_SEND', type=str, required=True)
args = parser.parse_args()
SES_SEND = args.SES_SEND
# For date
from dateutil.relativedelta import relativedelta
# For email
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.utils import COMMASPACE, formatdate
# Global Variables
if os.environ.get('SES_REGION'):
SES_REGION = os.environ.get('SES_REGION')
SES_FROM = os.environ.get('SES_FROM')
else:
print("SES Variables are required to set in Environments")
sys.exit()
print(SES_SEND)
print(SES_REGION)
print(SES_FROM)
class CostExplorer:
def __init__(self, CurrentM