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

Need ability to execute aws pack actions to different AWS accounts/regions #112

Closed
k-willowhawk opened this issue Apr 22, 2021 · 3 comments

Comments

@k-willowhawk
Copy link

I have a primary use case where I want to use orchestration through ST2 to carry out actions in different AWS accounts or regions, which will require being able to override the pack-configured access key and secret key, or the region, or both.

I don't see a method to do this built into the actions, and there doesn't seem to be any way to override these values short of writing out to a aws-cli config/credentials pair and running core.local actions instead of using this fine pack.

Thoughts?

@blag
Copy link
Contributor

blag commented Apr 22, 2021

This timing is really good.

For future travelers, here is some reading material, in order:

  1. StackStorm forum post about multi profiles, including a discussion about security implications and different implementation strategies
  2. Prior art in the AWS CLI
  3. PR implementing multiple profiles for the Jira pack - ran into a bug in StackStorm config parsing that broke this PR
  4. PR hopefully fixing the StackStorm config parsing bug

@k-willowhawk I see you found the forum post. Would you be interested in drafting a PR for this pack implementing multiple profiles?

I'm not going to have time to circle back around to this for at least another month or two.

@amanda11
Copy link
Contributor

Please also note that the aws-boto3 pack already supports multi-region support. So migrating from the aws to the aws-boto3 pack also allows AWS commands to be run across multi-regions: https://github.com/StackStorm-Exchange/stackstorm-aws_boto3

@k-willowhawk
Copy link
Author

@amanda11 thank you, that was exactly what I needed. I at first dismissed the boto3 pack because I didn't understand it, and it appeared to only have a few actions vs. the thousands of actions in the aws pack. Now I see that it really has two actions... AssumeRole and Boto3Action, which when used in concert, do exactly what I needed. We can close this issue.

@blag since the aws-boto3 pack is a cleaner and more scalable implementation, I'm converting my workflows to leverage it. I spent some time learning Python over the last week to understand what it was doing, and after testing it out outside of ST2, I understand the power and simplicity of it.

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

No branches or pull requests

3 participants