- 
                Notifications
    
You must be signed in to change notification settings  - Fork 4.3k
 
Closed
Labels
effort/largeLarge work item – several weeks of effortLarge work item – several weeks of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p1package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI
Description
AWS 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
Mikkel-Gram, skorfmann, jaredtbates, xeres, JFox and 642 moreMarrickLip, khrno, heikkis, davegariepy, ronaldocpontes and 79 more
Metadata
Metadata
Assignees
Labels
effort/largeLarge work item – several weeks of effortLarge work item – several weeks of effortfeature-requestA feature should be added or improved.A feature should be added or improved.p1package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI