grafana / grafana-aws-sdk

Common AWS configs for plugins
Apache License 2.0
7 stars 16 forks source link

Create GetSessionWithAuthSettings #144

Closed sarahzinger closed 4 months ago

sarahzinger commented 4 months ago

When working on https://github.com/grafana/timestream-datasource/pull/285 we noticed that in order to not rely on env variables we have to grab auth settings from the datasource instance's context and pass them along to GetSession.

However this is easy to forget/miss. This pr will create a new method for getting session which is passed in the datasource instance's context with auth settings and sets it as appropriate.

sarahzinger commented 4 months ago

Ok updated as you suggested @iwysiu so that auth settings are now explicitly required to be passed in (with instructions on how to do so), rather than read from the env (or pulled from a stored context)