Skip to content

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

Description

@jamison-rose

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions