Skip to content

Conversation

@devstopfix
Copy link
Contributor

We run this library inside ECS and therefore we need to pass the session token
along with the key-pair.

This change is in production and has been tested

}

/// Set the session token if credentials given via a task or instance role
pub fn with_session_token(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lpil I have suggestion for better API. I have to check the session token is present later in the call, and before I use this function (given I can run locally with key/pair or on ECS with token)

Perhaps this can be maybe_with_session_token(option.Option(token)) then it's less code in the caller.

Or just with_session_token(option.Option(...))

No preference with me I already wrote the calling code

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having it take an option sounds good to me. Let me know if you want me to merge this or wait for that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok I change it this afternoon to take option! 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lpil ready for you. Thanks for quick turnaround
(I take any interface you prefer)

Copy link
Owner

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh very clean! I dig it

@devstopfix devstopfix force-pushed the pass-through-session-token branch from 77e9076 to e36974f Compare November 20, 2025 14:40
Copy link
Owner

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@lpil lpil merged commit 5e0ce12 into lpil:main Nov 24, 2025
1 check passed
@CrowdHailer CrowdHailer deleted the pass-through-session-token branch November 24, 2025 11:01
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.

2 participants