Describe terminated ec2 instances, or access spot instance history via CLI

amazon ec2amazon-web-servicesaws-cli

I'm trying to get the launch and termination times of instances in a spot fleet request. This data is visible in the new spot requests console under the "History" tab when a spot request is selected. aws ec2 describe-instances only lists recently terminated instances (in accordance with the docs).

Short of saving my browser cookies and making requests to the URL used by the console (https://console.aws.amazon.com/ec2sp/services/fleet/<sfr-id>/history), is there a CLI command that will expose this data?

Best Answer

The cli request you are looking for is the newly added describe-spot-fleet-request-history This is still under the aws ec2 command chain. There have been several added that could be useful.

describe-spot-fleet-instances describe-spot-fleet-request-history describe-spot-fleet-requests