binbashar / leverage

Binbash Leverage CLI intended to orchestrate Leverage Reference Architecture for AWS (www.binbash.co/leverage)
https://pypi.org/project/leverage/
Apache License 2.0
17 stars 2 forks source link

Feature | Automated profile/region selection when using AWS Cli commands #222

Closed juanmatias closed 9 months ago

juanmatias commented 1 year ago

Describe the Feature

When running AWS Cli commands with Leverage the profile and region should be automatically selected and passed as parameter to AWS Cli.

Expected Behavior

When running an AWS Cli command, taking advantage of the binbash Leverage tool, e.g.:

leverage aws s3 cp --profile my-profile-name ./test-kungfoo s3://my-bucket-name

...the used profile is the one is already set in the binbash Leverage environment (same for region). This profile is the default one for the proyect+account+role combination, so binbash Leverage could set this automagically for me.

Use Case

When working with AWS resources, it is faster to interact with them using the AWS Cli. (as opposed to Web Console) Since binbash Leverage has the credentials already set in its environment, we can take advantage of it and use those credentials automagically to configure the AWS Cli.

So, instead of:

leverage aws s3 cp --profile my-profile-name ./test-kungfoo s3://my-bucket-name

I could simply run:

leverage aws s3 cp ./test-kungfoo s3://my-bucket-name

Same goes for region.

"It is one small step for man, one giant leap for mankind."

Describe Ideal Solution

binbas Leverage adding needed parameters when AWS Cli command is run.

Alternatives Considered

Keep adding profile and region manually.

Additional Context

I know not many people use it, but since it is useful for me I think it can be useful for more people when they find this is possible.

exequielrafaela commented 9 months ago

Even if this could be seen as nice to have, for the moment we'll close this issue till customer projects requires it. This will give more space to work on more urgent fixes and features.