Recommend using module_utils/ec2.py `connect_to_aws` as that gives additional support for security_token, profile, validate_certs etc.