freckle / stackctl

Manage CloudFormation Stacks through specifications
MIT License
14 stars 1 forks source link

Add withAssumedRole, deprecate assumeRole #75

Closed pbrisbin closed 2 months ago

pbrisbin commented 2 months ago

assumeRole does not spawn a background thread to refresh credentials. This means that if the block goes on long enough, expired credentials errors will start happening.

withAssumedRole addresses this. I chose to make a new function under a different name for two reasons:

  1. The fixed function incurs a MonadUnliftIO constraint. Users could stay on the deprecated function if they're not able to quickly organize things to satisfy this constraint.
  2. The naming better matches the analogous Amazonka function^1.