Pareidolia - A Library for Clouding Coherently
Overview
pareidolia makes aws-sdk seem more consistent than actually it is.
Why does this exist?
aws-sdk is an excellent gem, but there are a lot of places where the
inconsistencies of the API show through. pareidolia is a thin layer on top of
this, providing the missing consistency.
Installation
gem install pareidoliaEnhancements
Handles Rate Limiting
Rate Limit errors are handled by retrying after a randomized delay of between
1.0 and 4.0 seconds.
Caching
Responses are cached by default, using simple memoization. Every method
includes a ! variant that ignores the cache (and updates it with the
response).
Straightforward Response Payloads
Most AWS calls return an envelope of sorts. More confusingly, the envelope is not consistently shaped.
-
describe_vpcsreturns aStructwith avpcsfield. -
describe_instancesreturns aStructwith areservationsfield, that in turn contains anArrayofStructswith aninstancesfield. -
describe_moving_addressesreturns aStructwith amoving_address_statusesfield. -
describe_volume_statusreturns aStructwith avolume_statusesfield. - and so on.
pareidolia returns the contents of the envelope, instead.
-
vpcsreturns anArrayofVPC. -
instancesreturns anArrayofInstance. -
moving_address_statusesreturns anArrayofMovingAddressStatus. -
volume_statusesreturns anArrayofVolumeStatus.
Consistent Method Names
-
reservationsreturns anArrayofReservation. -
moving_address_statusesis an alias formoving_addresses -
instance_statusesis an alias forinstance_status
License
pareidolia is available under the MIT License. See LICENSE.txt for the full text.