cw icon indicating copy to clipboard operation
cw copied to clipboard

AWS SSO CLI v2 does not work

Open brainstorm opened this issue 5 years ago • 4 comments
trafficstars

Describe the bug

The new AWS CLI v2 provides Single Sign On:

https://aws.amazon.com/blogs/developer/aws-cli-v2-is-now-generally-available/

But doesn't seem to play well with cw:

$ cw ls -p dev groups
no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors

To Reproduce

$ aws configure sso
SSO start URL [https://yourcompany.awsapps.com/start]:
SSO Region [ap-southeast-2]:
Attempting to automatically open the SSO authorization page in your default browser.
If the browser does not open or you wish to use a different device to authorize this request, open the following URL:

https://device.sso.ap-southeast-2.amazonaws.com/

Then enter the code:

CQCS-BFPZ
There are 8 AWS accounts available to you.
Using the account ID <ACCOUNT_ID>
There are 3 roles available to you.
Using the role name "default"
CLI default client Region [ap-southeast-2]:
CLI default output format [None]:
CLI profile name [default]: default

$ aws s3 ls
<LIST OF BUCKETS>

$ cw ls -p dev groups
no valid providers in chain. Deprecated.
	For verbose messaging see aws.Config.CredentialsChainVerboseErrors

brainstorm avatar May 27 '20 11:05 brainstorm

Hi @brainstorm It looks like a bug in the AWS go SDK.

This feels like the best workaround I've found until this is fixed: https://github.com/benkehoe/aws-sso-credential-process

lucagrulla avatar May 30 '20 17:05 lucagrulla

Indeed, I'm using this one instead:

https://github.com/victorskl/yawsso

brainstorm avatar May 31 '20 08:05 brainstorm

Hi @lucagrulla, it looks like the AWS Go SDK now supports AWS SSO: https://aws.amazon.com/blogs/developer/aws-sso-support-in-the-aws-sdk-for-go/

I'm a huge fan of cw. It would be awesome to have SSO Support for cw. I use it every day.

I am used to the workaround mentioned above with aws-sso-util -> yawsso, but it would be helpful for other members of my team if I didn't have to write out instructions on how to use the workaround :) Would you consider re-opening this issue, in case anyone wants to take this on?

kmcquade avatar Sep 23 '22 19:09 kmcquade

Thanks @kmcquade.

The issue is nor re-opened.

lucagrulla avatar Sep 24 '22 13:09 lucagrulla

Released with v4.1.3

lucagrulla avatar Apr 21 '23 18:04 lucagrulla