How to list EC2 security group *rules* from within instance?

Solution 1:

You can't. You can get a list of groups you're in at http://169.254.169.254/latest/meta-data/security-groups but it won't give you the rules themselves.