Skip to content

fix(examples): Instantiate Session before reading account/region in optimize-example - #6038

Merged
aviruthen merged 4 commits into
aws:masterfrom
Hannah14295:fix/optimize-example-session
Jul 17, 2026
Merged

aviruthen merged 4 commits into
aws:masterfrom
Hannah14295:fix/optimize-example-session

Conversation

@Hannah14295

Copy link
Copy Markdown
Contributor

optimize-example.ipynb called Session.account_id() and Session.boto_region_name on the Session class, raising 'TypeError: account_id() missing 1 required positional argument: self'. Create a Session instance first and read the values from it.

Issue #, if available:
N/A

Description of changes:
optimize-example.ipynb called Session.account_id() and Session.boto_region_name
on the Session class instead of an instance, so the first Configuration cell
failed with:

TypeError: account_id() missing 1 required positional argument: 'self'

This creates a Session() instance first and reads account_id() / boto_region_name
from it. No functional change beyond fixing the crash.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

hrehard and others added 2 commits July 16, 2026 14:07
optimize-example.ipynb called Session.account_id() and Session.boto_region_name on the Session class, raising 'TypeError: account_id() missing 1 required positional argument: self'. Create a Session instance first and read the values from it.
@aviruthen
aviruthen merged commit 79123bc into aws:master Jul 17, 2026
6 checks passed

This branch was previously deployed

1 inactive deployment
manual-approval — 068542b2 Deployed Jul 17, 2026 by Hannah14295 via wait-for-approval #1014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants