Optum / dce-cli

Disposable Cloud Environment CLI
Apache License 2.0
37 stars 19 forks source link

Support named AWS profiles #103

Open AlexChesters opened 1 week ago

AlexChesters commented 1 week ago

Is your feature request related to a problem? Please describe.

Currently the DCE CLI does not support named AWS CLI profiles.

Describe the solution you'd like

I would like a new credential option included in https://dce.readthedocs.io/en/latest/howto.html#configuring-aws-credentials, support for named profiles.

Describe alternatives you've considered

N/A

Additional context

N/A

dilip0515 commented 1 week ago

@AlexChesters - You can set the profile to ‘aws configure set aws_access_key_id A..... --profile DCE’ instead of ‘aws configure set aws_access_key_id A.....’. The existing dce auth command from the cli allows the profile setting ‘dce --config=dce.yml leases login aaa... --profile dce’ once knowing the lease aaa...

AlexChesters commented 1 week ago

@dilip0515 In my case I'm using AWS SSO, so I don't want to specify long lived access keys like that (I want to avoid them entirely)

I currently have named profiles that work in their entirety, e.g.

MC-N385402:dce chesta02$ aws s3 ls --profile dce-master
2024-06-24 10:59:07 my-bucket

my ask is for dce-cli to be able to use these natively without me needing to acquire long-lived credentials and store them locally (which appears to be the only way forward currently)