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 pareidolia
Enhancements
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_vpcs
returns aStruct
with avpcs
field. -
describe_instances
returns aStruct
with areservations
field, that in turn contains anArray
ofStructs
with aninstances
field. -
describe_moving_addresses
returns aStruct
with amoving_address_statuses
field. -
describe_volume_status
returns aStruct
with avolume_statuses
field. - and so on.
pareidolia
returns the contents of the envelope, instead.
-
vpcs
returns anArray
ofVPC
. -
instances
returns anArray
ofInstance
. -
moving_address_statuses
returns anArray
ofMovingAddressStatus
. -
volume_statuses
returns anArray
ofVolumeStatus
.
Consistent Method Names
-
reservations
returns anArray
ofReservation
. -
moving_address_statuses
is an alias formoving_addresses
-
instance_statuses
is an alias forinstance_status
License
pareidolia
is available under the MIT License. See LICENSE.txt
for the full text.