Skip to content

Instantly share code, notes, and snippets.

@devenes
Created June 11, 2022 18:26
Show Gist options
  • Save devenes/c71f246a8f92225c708826e0789498b9 to your computer and use it in GitHub Desktop.
Save devenes/c71f246a8f92225c708826e0789498b9 to your computer and use it in GitHub Desktop.
the prices of spot instances

See the prices of spot instance with the following command

aws ec2 describe-spot-price-history  --start-time 2022-05-11T12:00:00 \
	--filters "Name=instance-type,Values='t3.medium','t4g.medium','t3a.medium','t2.medium','c3.large','m4.large'" \
	--product-description "Linux/UNIX" --query 'SpotPriceHistory[*].[AvailabilityZone,InstanceType,SpotPrice,Timestamp]' \
	--output table --region us-east-1|sort -r +4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment