Skip to main content

Config compliance

AWS Config turns compliance from an annual evidence exercise into a continuous measurement. The recorder captures what changed; the rules say whether the result is acceptable.

Enabling Config​

SettingValue
RecorderAll supported resource types, in every governed region
Delivery channelCentralised S3 bucket in the log archive account
Snapshot frequencyDaily, plus configuration history continuously
AggregationOrganisation aggregator in the security account
RetentionPer compliance requirement; history retained for audit
resource "aws_config_configuration_recorder" "main" {
name = "organisation-recorder"
role_arn = aws_iam_role.config.arn

recording_group {
all_supported = true
include_global_resource_types = true
}
}

resource "aws_config_delivery_channel" "main" {
name = "organisation-delivery"
s3_bucket_name = var.log_archive_bucket
s3_key_prefix = "config"

snapshot_delivery_properties {
delivery_frequency = "TwentyFour_Hours"
}
}

Baseline rules​

Identity and access management​

RuleChecks
iam-user-mfa-enabledMFA enabled for IAM users
iam-root-access-key-checkRoot has no access keys
iam-password-policyPassword policy meets the standard
root-account-mfa-enabledHardware MFA on root
iam-policy-no-statements-with-admin-accessNo admin-equivalent policy
access-keys-rotatedKeys rotated within 90 days

Encryption and data protection​

RuleChecks
encrypted-volumesEBS volumes encrypted
s3-bucket-server-side-encryption-enabledS3 encryption enabled
s3-default-encryption-kmsS3 uses KMS
rds-storage-encryptedRDS storage encrypted
efs-encryptedEFS encrypted
dynamodb-table-encrypted-kmsDynamoDB encrypted with KMS

Network security​

RuleChecks
vpc-default-security-group-closedDefault SG blocks all traffic
restricted-common-portsNo unrestricted access to 22, 3389, 3306, 5432
vpc-flow-logs-enabledFlow logs on
s3-account-level-public-access-blocksS3 public access blocked at account level
s3-bucket-public-read-prohibitedNo public-read buckets
s3-bucket-public-write-prohibitedNo public-write buckets

Logging and monitoring​

RuleChecks
cloudtrail-enabledCloudTrail on
multi-region-cloud-trail-enabledTrail covers all regions
cloud-trail-encryption-enabledTrail encrypted
cloudwatch-alarm-action-checkAlarms have actions
guardduty-enabled-centralizedGuardDuty enabled and centralised

Backup and recovery​

RuleChecks
backup-recovery-point-encryptedRecovery points encrypted
db-instance-backup-enabledRDS backups on
dynamodb-pitr-enabledDynamoDB PITR on
ebs-snapshot-public-restorable-checkSnapshots not publicly restorable

Tagging​

RuleChecks
required-tagsProject, Environment, Owner, CostCenter present

A custom rule is added where the managed rule cannot express the requirement — for example, "all production resources must carry a DataClassification tag from an approved list."

Remediation​

Remediation is either automatic or notified, chosen by consequence.

ClassMechanismExample
Safe and unambiguousSSM Automation, automaticEnable S3 encryption; add a missing tag
Potentially disruptiveSSM Automation, manual approvalReplace a public security group rule
Requires judgementNotification and runbookUnused credentials that may still be in use
Resources:
EnableS3Encryption:
Type: AWS::Config::RemediationConfiguration
Properties:
ConfigRuleName: s3-bucket-server-side-encryption-enabled
TargetType: SSM_DOCUMENT
TargetId: AWSConfigRemediation-EnableS3BucketEncryption
Automatic: true
MaximumAutomaticAttempts: 3
RetryAttemptSeconds: 120
Parameters:
AutomationAssumeRole:
StaticValue: !GetAtt RemediationRole.Arn

A remediation that changes customer-visible behaviour is never automatic. The finding routes to a person with a documented action, and the change follows the normal change process.

Mapping to standards​

StandardRule set
AWS Foundational Security Best PracticesSecurity Hub managed set
CIS AWS Foundationscis_1.5_aws conformance pack
PCI DSSEncryption, network and logging rules plus the audit trail
ISO 27001 / SOC 2Control mapping documented per rule
HIPAAEncryption, access control, audit logging

Evidence​

  • Recorder and delivery channel configuration.
  • Rule inventory with compliance status.
  • Remediation configuration per rule.
  • Config history export for a sample resource.
  • Aggregator view across accounts.
  • A non-compliance event with its remediation record.

Operating rhythm​

FrequencyActivity
ContinuousRules evaluate on every configuration change
DailyNon-compliant resource digest to owning teams
WeeklyCompliance trend review; remediation backlog
MonthlyRule coverage review — are we measuring the right things?
QuarterlyConformance pack review against the customer's obligations