k6 のモジュール xk6-cognito を検証してみたのですが、エラー出て動かなかった話をご紹介します。
tmieulet/xk6-cognito: An example module for https://k6.io/ to get a cognito access token using USER_SRP_AUTH flow.
go version  
go version go1.19.3 darwin/arm64go install go.k6.io/xk6/cmd/xk6@latestxk6 build master   --with github.com/tmieulet/xk6-cognito結論: 動作しませんでした ❌
git clone git@github.com:tmieulet/xk6-cognito.git
./k6 run --vus 1 --duration 2s ~/works/xk6-cognito/examples/loadTest.js
          /      |‾‾| /‾‾/   /‾‾/   
     /  /       |  |/  /   /  /    
    /  /        |     (   /   ‾‾  
   /             |  |   |  (‾)  | 
  / __________   |__| __ _____/ .io
ERRO[0000] TypeError: could not convert function call parameter 0: could not convert eu-west-1 to context.Context
  at reflect.methodValueCall (native)
  at file:///Users/your_name/works/xk6-cognito/examples/auth-cognito.js:14:15(47)
  at go.k6.io/k6/js.(*InitContext).Require-fm (native)
  at file:///Users/your_name/works/xk6-cognito/examples/loadTest.js:7:0(42)
  at native  hint="script exception"
既に issue にて報告されているようでした ?
? Could not connect to cognito service · Issue #1 · tmieulet/xk6-cognito
以上、k6 で Amazon Cognito のアクセストークンを取得したかった、現場からお送りしました。