I have a python script that loops through all of the AWS accounts we have and lists the EC2 instances in each one. 
I want to turn it into an AWS Lambda function. But I can't figure out how to pull the AWS credentials that would allow me to list the servers in all the accounts.
How can I achieve this in AWS Lambda?
Create a role with cross account permissions for ec2:ListInstances
Attach the role to the lambda function
Loop through AWS Accounts in Lambda Python Function