#Silly thing to put a nerdy ascii banner in print(" ") print(" ") init(strip=not sys.stdout.isatty()) # strip colors if stdout is redirected cprint(figlet_format('AWS CONF', font='doom'), 'red', attrs=['bold']) #os.system('pause') is a neat way of allowing the user to "unpause" the application os.system('pause') #instantiate all the AWS objects res = Resources.Resource() ec2 = res.EC2Resource() ec2_cont = EC2.EC2Controller() ebs_cont = Volumes.Volumes() s3 = res.S3Resource() contS3 = S3.S3Controller() cw = res.CWClient() contCW = CloudWatch.CWController() tags = [{"Key": "key1", "Value": "value1"}, {"Key": "key2", "Value": "value2"}] #function that renders the menu def print_menu(): print(75 * "-") print("---Aidan Reilly - R00156542---" + 45 * "-") print(" ") print(" ") print(75 * "-") print("Use this program to work with AWS using Python and Boto3.") print("Select from the options below.")
def s3_controller(self): # get S3 Controller if self.s3_cont is None: self.s3_cont = S3.S3Controller(self.s3_res) return self.s3_cont