Buildkite elastic-ci stack throws 401 error when using aws secretsmanager

Hi Team,

I am receiving error when I use aws secretsmanager to store the buildkite token.

I have mentioned my notes in this git issues Improve error handling for HTTP 401 Unauthorized responses from Buildkite · Issue #58 · buildkite/buildkite-agent-scaler · GitHub

Any possible ideas why would I be getting the error 401.
It worked fine, if I set the token as the Parameter = BuildkiteAgentToken

Thanks
Suraj

Hi @surajthakur ,

This error is usually returned when the secret value is stored as key/value format. Can you confirm if you have provided the secret value as a plain text and not in this format {“<token-key”:“”} ?

Best!

Hi @lizette

Thanks for response.
I did use key/value pair. I will try using the plain text and check. It wasn’t explicitly mentioned in the docs, so got confused.

  • Suraj

Hi Team,

Thanks for the solution. It worked fine.

Regards,
Suraj