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.

boto3 session as argument to connect()

See original GitHub issue

Currently, you can provide arguments that are used to create a boto3 session, but you can’t just provide your own session. That limits the ability, for example, to use aws_sso_lib.get_boto3_session() to allow a script that knows what account and AWS SSO role it should be using to do that directly, rather than relying on it being configured in a profile.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
benkehoecommented, Nov 22, 2021

Awesome! I added one comment on type hints

1reaction
laughingman7743commented, Nov 18, 2021

It seems to be a good improvement. It looks easy to implement, so I’ll try to implement it over the weekend.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Session reference — Boto3 Docs 1.26.33 documentation
Session ) -- Use this Botocore session instead of creating a new default one. ... You can get a list of available services...
Read more >
boto3 Sessions, and Why You Should Use Them | by Ben Kehoe
So the function boto3.client() is really just a proxy for the boto3. ... The STS client is created on a session created with...
Read more >
How to specify credentials when connecting to boto3 S3?
Then use that session to get an S3 resource: ... There are numerous ways to store credentials while still using boto3.resource().
Read more >
How to create an AWS session using Boto3 library in Python?
Step 3 − Import the Boto3 library. Step 4 − If creating the session with default credential, use Session() with no parameter.
Read more >
How to use the boto3.session.Session function in boto3 - Snyk
def find_nonvpc_domains(): domains = [] enabled_regions = set(boto3.session.Session().get_available_regions('es')) if os.environ.get('REGIONS'): ...
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