I'm trying to get the User Owner of any particular AWS resource, be it instance, volume, security group etc..
I searched but could not find any helpful information apart from this Link, This is what I found closer [The answer suggests we can get the user who created an instance] to what I'm looking for but still couldn't use it as the code mentioned is not complete.
If I consider the code from above mentioned post's answer, the following line
ct_conn = sess.client(service_name='cloudtrail',region_name='us-east-1')
is mentioned without defining the "sess".