Run the following AWS CLI command using your own key pair name. It creates an EC2 instance using a specific AMI and instance type, which, in this case, is the economical t2.micro:
aws ec2 run-instances
--image-id ami-9be6f38c
--instance-type t2.micro
--key-name <your-key-pair-name>