Allow for different AWS services to catch up to IAM
Allow for different AWS services to catch up to IAM

When creating roles and launch configurations in "quick succession", as
might happen if you script these things, it is not uncommon for
AutoScaling APIs to report that the instance profile doesn't exist. When
this happens, it is typically some long seconds before AutoScaling picks
it up.

This adds retries on queries that rely on roles existing, to give time
for IAM roles to become visible to other AWS services. 5 seconds seems
to be in the right ballpark, but it frequently takes more time for
AutoScaling to pick up newly created profile.

Tagging of newly created instances is also hampered by this type of lag.
Anecdotally, this seems more frequent when instance provisioning
requires EBS volumes to be created/attached, but is prone to happen in
other circumstances as well.

biochimia/hc2000