How can I list all the EC2 instances in a region using AWS CLI?
In order to list EC2 instance using AWS CLI, you need to perform the following steps:
Refer to this AWS documentation for installation of AWS CLI
Refer to this Confluence page to understand how to set up AWS CLI profile using AWS SSO within NXP.
aws ec2 describe-instances --region us-west-2 --profile my-profile-name