0Pricing
AWS Security Academy · Lesson

Managed and Custom Config Rules

Evaluate resources against built-in and your own compliance checks.

Managed and Custom Config Rules is a free AWS Security Academy lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the AWS Security Academy learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.

What a Config Rule Is

A Config rule evaluates whether your resources comply with a desired configuration and reports each as COMPLIANT or NON_COMPLIANT. Recording state is passive; rules add the judgment layer that flags insecure settings automatically, turning Config into a continuous compliance engine.

AWS Managed Rules

Managed rules are prebuilt by AWS for common checks, so you enable them without writing code. Examples include s3-bucket-public-read-prohibited, encrypted-volumes, iam-password-policy, and restricted-ssh. There are hundreds covering best practices, making them the fastest way to establish a compliance baseline.

Custom Rules

When no managed rule fits, you write a custom rule. These run as a Lambda function that receives the resource configuration and returns a compliance verdict, or as a Guard policy using AWS's policy-as-code language. Custom rules encode organization-specific requirements that managed rules cannot express.

Triggers: Change and Periodic

Rules run on two trigger types. A configuration-change trigger evaluates a resource whenever it changes, giving near-real-time compliance. A periodic trigger runs on a fixed schedule regardless of changes, useful for checks that depend on time or on account-level settings rather than a single resource event.

Reading Compliance Results

The Config dashboard shows each rule's compliance and lists the non-compliant resources. This gives a prioritized to-do list of insecure configurations. For security, rules like public S3 buckets, unencrypted volumes, and open security groups surface the exact resources that need fixing.

Rule Parameters

Many rules accept parameters to tailor the check. The iam-password-policy rule, for instance, lets you specify minimum length and rotation requirements. Parameters let one managed rule enforce your organization's specific standard rather than a generic default, without writing custom code.

Conformance Packs

A conformance pack bundles many rules and remediation actions into a single deployable package, often mapped to a framework like CIS or PCI DSS. Deploying a pack across accounts via an aggregator or Organizations applies a whole compliance standard at once instead of enabling rules one by one.

Scope and Cost

You can scope a rule to specific resource types or tags so it only evaluates what matters, reducing both noise and cost. Config charges per rule evaluation, so scoping and choosing the right trigger type keeps a large rule set affordable while still covering the security-critical resources.

Rules Versus Security Hub

Config rules and Security Hub standards overlap, and Security Hub actually uses Config behind many of its checks. Config rules give you fine-grained, customizable, per-resource compliance; Security Hub aggregates findings across services into a posture score. The exam may ask which to use for custom, resource-level checks: that is Config rules.

A Sample Managed Rule

Consider restricted-ssh: it marks a security group NON_COMPLIANT if it allows unrestricted inbound SSH on port 22 from 0.0.0.0/0. Enabling this single rule across your accounts continuously catches one of the most common and dangerous misconfigurations with no custom code at all.

aws configservice put-config-rule \
  --config-rule file://restricted-ssh-rule.json

Building a Rule Strategy

Start with managed rules and conformance packs for broad coverage, then add custom rules for your unique policies. Scope thoughtfully, parameterize to your standards, and pair high-value rules with remediation. This layered approach gives continuous, automated assurance that your environment stays configured securely.

Quick Check

Test your Config rules knowledge.

Recap

Config rules mark resources COMPLIANT or NON_COMPLIANT. Hundreds of managed rules cover common checks with optional parameters, while custom rules (Lambda or Guard) encode unique policies. Rules trigger on change or on a schedule, bundle into conformance packs for frameworks, and complement Security Hub by providing fine-grained, per-resource compliance.

Frequently asked questions

Is the “Managed and Custom Config Rules” lesson free?

Yes — the full text of “Managed and Custom Config Rules” is free to read here on the web, and the AWS Security Academy course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the AWS Security Academy course, upgrade to CoddyKit PRO.

What will I learn in “Managed and Custom Config Rules”?

Evaluate resources against built-in and your own compliance checks. You practise AWS Security Academy with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.

Do I need any experience to start AWS Security Academy?

No prior experience is required. AWS Security Academy on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.

How long does the “Managed and Custom Config Rules” lesson take?

Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.

Can I write and run code in this AWS Security Academy lesson?

Yes. Every AWS Security Academy lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.

All lessons in this course

  1. How AWS Config Records Resource State
  2. Viewing Configuration Timeline History
  3. Managed and Custom Config Rules
  4. Auto-Remediation Through Config Rules
← Back to AWS Security Academy