Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaving account_id or region parameter empty causes incorrect AWS configuration for some actions. #104

Open
jamison-rose opened this issue Apr 22, 2020 · 1 comment

Comments

@jamison-rose
Copy link
Contributor

While using the invoke_lambda action on StackStorm 3.1.0 on Python 3.6.9 I encounter a bug with the following lines:

if 'account_id' in kwargs:
self.assume_role(kwargs.pop('account_id'))
if 'region' in kwargs:
self.credentials['region'] = kwargs.pop('region')

Debugging has shown that actions which do not specify an account_id or a region are still receiving them in the kwargs dict, but with a None value.

I would recommend this change:

account_id = kwargs.pop('account_id', None)
if account_id:
    self.assume_role(account_id)

region = kwargs.pop('region', None)
if region:
    self.credentials['region'] = region
@amanda11
Copy link
Contributor

amanda11 commented May 1, 2020

@jamison-rose I also suffered the same problem. I used your proposed fix and your fix in pull request 104 and it solved the problem.
Is there a PR for your proposed change above?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants