- Newest
- Most votes
- Most comments
The ValidationException you're encountering is likely related to the format of your rule groups data rather than the name parameter. When creating a rule groups namespace in Amazon Managed Service for Prometheus, the data parameter must contain a properly formatted, base64-encoded rules file.
The console may be handling the validation or formatting of your rules data differently than when you submit it directly via the API or Terraform. When using the console, there might be additional processing or validation that helps format your input correctly before submission.
For the API and Terraform approaches, ensure that:
- Your rules file follows the proper Prometheus rules format
- The rules file is correctly base64-encoded
- The encoded content doesn't contain any formatting issues
The "Malformed rule group namespace" error specifically points to an issue with the structure or content of your rules data, not with the workspace ID or name parameters.
To troubleshoot, you could:
- Verify the format of your rules file before encoding
- Double-check your base64 encoding process
- Try to extract the exact data format that works in the console and use that in your API calls
- Start with a minimal, valid rules file to test the API functionality
Remember that a rule groups namespace is associated with exactly one rules file, and the data must conform to the expected structure for Prometheus rules.
Sources
CreateRuleGroupsNamespace - Amazon Managed Service for Prometheus
create-rule-groups-namespace — AWS CLI 2.27.41 Command Reference
CreateWorkspace - Amazon Managed Service for Prometheus
answered a year ago
Relevant content
asked 5 years ago
