Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

(Mis)adventures in the AWS Spot Market

DZone's Guide to

(Mis)adventures in the AWS Spot Market

In this post, one developer goes over some miscellaneous facts and figures I gathered while trying to play around with the AWS spot market.

· Integration Zone ·
Free Resource

The Future of Enterprise Integration: Learn how organizations are re-architecting their integration strategy with data-driven app integration for true digital transformation.

Spot requests, a.k.a. bids, go to the Amazon order book and then the requests transition through a few states and statuses. The states are still not clear to me. While putting in requests I was able to configure most of the variables I expect to be able to configure for an EC2 instance. One thing I liked is that there is an event stream associated with the request and when a request is canceled it also kills any associated instances for that request, assuming the request was actually fulfilled with a running EC2 instance.

This is what the event stream looks like but it is not clear if there is an associated API with webhooks for the lifecycle of the request and the associated instance

The above event stream includes one of the errors I encountered. That one is about exceeding some kind of limit that I didn't know was in place so I guess it's nice that they let you know. Another one I ran into was being throttled, presumably because I was limited to one spot instance at a time and I requested 3.

It is a little unfortunate and confusing that the requests have state and status. I'm pretty sure status could just have been part of the state but in true Amazon fashion it is another field in the request

So it looks like a request can be canceling, canceled, active, submitted in terms of state and the status can be empty or fulfilled but I'm sure there are other types of states and statuses that I didn't run into.

I'm still waiting to see the costs I incurred because I'm curious to see how the billing actually works out. I'll need to do another experiment on some more instances where the price is more volatile because I still can't tell how the billing works and how the price is fixed and modified throughout the lifetime of the instance. I'll also probably dig into the API and figure out what all of this looks like from the API side because for real programmatic control it is not possible to avoid the API and the lifecycle events.

Make your mark on the industry’s leading annual report. Fill out the State of API Integration 2019 Survey and receive $25 to the Cloud Elements store.

Topics:
integration ,aws integration ,aws spot market

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}