Which of the following is a method for bidding on unused EC2 capacity based on the current spot price?

on-demand instance
reserved instances
spot instance
all of the mentioned

The correct answer is C. spot instance.

Spot instances are a type of Amazon Elastic Compute Cloud (EC2) instance that you can bid on and use at a much lower price than on-demand instances. Spot instances are available when Amazon has spare capacity, and they can be terminated if Amazon needs the capacity back.

On-demand instances are available 24/7 and are billed by the hour. Reserved instances are available for a one- or three-year term and are billed at a lower price than on-demand instances.

Here is a table that summarizes the differences between the three types of EC2 instances:

| Instance type | Availability | Price |
| — | — | — |
| On-demand instance | 24/7 | Hourly |
| Reserved instance | 1 or 3 years | Lower than on-demand |
| Spot instance | When Amazon has spare capacity | Lower than on-demand, but can be terminated |

I hope this helps! Let me know if you have any other questions.