AWS Config records supported resource settings and relationships and evaluates them against compliance rules. Systems Manager Automation runbooks perform configured fixes, organization conformance packs distribute checks and remediation, and aggregators collect results into a central read-only view.
AWS Config basics
AWS Config keeps an inventory of AWS resources with their configuration historyThe sequence of recorded configuration items showing how a resource changed over time., and checks them against rules for complianceWhether a resource's configuration satisfies the conditions of a rule..
How it works
- AWS Config records each supported resourceAn entity created and managed in AWS, such as an EC2 instance, storage volume, or security group. and its settings.
- Every change becomes a new configuration itemA point-in-time record of a supported resource's configuration, attributes, and relationships., building a history.
- Rules evaluate the settings and mark resources compliant or noncompliant.
Exam cues
- If the question says configuration history, or continuously check that resources follow a rule, think AWS Config.
Remember
- Inventory, relationships and history of resource configurations.
- Rules flag noncompliant resources.
Trap: AWS Config tracks how a resource is configured. CloudTrail tracks who made the API call that changed it.
From the AWS docs (3)
- AWS Config shows the configuration of AWS resources, how they relate to each other, and how their configurations changed over time.
- AWS Config rules evaluate resource settings continuously and flag resources that break a rule as noncompliant.
- Configuration history from AWS Config helps prove compliance during audits.
Managed, custom, and proactive rules
An AWS Config rule compares resourceAn entity created and managed in AWS, such as an EC2 instance, storage volume, or security group. settings with desired conditions and reports complianceWhether a resource's configuration satisfies the conditions of a rule., meaning whether the resource passes the check. Choose the rule’s implementation separately from its trigger, which decides when to run, and its evaluation mode, which decides whether to assess deployed or proposed resources.
How it works
- Pick a managed ruleA predefined Config compliance check created by AWS with customizable settings. and its parameters, or write a custom rule. GuardA policy-as-code language for expressing checks on resource configuration properties. is a language for expressing configuration checks as policies. A custom Lambda rule runs your code and reports results with
PutEvaluations. - Define the rule’s scopeThe resource types, identifiers, or tags used to decide which resource changes initiate a rule evaluation., the resources whose changes initiate evaluations: resource types, a type and resource ID, a tagA label with a key and an optional value used to describe a resource. key and value, or all recorded changes. A tag is a key with an optional value used to label a resource.
- Config evaluates existing resources when a rule is added. Later evaluations follow the rule’s trigger. Detective custom Guard rules use configuration changes.
| Trigger | When evaluation runs |
|---|---|
| Configuration changes | After a CIA point-in-time record of a supported resource's configuration, attributes, and relationships. change notification for a resource matching scope |
| PeriodicA rule trigger that starts evaluation at a selected frequency. | At the selected frequency |
| HybridA rule trigger combining configuration-change evaluations with periodic evaluations. | Both on changes and periodically |
- Use detective evaluationEvaluation of the configuration settings of already deployed resources. for deployed resources and proactive evaluationEvaluation of proposed resource properties before deployment without blocking deployment or applying remediation. for proposed properties before deployment. A pipeline must enforce its own rejection decision.
- To see evaluations as Security Hub CSPM findingsA report describing a security or compliance observation about an affected resource., activate the AWS Config integration. It sends managed and custom evaluations through EventBridge. A finding is a security or compliance report about a resource.
Exam cues
- If the question says find running EC2 instances using unapproved images, think
approved-amis-by-idwithamiIds, because it compares their Amazon Machine ImageAn image supplying the software needed to set up and boot an EC2 instance. (AMI) IDs with the approved list. An AMI supplies the software used to boot an instance. - If the question says check encryption on attached EBS volumes, think
encrypted-volumes, because it checks encryption and can require the KMS key inkmsId. - If the question says detect that no CloudTrail trail is enabled, think
cloudtrail-enabled, because it checks that condition periodically. Evaluation alone does not configure a fix. - If the question says check recorded properties without writing a Lambda function, think a Guard custom policy ruleA Config rule whose configuration checks are expressed in Guard rather than a custom Lambda function., because the policy expresses the check.
- If the question says reject noncompliant proposed infrastructure before deployment, think proactive evaluation plus a pipeline decision, because Config supplies a result without blocking deployment.
- If the question says check S3 public read or write access, think
s3-bucket-public-read-prohibitedors3-bucket-public-write-prohibited. Both consider Block Public Access, the bucket policy, and the bucket access control list (ACL). For public bucket-level settings with exclusions, thinks3-bucket-level-public-access-prohibitedandexcludedPublicBuckets.
Remember
- Trigger type and evaluation mode answer different questions: when to run and which resource state to assess.
- Proactive evaluation does not remediate or prevent deployment.
- The Security Hub CSPM integration sends evaluations performed after Security Hub CSPM was enabled. Service-linked rules are excluded except rules created and managed by Control Tower.
Trap: A rule reports noncompliance; a remediation actionA corrective action that Config runs through a Systems Manager Automation document for a resource reported as noncompliant. performs the fix. A proactive result is not a deployment block.
Trap:
encrypted-volumeschecks attached volumes. Do not assume it checks every unattached volume.
Enable proactive evaluation on a supporting rule, then submit properties with StartResourceEvaluation.
Use the returned evaluation ID with GetResourceEvaluationSummary. To reject a failed check, the pipeline must enforce that decision.
Box details (3)
- Pipeline input
The pipeline submits proposed resource properties for a supported resource type.
- Config rules
StartResourceEvaluation starts the check. Config evaluates proactive rules in this account and Region.
- Pipeline gate
The pipeline retrieves the summary and enforces its decision; Config does not prevent deployment.
From the AWS docs (27)
- Config rules evaluate resource configuration settings against desired conditions and flag failures as noncompliant.
- Managed rules are predefined customizable rules created by AWS Config.
- Custom rules use either Lambda functions for custom code or Guard policies for policy-as-code checks without developing a Lambda function.
- Config invokes a custom rule's Lambda function on configuration changes or periodically; the function sends results using PutEvaluations.
- Detective evaluations for custom Guard policy rules are initiated by configuration changes.
- After a rule is added, Config compares existing resources with its conditions before subsequent triggered evaluations.
- Configuration-change evaluations follow a CI change notification for a resource matching the rule scope.
- Rule scope can select resource types, a resource type with an ID, a tag key and value, or all recorded resource changes.
- Periodic rules run at a selected frequency.
- Hybrid rules evaluate both on configuration changes and periodically.
- Detective evaluation checks the configurations of already deployed resources.
- Proactive evaluation checks proposed resource properties against proactive rules in the account and Region before deployment.
- Proactive rules neither prevent deployment nor remediate resources flagged as NON_COMPLIANT.
- After enabling PROACTIVE evaluation on a supporting rule, call StartResourceEvaluation with resource properties and use its ResourceEvaluationId with GetResourceEvaluationSummary to retrieve the result.
- The configuration-change rule approved-amis-by-id checks EC2 instances against the amiIds list and marks running instances with unlisted AMIs NON_COMPLIANT.
- The configuration-change rule encrypted-volumes checks attached EBS volumes for encryption and optionally checks the KMS key specified by kmsId.
- The periodic cloudtrail-enabled rule reports NON_COMPLIANT if a CloudTrail trail is not enabled.
- The s3-bucket-public-read-prohibited rule evaluates public read access using S3 Block Public Access settings, the bucket policy, and bucket ACL.
- The s3-bucket-public-write-prohibited rule evaluates public write access using S3 Block Public Access settings, the bucket policy, and bucket ACL.
- The AWS Config rule `s3-bucket-level-public-access-prohibited` flags public bucket-level settings unless the bucket is listed in excludedPublicBuckets.
- The Config integration sends managed and custom rule evaluations through EventBridge as Security Hub CSPM findings after the integration is activated.
- The Config integration sends evaluations performed after Security Hub CSPM is enabled and excludes service-linked rules except those created and managed by Control Tower.
- A tag is a resource label consisting of a key and an optional value.
- An Amazon Machine Image provides the software needed to set up and boot an EC2 instance.
- EC2 tenancy choices distinguish shared instances, Dedicated Instances, and Dedicated Hosts.
- A Dedicated Host is a physical server with EC2 instance capacity dedicated to your use.
- Security Hub CSPM findings contain a security observation and identify the affected resource and current status.
Automation remediation and retries
AWS Config remediationA corrective action that Config runs through a Systems Manager Automation document for a resource reported as noncompliant. corrects a resourceAn entity created and managed in AWS, such as an EC2 instance, storage volume, or security group. that a rule reports as noncompliantWhether a resource's configuration satisfies the conditions of a rule.. The rule detects the problem; a Systems Manager Automation runbookA document defining the actions Systems Manager performs as a sequence of steps., a document listing corrective actions, performs the fix.
How it works
- Associate a managed or custom Automation runbook with a supported Config rule. For rules created by a conformance packA template-defined bundle of Config rules and remediation actions deployed together., put the remediation in the pack template and update the pack. Direct
PutRemediationConfigurationsdoes not support service-linked rules, including organization rules. - Supply the runbook’s parameters. A static parameterA remediation parameter with a fixed value rather than a resource ID substituted at runtime. stays fixed; a dynamic parameterA remediation parameter whose value is replaced with the target resource ID at runtime. receives the noncompliant resource ID at runtime.
- Choose manual or automatic remediation. Manual waits for an operator to select resources and start the action. Automatic starts for reported noncompliance and requires
AutomationAssumeRole, the IAM roleAn assumable identity whose permissions determine which AWS actions it can perform. whose permissions Automation uses. - Configure retries for failed automatic actions within a time window.
- For notifications, match
aws.configevents of typeConfig Rules Compliance Changein EventBridge and target an SNS topicA communication channel used to publish messages to subscribing endpoints., a channel for publishing messages to subscribers.ComplianceChangeNotificationidentifies a changed compliance result. This notification path is separate from automatic remediation.
Exam cues
- If the question says automatically correct noncompliant resources, think Config remediation plus an Automation runbook, because the evaluation and corrective action have separate responsibilities.
- If the question says alert on unrestricted incoming SSH but let a person decide the fix, think
restricted-ssh, EventBridge, SNS, and manual remediation, because automatic correction is not required for notification. - If the question says detect old active IAM user access keys, think periodicA rule trigger that starts evaluation at a selected frequency.
access-keys-rotatedwithmaxAccessKeyAge, because it compares key age with the configured threshold. - If the question says deploy checks and fixes across member accounts, think an organization conformance pack, because it packages both in the deployment template.
- If the question says enable S3 server access logging for buckets without it, think
s3-bucket-logging-enabledandAWS-ConfigureS3BucketLogging, because the rule detects missing logging and the runbook can remediate it automatically.
Remember
-
Recording covers selected supported resource types. Continuous recordingRecording configuration changes whenever they occur. captures changes as they happen; daily recordingRecording the latest resource state over a 24-hour period only when it differs from the previous recorded configuration item. retains only the latest changed state over 24 hours.
-
access-keys-rotateddefaults to 90 days and excludes root user keys. -
restricted-sshchecks unrestricted SSH from0.0.0.0/0or::/0, meaning any IPv4 or IPv6 address. It has both change and periodic triggers. -
Automatic remediation requires
AutomationAssumeRoleeven when a runbook can otherwise run without an explicit role. -
Config event delivery to EventBridge is best effort.
Trap: An EventBridge notification does not automatically fix the resource. Automatic remediation is configured separately.
A configuration change to a selected resource produces a configuration item at the recording frequency.
A configuration-change rule evaluates matching changes; periodic evaluations run on their schedule.
Configured automatic remediation starts a runbook for reported noncompliance; manual remediation waits for an operator.
An aggregator independently collects source configuration and compliance data into a central read-only view.
Compliance changes can independently trigger EventBridge notifications or other workflows.
Box details (6)
- EC2 instance
An example supported resource selected for recording.
- Config recorder
Records selected resource configurations. Periodic rule evaluations do not depend on configuration items.
- Config rule
Evaluates on matching configuration changes, a periodic schedule, or both, depending on the rule.
- SSM Automation
Automatic remediation uses a runbook, parameters, and AutomationAssumeRole. Manual remediation waits for an operator.
- Aggregator
Reads replicated configuration and compliance data. It cannot deploy rules into source accounts.
- EventBridge
Matches compliance change events for notifications or other workflows. Config event delivery is best effort.
From the AWS docs (25)
- Config remediation runs a managed or custom Systems Manager Automation document defining the corrective actions.
- Manual remediation requires an operator to select resources and start the configured remediation action.
- Automatic remediation starts configured corrective actions for resources reported as noncompliant.
- Automatic Config remediation requires a value for AutomationAssumeRole.
- A remediation parameter can use a static value or dynamically receive the noncompliant resource ID.
- PutRemediationConfigurations cannot add remediation to service-linked rules, including organization rules, pack rules, and Security Hub rules.
- Add remediation for a service-linked pack rule to the conformance pack template and update the pack.
- MaximumAutomaticAttempts is the maximum failed automatic-remediation attempts, defaults to 5, and accepts 1 through 25.
- RetryAttemptSeconds is the time window for counting attempts before adding a remediation exception and defaults to 60 seconds.
- EventBridge can match Config Rules Compliance Change events from aws.config and ComplianceChangeNotification messages to react to changed compliance.
- Config emits events to EventBridge on a best-effort basis.
- An EventBridge rule can send matching events to an Amazon SNS topic.
- The periodic access-keys-rotated rule checks whether active IAM access keys exceed maxAccessKeyAge, which defaults to 90 days.
- The access-keys-rotated rule does not evaluate root user access keys.
- The restricted-ssh rule flags unrestricted incoming SSH access from 0.0.0.0/0 or ::/0 as NON_COMPLIANT and uses configuration-change and periodic triggers.
- An organization conformance pack deploys Config rules and remediation actions together across member accounts.
- AWS Config records only selected supported resource types; continuous recording captures changes as they occur, while daily recording keeps the latest state in a 24-hour period only if it differs from the previous recorded state.
- Config rule evaluations can follow configuration changes, a periodic schedule, or both.
- An aggregator provides a read-only copy of source account and Region configuration and compliance data.
- An Automation runbook defines the actions that Systems Manager performs in sequential steps.
- An IAM role is an assumable identity with permissions governing the actions it may perform.
- PutRemediationConfigurations lists iam:PassRole to ssm.amazonaws.com as a dependent permission.
- iam:PassRole permits a caller to pass an IAM role to an AWS service for that service to assume later.
- An SNS topic is a communication channel delivering messages to subscribing endpoints.
- The managed rule s3-bucket-logging-enabled flags buckets without server access logging, and the AWS-ConfigureS3BucketLogging runbook can remediate them automatically.
Flashcards
Nothing to review here right now. Pick other topics or another filter.
·
All 21 cards as a list
A company must know whether any S3 bucket in its account allows public access, and keep checking as buckets change. Which service fits?
AWS Config, with a rule that flags noncompliant buckets continuously.
Which AWS service shows what a security group looked like last month?
AWS Config, which keeps the configuration history of resources.
Is AWS Config the service that records which user called an API?
No. AWS CloudTrail records API calls; AWS Config records resource configurations and checks them against rules.
When does an AWS Config rule evaluate, and how can its configuration-change scope be restricted?
Config evaluates when the rule is added, then on configuration changes, a periodic schedule, or both. Change-trigger scope can select resource types, a type and ID, a tag key and value, or all recorded changes.
What are the implementation choices for AWS Config managed and custom rules?
Managed rules are AWS-defined checks with configurable parameters. Custom rules use Lambda code that reports results with PutEvaluations, or a Guard policy without a custom Lambda function.
A team needs an AWS Config check expressed as comparisons of recorded properties without developing a Lambda function. Which custom rule type fits?
A custom policy rule written in Guard. Detective Guard evaluations are triggered by configuration changes.
How do detective and proactive AWS Config evaluations differ?
Detective checks deployed resources. Proactive checks proposed properties before deployment, but does not block deployment or remediate failures.
A deployment pipeline uses AWS Config proactive evaluation and receives NON_COMPLIANT. What must stop deployment?
A decision enforced by the pipeline. Config returns an evaluation result; proactive rules do not prevent deployment themselves.
A team needs AWS Config to find running EC2 instances launched from images outside an approved AMI ID list. Which rule and parameter fit?
Use approved-amis-by-id with amiIds. It evaluates configuration changes and marks running instances with unlisted AMIs NON_COMPLIANT.
A team needs AWS Config to find attached EBS volumes without encryption or using an unapproved KMS key. What should it use?
Use encrypted-volumes and optionally set kmsId to the required key. Its scope is attached EBS volumes, and its trigger is configuration changes.
A team wants AWS Config to detect when no CloudTrail trail is enabled. Which managed rule fits, and does it run on every change?
Use cloudtrail-enabled. It is periodic, so its evaluation is scheduled rather than triggered by every configuration change.
A security team wants AWS Config managed and custom rule evaluations alongside Security Hub CSPM findings. Which integration is needed?
Activate the AWS Config integration. It sends evaluations through EventBridge; only evaluations performed after Security Hub CSPM was enabled are sent. Service-linked rules are excluded except Control Tower rules.
Which AWS Config managed rules check S3 buckets for public read access, public write access, or public bucket-level settings with an exclusion list?
Use s3-bucket-public-read-prohibited, s3-bucket-public-write-prohibited, and s3-bucket-level-public-access-prohibited, respectively. The first two check Block Public Access, bucket policy, and bucket ACL; the last accepts excludedPublicBuckets.
A team wants AWS Config to detect old active IAM user access keys, alert operators, and support an automated response. Which components fit?
Use access-keys-rotated with maxAccessKeyAge, an EventBridge compliance-change rule targeting SNS, and a suitable Automation remediation runbook if a fix is required. The age defaults to 90 days; root keys are excluded.
How does an AWS Config rule automatically correct a noncompliant resource?
Configure automatic remediation with a Systems Manager Automation runbook, its parameters, and AutomationAssumeRole. A parameter can receive the resource ID dynamically.
What starts manual versus automatic AWS Config remediation?
An operator starts manual remediation for selected resources. Automatic remediation starts for reported noncompliance and can retry failed actions within its configured window.
A security team needs AWS Config rules and automatic fixes for unwanted S3 public access across member accounts. How should it package the deployment?
Use an organization conformance pack containing the rule and suitable Automation remediation. Add pack-rule remediation through the pack template, rather than attaching it directly to an organization rule.
A team wants an alert when AWS Config detects unrestricted incoming SSH in security groups, but wants a person to decide on the fix. What should it configure?
Use restricted-ssh and an EventBridge compliance-change rule targeting SNS. Keep remediation manual so an operator starts any configured fix.
An AWS Config compliance alert needs to notify an SNS topic without automatically correcting resources. Which event path fits?
Match aws.config Config Rules Compliance Change events with EventBridge and target SNS. Automatic remediation is a separately configured action; Config event delivery is best effort.
A company must turn on S3 server access logging automatically for any bucket that lacks it. What fits?
The AWS Config rule s3-bucket-logging-enabled with automatic remediation through the AWS-ConfigureS3BucketLogging runbook.
An AWS Config audit needs every configuration change for selected supported resources. Should the team choose daily or continuous recording?
Continuous recording. Daily recording retains only the latest changed state over a 24-hour period.