'Amazon MSK failed to associate 1 secret for cluster. The provided secret has an invalid schema
We want to set up Username and password authentication with AWS Secrets Manager as per the documentation.
- We created a cluster in MSK
- Created a secret as well with name
AmazonMSK_testmsk2
and with key asPassword
and Value as{ "username": "alice", "password": "alice-secret" }
Still when we associate the secret with MSK we get the error Amazon MSK failed to associate 1 secret for cluster. The provided secret has an invalid schema
The troubleshooting documentation is not of much help either
Solution 1:[1]
Solution 2:[2]
This error can occur when one or more pre-requisites for creating the secret has not been followed. There are a few pre-requisites when creating the secret. AWS document for reference. Listing them below for quick access.
- Choose Other type of secrets (e.g. API key) for the secret type.
- Your secret name must have the prefix
AmazonMSK_
- Your user and password data must be in the following format to enter key-value pairs using the
Plaintext
option.
{
"username": "alice",
"password": "alice-secret"
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | codeaprendiz |
Solution 2 | Sourabh Mokhasi |