def create_instance_object()

in traffic_mirroring/app_helper.py [0:0]


def create_instance_object(instance_details):
    subnet_id = instance_details["SubnetId"]
    vpc_id = instance_details["VpcId"]
    # Extracting only primary interface
    network_interface_id = instance_details["NetworkInterfaces"][0]["NetworkInterfaceId"]
    tags = parse_instance_tags(instance_details)

    return Instance(network_interface_id, subnet_id, vpc_id, tags)