AWS Config rule, configRule.inputParamters more than 1024

0

I'm creating AWS managed "required-tags" config rule and have multiple tag values for a tag key (Separate multiple values with commas.) So, on creating a rule condition, I'm getting an error message 'configRule.inputparamters' failed to satisfy constraint: Member must have length less than or equal to 1024. Is there any alternate solution to pass the tag value check for more than 1024 characters. tag1Value (Optional) Type: CSV Optional value of the required tag. Separate multiple values with commas.

Bansahi
gefragt vor 7 Monaten214 Aufrufe
1 Antwort
0

From your query, I understand while creating the AWS Managed Config rule 'required-tags', you are getting error as 'at 'configRule.inputParameters' failed to satisfy constraint: Member must have length less than or equal to 1024.

As mentioned in the document [1], currently the length Constraints for InputParameters is 1024. The 1024 characters limit is currently a hard limit.

Given the current "InputParameters" max character limit, a workaround I can think of is to create multiple Config Rules based on "required-tag", and split the tag-key/pairs in different Rules to get coverage. Resources that are non_compliant in all the "required-tag" Config Rules would be indeed non_compliant to all the tag-key/pairs.

Another workaround, is to use a custom Config Rule [2] instead of using the managed Config Rule. The custom Config Rule is backed by a Lambda function, and the Lambda function can pull the list of tag-key/pairs from another location such as an S3 bucket object and evaluate the resources against the list. We do have some custom Config Rule code samples as a template available on the GitHub repository [3], and a similar Rule code for this use case would be this one [4].

Reference : [1] https://docs.aws.amazon.com/config/latest/APIReference/API_ConfigRule.html#config-Type-ConfigRule-InputParameters [2] https://docs.aws.amazon.com/config/latest/developerguide/evaluate-config_develop-rules.html [3] https://github.com/awslabs/aws-config-rules/tree/master/python [4] https://github.com/awslabs/aws-config-rules/blob/master/python/ec2_require_tags_with_valid_values.py

AWS
beantwortet vor 6 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen