You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@Zen4ever unfortunately this isn't exposed in this way yet, but I do think it's something we should add. Here are a couple of workarounds that work right now:
Set the BOTO_DEFAULT_PROFILE environment variable to the name of the profile. Docs for env vars
Use your own Botocore session:
importbotocore.sessionimportboto3# Set your profile name on a low-level Botocore sessionsession=botocore.session.get_session()
session.profile='my-profile-name'# Tell Boto 3 to use that session by defaultboto3.setup_default_session(botocore_session=session)
# Now create a resourceec2=boto3.resource('ec2')
Piping a profile name in through the client and resource calls will require some changes on the Botocore side, so I'll investigate how best to approach this. Thanks for the feedback, and sorry I overlooked this use case! π
@Zen4ever it's now possible to set a profile name without dropping down to Botocore sessions. Please take a look at the docs in #69 and let me know if you have any other questions!
Activity
danielgtaylor commentedon Nov 18, 2014
@Zen4ever unfortunately this isn't exposed in this way yet, but I do think it's something we should add. Here are a couple of workarounds that work right now:
BOTO_DEFAULT_PROFILEenvironment variable to the name of the profile. Docs for env varsPiping a profile name in through the
clientandresourcecalls will require some changes on the Botocore side, so I'll investigate how best to approach this. Thanks for the feedback, and sorry I overlooked this use case! πandrew-kurin commentedon Nov 18, 2014
Nice. Botocore session seems like a good workaround for now. :-)
danielgtaylor commentedon Feb 27, 2015
@Zen4ever it's now possible to set a profile name without dropping down to Botocore sessions. Please take a look at the docs in #69 and let me know if you have any other questions!
andrew-kurin commentedon Feb 27, 2015
Great, thanks π
Upgrade Botocore dependency, fixes #21
revmischa commentedon Jul 5, 2016
How do you get a list of available profiles?
revmischa commentedon Feb 28, 2017
That's a terrible answer
TheDigitalNinja commentedon Mar 6, 2017
@revmischa This is what I was able to come up with. Should print out all available boto profiles.