https://www.repost.aws/knowledge-center/troubleshoot-aws-cli-commands-ec2
Why am I receiving errors while trying to run AWS Command Line Interface (AWS CLI) commands on my Amazon Elastic Compute Cloud (Amazon EC2) instance?
aws clitroubleshootrunningcommandsinstances