Answer: A
Spot instances are those instances for which a user has to place a bid on the AWS portal. If the bid price is greater than the amazon price (i.e., spot price), then the spot instances are automatically granted. The user would be charged based on the ‘spot’ price instead of the ‘bid’ price.
If the bid price is lower than the amazon price (i.e., spot price), then the spot instances are cancelled.
Now, if a user has got a spot instance running and if suddenly the spot price goes up, then amazon automatically cancels the instance, and the user is not charged for the extra minutes (rounded to one hour). This is called as amazon’s termination of the spot instance.
In a second case, if a user has got a spot instance running (when the bid price is greater than the spot price and the user is granted the ‘spot instance’ on the ‘spot’ price) and the user by himself voluntarily terminates the spot instance, then the user is charged till the minute he has used the spot instance. This is called the user’s voluntary termination of the spot instance.
With the above introduction, we can proceed with the below calculation.
In the first hour,
Bid price = $0.07
Spot price = $0.06
Therefore the user is granted the spot instance. Now the price for ‘9’ instances for the first hour would be = $0.06 * 9 = $0.54
In the second hour (i.e., for 0.5 hour)
Bid price = $0.07
Spot price = $0.08
Now the spot price is greater than the bid price which will end up in the spot instance being terminated by amazon, and the user is not charged any amount for the instances for the 0.5 hours that the instances ran.
Therefore the total payable amount by the user for ‘9’ instances is = $0.54.
Therefore Option ‘A’ is the correct answer.
Option ‘B’ is incorrect because the total cost is $0.24 which is lesser than $0.54
Option ‘C’ is incorrect because the total cost is $0.00 which is lesser than $0.54
Option ‘D’ is incorrect because the total cost is $0.44 which is lesser than $0.54
For details on spot instances, please refer to the following link-
https://aws.amazon.com/ec2/spot/pricing/