Alexa ask-cli fails with error when running in pipeline

Hello, I have a weird issue. When running in pipelines alexa ask-cli will fails with error:

[Error]: {
  "message": "Token is invalid/expired."
}

I verified that credentials are OK, i print aws sts get-caller-identity before calling ask.
And if I ssh into the failing build everything is OK.
I tried comparing environment and everything else, but cant make it run.

Using latest ask-cli@2.29.1 (at the moment).
Interesting the issue is not happening with ask-cli@2.7.0, but I get other errors I need newer version.

Anyone dealt with this?