How to list MAC Address of an AWS EC2 instance with Python and boto3
Question: how to find out information about MAC address of Amazon EC2 instances using
the Python boto3 library.


Answer: Assuming you have one network interface attached to your instances. If you
have more than one network interface attached to your instances, tweak the
code to your needs.

    
    
    import boto3
    
    ec2 = boto3.resource('ec2')
    insts = list(ec2.instances.all())
    for inst in insts:
      for iface in inst.network_interfaces:
        print inst.instance_id, iface.mac_address
    

