def main(): ec2_client = boto3.client('ec2') ec2 = ec2_service.ec2(ec2_client) ec2_response = ec2.import_ec2_service() print(ec2_response['Reservations']) return ec2_response
def get_instances_info(vpc_id, ec2): print('get_vpc_info - start') instances = ec2_service.ec2(ec2) get_ec2_info = instances.get_instance_ids(vpc_id) finish = str(time.perf_counter()) print('get_instances_info - ' + finish) return get_ec2_info
def get_instances_info(vpc_id, ec2): instances = ec2_service.ec2(ec2) get_ec2_info = instances.get_instance_ids(vpc_id) return get_ec2_info
def get_ec2_info(ec2): ec2 = ec2_service.ec2(ec2) get_instances_info = ec2.describe_ec2s() return get_instances_info