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.

Using non-default profile

See original GitHub issue

Is there a simple way to use a non-default profile by specifying it’s name? Like on boto there is

boto.connect_ec2(profile_name="dev-profile")

I see that I can construct a session with credentials and region, but I don’t see an ability to just refer to the profile’s name

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

17reactions
TheDigitalNinjacommented, Mar 6, 2017

@revmischa This is what I was able to come up with. Should print out all available boto profiles.

#!/usr/bin/env python

import boto3

session = boto3.Session()
print session.available_profiles
9reactions
revmischacommented, Feb 28, 2017

That’s a terrible answer

Read more comments on GitHub >

github_iconTop Results From Across the Web

Named profiles for the AWS CLI - AWS Command Line Interface
Create and use name profiles for AWS CLI commands. ... The first [default] is used when you run a AWS CLI command with...
Read more >
aws cdk to use non-default profile - Stack Overflow
So I created a new account and a new profile cdkprof using aws configure --profile cdkprof . I have verified in ~/.aws/credentials and...
Read more >
Configuration and credential file settings - 亚马逊云科技
You can specify a non-default location for the files by setting the AWS_CONFIG_FILE and AWS_SHARED_CREDENTIALS_FILE environment variables to another local path.
Read more >
Set your Default Profile's Name in AWS CLI | bobbyhadz
In order to set the name for the default AWS CLI profile, set the `AWS_PROFILE` environment variable to the name of the profile...
Read more >
IAM Configuration Guide | aws-runas - GitHub Pages
aws inside your user's home directory. If you need to use a non-default credentials file location, you can set the AWS_SHARED_CREDENTIALS_FILE environment ...
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