akittana / aws-virtual-bastion

A web based terminal for EC2 instances that does not require SSH or any other inbound connections to the instaces. Instead it uses the AWS Systems Manager (SSM) API to run commands (bash or powershell).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add support for named profiles

mark-greene opened this issue · comments

In addition to authenticating with access keys / secrets add support for named profiles.

https://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html

Thanks for the suggestion. Since this is a web app, it can't load information from files on the system automatically. However, I can add an option in which you select your credentials file, and then the different profiles (with their auth info) would be loaded - and you can then switch between them.

Would this work, or did you have something else in mind?

This would work. I understand it is not straightforward with a web app. I was thinking environment variables but I have only done this with node and go web apps and this would only work for the credentials, not the profile.

I just made an update that lets you load your credentials file and use the profiles configured within it to authenticate:

image

I am closing this issue, but let me know if you have any issues.