AWS SSO Named Profiles Support
See original GitHub issueAWS CLI v2 supports AWS SSO named profiles.
However, CDK CLI cannot resolve SSO named profiles yet.
$ cdk deploy --profile sso-named-profile
Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment
Without this feature, users have to login to SSO user portal and fetch credentials for command line and CLI access, which needs to be repeated every time the credentials expire.
Even though CLI v2 is still in preview, it would be good to have this feature implemented for early adopters.
Use Case
- Simplify deployments to multiple-accounts for AWS SSO users.
Proposed Solution
- Read sso_start_url, sso_role_name and sso_account_id from ~/.aws/config file.
- Fetch the accessToken in ~/.aws/sso/cache/ matching sso_start_url.
- Fetch temporary credentials from STS using SSO.get-role-credentials() with accessToken, sso_account_id and sso_role_name parameters.
This is a 🚀 Feature Request
Issue Analytics
- State:
- Created 4 years ago
- Reactions:727
- Comments:56 (16 by maintainers)
Top Results From Across the Web
Configuring the AWS CLI to use AWS IAM Identity Center ...
Configure your profile with aws configure sso ... Run the aws configure sso command and provide your IAM Identity Center start URL and...
Read more >You only need to call`aws sso login` once for all your profiles
A profile configured for AWS SSO includes the AWS SSO instance (the start URL and the region that AWS SSO is configured in),...
Read more >sso — AWS CLI 2.9.10 Command Reference
The aws configure sso command interactively prompts for the configuration values required to create a profile that sources temporary AWS credentials from ...
Read more >How to setup AWS CLI with AWS SSO - CloudQuery
AWS SSO makes it easy to centrally manage SSO Access to multiple AWS accounts, moves the authentication to the IdP (Identity Provider) and ......
Read more >How to set up AWS CLI with AWS Single Sign-On (SSO)
Install AWS CLI · Enable AWS SSO · Create an AWS SSO user · Create a permission set and assign it to the...
Read more >
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
Top Related Tweet
No results found
Top Related Hashnode Post
No results found
Given the CLI is now GA, and it seems a number of other users are facing this issue would it be possible to at least add a note to the docs indicating the lack of support at this time?
@ericzbeard - is this something that’s being considered at all? Are there blockers for implementing this that we just aren’t aware of? This issue has been open for 2 years, so I just want to know if we should be looking for a more permanent workaround or if we can expect this to be implemented in the foreseeable future