A Spot Instance is an instance that utilizes spare EC2 capacity that is accessible at a lower price than On-Demand. Spot Instances allow you to request unused EC2 instances at great savings, allowing you to significantly reduce your Amazon EC2 charges. The Spot price is the hourly pricing for a Spot Instance. Amazon EC2 sets the Spot price for each instance type in each Availability Zone and adjusts it over time based on long-term supply and demand for Spot Instances. Your Spot Instance will run whenever capacity is available, and your request’s maximum price per hour exceeds the Spot price.
In economics, we have the law of “supply and demand,” which states that when the supply increases, the prices tend to fall. And when there’s more demand, prices tend to rise.
Spot Instances can utilize extra EC2 capacity if demand is low. Nonetheless, they may run out of excess EC2 capacity if demand is high, similar to the “supply and demand” concept in economics. We can use Spot Instance on our test environment to lower the cost, but keep in mind that if the demand increases, it can have interruptions.