Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support @profile in the console URL #61

Open
erstaples opened this issue Apr 15, 2023 · 0 comments
Open

Support @profile in the console URL #61

erstaples opened this issue Apr 15, 2023 · 0 comments
Labels

Comments

@erstaples
Copy link

Current functionality

I invoke the workflow with aws @sandbox apigateway apis, @sandbox is ignored, and the console is opened to whichever profile I currently have open in the console session.

Proposed functionality

I invoke the workflow with aws @sandbox apigateway apis and I'm taken to https://signin.aws.amazon.com/switchrole with the fields pre-populated based on the profile's settings using URL params, with the redirect_uri set to the target URI.

https://github.com/tilfinltd/aws-extend-switch-roles is a good example of this in practice.

Example

I have a sandbox profile defined in ~/.aws/config:

[profile sandbox]
role_arn = arn:aws:iam::123456789012:role/AdminRole
region = us-east-1
source_profile = default

Invoke the workflow with aws @sandbox apigateway apis:

Current: https://us-east-1.console.aws.amazon.com/apigateway/main/apis?region=us-east-1

Proposed: https://signin.aws.amazon.com/switchrole?account=123456789012&roleName=AdminRole&displayName=sandbox&src=nav&redirect_uri=https%3A%2F%2Fus-east-1.console.aws.amazon.com%2Fapigateway%2Fmain%2Fapis%3Fregion%3Dus-east-1

@rkoval rkoval added the bug label Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants