Use the below command to cancel a spot instance request where REQUESTID is the request id of the spot instance.
aws ec2 cancel-spot-instance-requests --spot-instance-request-ids REQUESTID
Use the below command to cancel a spot instance request where REQUESTID is the request id of the spot instance.
aws ec2 cancel-spot-instance-requests --spot-instance-request-ids REQUESTID