question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AWS SSO Support does not work

See original GitHub issue

I currently have SSO credentials using the command aws sso login, which work fine for aws cli (v2) commands, but mssh does not support using these credentials:

mssh i-02d6e842cb8375f64
Unable to locate credentials
mssh --profile nonprod i-02d6e842cb8375f64
Unable to locate credentials
aws --version
aws-cli/2.0.0 Python/3.7.4 Darwin/19.3.0 botocore/2.0.0dev4

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:10
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
derektamsencommented, Nov 9, 2021

AWS SSO credentials with a recent pip install ec2instanceconnectcli appears to be working.

Name: ec2instanceconnectcli
Version: 1.0.2
Summary: Command Line Interface for AWS EC2 Instance Connect
Home-page: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Connect-using-EC2-Instance-Connect.html
Author: Amazon Web Services
Author-email: UNKNOWN
License: Apache License 2.0
Location: /home/user/.local/lib/python3.9/site-packages
Requires: cryptography, botocore
Required-by: 

Reviewing the code it calls botocore.session.get_session() which means support for aws sso is based on whether the dependency botocore supports sso profiles. As of botocore 1.14.0, aws sso profiles are supported. I was able to successful use mssh to connect using aws sso with botocore 1.23.2.

Steps

  1. pip install ec2instanceconnectcli
  2. aws sso login --profile <your_sso_profile_config_name>
  3. mssh --profile <your_sso_profile_config_name> --region <instance_region> <user>@<instance_id>
1reaction
z0mbixcommented, Apr 27, 2021

I ended up creating https://github.com/z0mbix/essh instead of using mssh. It supports AWS SSO from v0.0.5 onwards.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting IAM Identity Center issues
The following can help you troubleshoot some common issues you might encounter while setting up or using the IAM Identity Center console.
Read more >
AWS SSO login broken · Issue #6663 · aws/aws-cli - GitHub
Service API : I want to do X using Y service, what should I do? CLI : passing arguments or cli configurations. Other/Not...
Read more >
AWS SSO Group management not working - Okta Support
AWS is working on testing the external IdP functionality to allow full provisioning functionality to be available in an upcoming release (no date...
Read more >
You only need to call`aws sso login` once for all your profiles
Attempting to automatically open the SSO authorization page in your default browser. If the browser does not open or you wish to use...
Read more >
How to setup AWS CLI with AWS SSO - CloudQuery
The first step is to have AWS SSO setup and configured. This should be done by someone with the right admin access permissions...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found