awslabs / amazon-emr-cli

A command-line interface for packaging, deploying, and running your EMR Serverless Spark jobs
Apache License 2.0
35 stars 12 forks source link

Add support for `--profile` flag for choosing AWS profile #20

Open kaheicanaan opened 1 year ago

kaheicanaan commented 1 year ago

Currently, all boto3 clients are initiated without specifying the AWS profile name. Hence, the default profile will be used.

Adding the --profile flag would significantly improve the handiness of the CLI because it is very common to switch the profile frequently during development (for example, changing the target environment between dev and prod by switching the AWS profile).

lmouhib commented 1 year ago

Hi, thanks for raising this. We have it in our plan, there is a PR for it already.

dacort commented 1 year ago

Thanks for opening the issue @kaheicanaan! As @lmouhib mentioned, in progress just need to make sure it works across all the different clients. :)

I'm curious, does setting AWS_PROFILE environment variable work for you if you want to use a different profile? Or are you looking for functionality similar to the AWS CLI?

kaheicanaan commented 1 year ago

Thanks for opening the issue @kaheicanaan! As @lmouhib mentioned, in progress just need to make sure it works across all the different clients. :)

I'm curious, does setting AWS_PROFILE environment variable work for you if you want to use a different profile? Or are you looking for functionality similar to the AWS CLI?

Oh, it works for me as well. I didn't notice that there is another way to change the AWS profile.