Is there a way to export details of all EC2s in an AWS account?
You can use AWS CLI and run the below command to get details of all ec2 instances in your account.
aws ec2 describe-instances

You can also use filters, if required. Please refer the documentation.