Skip to content

State Manager Association Non-Compliance vs. Failure

0

I just created a few simple Systems Manager State Manager associations, all to accomplish small tasks like running inventory and scanning for patches. I had initially assumed that an association failing on a single instance would lead that instance to be marked as non-compliant, with whatever severity level was configured for the association. In one of the walkthroughs in the SSM documentation, however, I see this:

If the State Manager association fails, no compliance data is reported. For example, if Systems Manager attempts to download a Chef cookbook from an S3 bucket that the node doesn't have permission to access, the association fails, and Systems Manager reports no compliance data.

Is this the case for all association failures, regardless of document? And if it is, under what scenarios would association compliance show anything other than compliant instances?

asked 4 years ago320 views

1 Answer
1

That's an excellent question about Systems Manager State Manager associations and compliance reporting. Let me clarify how compliance reporting works with State Manager associations.

  1. Compliance Reporting Behavior:
  • The documentation is correct - when an association completely fails to execute (like in the S3 permission example), no compliance data is typically reported
  • This is because compliance status is generated only when the association can actually run and evaluate the desired state
  1. Scenarios where non-compliant status would be reported:
  • When the association successfully executes but finds a drift from the desired state
  • When the command/script within the association runs but returns a non-successful exit code
  • When the association can evaluate the target state but finds it doesn't match expectations
  1. Examples of reportable non-compliance:
  • An AWS-GatherSoftwareInventory association successfully runs but finds unauthorized software
  • A patch baseline association runs and discovers missing required patches
  • A configuration check runs successfully but finds parameters that don't match specifications
  1. Complete failures vs. Execution failures:
  • Complete failures (like permission issues preventing execution) = No compliance data
  • Execution failures (where the association runs but fails its checks) = Non-compliant status

The key distinction is between associations that can't run at all (no compliance data) versus those that run but find problems (non-compliant status).

To ensure you get meaningful compliance data, make sure:

  • Permissions are properly configured
  • Resources are accessible
  • The association can actually execute and evaluate state

https://docs.aws.amazon.com/systems-manager/latest/userguide/compliance-about.html#compliance-view

AWS

answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.