Amazon AWS SDK v2
24 Feb 2015Recently I noticed that my hobby project usbunfreeze uses AWS SDK version 1. It was fresh vesion when I wrote it at New Year holidays. But a few weeks later the Version 2 became available. It was a challenge to explore a new API without any good up-to-date examples and tutorials. Older SDK contains a lot of official working examples inside. All Ruby service mappings were standard classes with well-defined methods without metaprogramming magic. Then Amazon moved to description of their services via JSON manifests (i.e. EC2.api.json). It is definitely more generic approach but there is no way to look inside the code and check an implementation. Only rubydocs. It looks like YARD docs are also automatically generated from JSON manifests…
All things became clearer when you understand the logic behind the mappings for each service. API is more flexible than v1, allows pagination, advanced async mechanics, provides more structured responses with automatic deserialization. The best reference to hack the new API is an official AWS SDK Ruby blog with a few examples and service descriptions in SDK. Very few projects moved to the new API so GitHub is not the best helper. Hope my project will be usefuly for someone who hacking new SDK right now :)