def get_vpc_instance_ips(ec2) ->list:
    """
    List Public and Private IPs from EC2 instances inside a VPC in the
    account
    """
    boto_instances = ec2.describe_instances()
    vpc_instances_ips = []
    for instance_obj in boto_instances['Reservations']:
        for instance in instance_obj['Instances']:
            for instance_net in instance['NetworkInterfaces']:
                if 'Association' in instance_net:
                    vpc_instances_ips.append(instance_net['Association'][
                        'PublicIp'] + '/32')
                if 'PrivateIpAddress' in instance_net:
                    vpc_instances_ips.append(instance_net[
                        'PrivateIpAddress'] + '/32')
                if 'PrivateIpAddresses' in instance_net:
                    for priv_ip in instance_net['PrivateIpAddresses']:
                        if 'Association' in priv_ip:
                            vpc_instances_ips.append(priv_ip['Association']
                                ['PublicIp'] + '/32')
                        if 'PrivateIpAddress' in priv_ip:
                            vpc_instances_ips.append(priv_ip[
                                'PrivateIpAddress'] + '/32')
    return vpc_instances_ips
