You can certainly do this with Wireshark.
In the menu choose Statistics > Endpoints and you will see a window like this:
You might need to copy and paste into Excel to sum the bytes per AS, or use some awk/python one-liner.
If the columns marked AS Number and AS Organization are blank throughout, you need to configure the database for looking these up. It can be a little tricky to find the information but it's well described at Wireshark's documentation https://wiki.wireshark.org/HowToUseGeoIP and summarised here:
Configuration in brief:
- Say where the MaxMind databases are going to go (Edit > Preferences > Name Resolution)
- Download Max Mind's (free) Autonomous System database, unzip it, and put in the directory of previous step
- Reload Wireshark
You will also be able to see the Autonomous System information on the per-packet analysis, and use it in filters and so on.
Internet Protocol Version 4, Src: 18.104.22.168, Dst: 192.168.0.19
[Source GeoIP: ASN 16509, Amazon.com, Inc.]
If you can't get Wireshark to look at the packets directly, and you have Cisco routers in a suitable place, you can use Netflow to capture the packets and export the capture from the router and import it into Wireshark for analysis.
If you have some other problem, consider finding a CSV of the address ranges of the AS numbers, and use awk/python/excel/whatever to do what you need. Search for "ip to asn mapping" and you will find many open source ones.