-
Notifications
You must be signed in to change notification settings - Fork 854
/
Operational-Best-Practices-for-CIS-Top20.yaml
1083 lines (1082 loc) · 33.9 KB
/
Operational-Best-Practices-for-CIS-Top20.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
##################################################################################
#
# Conformance Pack:
# Operational Best Practices for CIS Top 20
#
# This conformance pack helps verify compliance with CIS Top 20 requirements.
#
# This Conformance Pack has been designed for compatibility with the majority of AWS
# regions and to not require setting of any Parameters. Additional managed rules that
# require parameters to be set for your environment and/or for your specific region can
# be found at https://docs.aws.amazon.com/config/latest/developerguide/managed-rules-by-aws-config.html
#
# See Parameters section for names and descriptions of required parameters.
#
##################################################################################
Parameters:
AccessKeysRotatedParamMaxAccessKeyAge:
Default: '90'
Type: String
AcmCertificateExpirationCheckParamDaysToExpiration:
Default: '90'
Type: String
GuarddutyNonArchivedFindingsParamDaysHighSev:
Default: '1'
Type: String
GuarddutyNonArchivedFindingsParamDaysLowSev:
Default: '30'
Type: String
GuarddutyNonArchivedFindingsParamDaysMediumSev:
Default: '7'
Type: String
IamPasswordPolicyParamMaxPasswordAge:
Default: '90'
Type: String
IamPasswordPolicyParamMinimumPasswordLength:
Default: '14'
Type: String
IamPasswordPolicyParamPasswordReusePrevention:
Default: '24'
Type: String
IamPasswordPolicyParamRequireLowercaseCharacters:
Default: 'true'
Type: String
IamPasswordPolicyParamRequireNumbers:
Default: 'true'
Type: String
IamPasswordPolicyParamRequireSymbols:
Default: 'true'
Type: String
IamPasswordPolicyParamRequireUppercaseCharacters:
Default: 'true'
Type: String
IamUserUnusedCredentialsCheckParamMaxCredentialUsageAge:
Default: '90'
Type: String
RedshiftClusterMaintenancesettingsCheckParamAllowVersionUpgrade:
Default: 'true'
Type: String
RestrictedIncomingTrafficParamBlockedPort1:
Default: '20'
Type: String
RestrictedIncomingTrafficParamBlockedPort2:
Default: '21'
Type: String
RestrictedIncomingTrafficParamBlockedPort3:
Default: '3389'
Type: String
RestrictedIncomingTrafficParamBlockedPort4:
Default: '3306'
Type: String
RestrictedIncomingTrafficParamBlockedPort5:
Default: '4333'
Type: String
S3AccountLevelPublicAccessBlocksParamBlockPublicAcls:
Default: 'true'
Type: String
S3AccountLevelPublicAccessBlocksParamBlockPublicPolicy:
Default: 'true'
Type: String
S3AccountLevelPublicAccessBlocksParamIgnorePublicAcls:
Default: 'true'
Type: String
S3AccountLevelPublicAccessBlocksParamRestrictPublicBuckets:
Default: 'true'
Type: String
Resources:
AccessKeysRotated:
Properties:
ConfigRuleName: access-keys-rotated
InputParameters:
maxAccessKeyAge:
Fn::If:
- accessKeysRotatedParamMaxAccessKeyAge
- Ref: AccessKeysRotatedParamMaxAccessKeyAge
- Ref: AWS::NoValue
Source:
Owner: AWS
SourceIdentifier: ACCESS_KEYS_ROTATED
Type: AWS::Config::ConfigRule
AcmCertificateExpirationCheck:
Properties:
ConfigRuleName: acm-certificate-expiration-check
InputParameters:
daysToExpiration:
Fn::If:
- acmCertificateExpirationCheckParamDaysToExpiration
- Ref: AcmCertificateExpirationCheckParamDaysToExpiration
- Ref: AWS::NoValue
Scope:
ComplianceResourceTypes:
- AWS::ACM::Certificate
Source:
Owner: AWS
SourceIdentifier: ACM_CERTIFICATE_EXPIRATION_CHECK
Type: AWS::Config::ConfigRule
AlbHttpToHttpsRedirectionCheck:
Properties:
ConfigRuleName: alb-http-to-https-redirection-check
Source:
Owner: AWS
SourceIdentifier: ALB_HTTP_TO_HTTPS_REDIRECTION_CHECK
Type: AWS::Config::ConfigRule
ApiGwCacheEnabledAndEncrypted:
Properties:
ConfigRuleName: api-gw-cache-enabled-and-encrypted
Scope:
ComplianceResourceTypes:
- AWS::ApiGateway::Stage
Source:
Owner: AWS
SourceIdentifier: API_GW_CACHE_ENABLED_AND_ENCRYPTED
Type: AWS::Config::ConfigRule
ApiGwExecutionLoggingEnabled:
Properties:
ConfigRuleName: api-gw-execution-logging-enabled
Scope:
ComplianceResourceTypes:
- AWS::ApiGateway::Stage
- AWS::ApiGatewayV2::Stage
Source:
Owner: AWS
SourceIdentifier: API_GW_EXECUTION_LOGGING_ENABLED
Type: AWS::Config::ConfigRule
CloudTrailCloudWatchLogsEnabled:
Properties:
ConfigRuleName: cloud-trail-cloud-watch-logs-enabled
Source:
Owner: AWS
SourceIdentifier: CLOUD_TRAIL_CLOUD_WATCH_LOGS_ENABLED
Type: AWS::Config::ConfigRule
CloudTrailEnabled:
Properties:
ConfigRuleName: cloudtrail-enabled
Source:
Owner: AWS
SourceIdentifier: CLOUD_TRAIL_ENABLED
Type: AWS::Config::ConfigRule
CloudTrailEncryptionEnabled:
Properties:
ConfigRuleName: cloud-trail-encryption-enabled
Source:
Owner: AWS
SourceIdentifier: CLOUD_TRAIL_ENCRYPTION_ENABLED
Type: AWS::Config::ConfigRule
CloudTrailLogFileValidationEnabled:
Properties:
ConfigRuleName: cloud-trail-log-file-validation-enabled
Source:
Owner: AWS
SourceIdentifier: CLOUD_TRAIL_LOG_FILE_VALIDATION_ENABLED
Type: AWS::Config::ConfigRule
CloudtrailS3DataeventsEnabled:
Properties:
ConfigRuleName: cloudtrail-s3-dataevents-enabled
Source:
Owner: AWS
SourceIdentifier: CLOUDTRAIL_S3_DATAEVENTS_ENABLED
Type: AWS::Config::ConfigRule
CloudwatchAlarmActionCheck:
Properties:
ConfigRuleName: cloudwatch-alarm-action-check
InputParameters:
alarmActionRequired: 'true'
insufficientDataActionRequired: 'true'
okActionRequired: 'false'
Scope:
ComplianceResourceTypes:
- AWS::CloudWatch::Alarm
Source:
Owner: AWS
SourceIdentifier: CLOUDWATCH_ALARM_ACTION_CHECK
Type: AWS::Config::ConfigRule
CloudwatchLogGroupEncrypted:
Properties:
ConfigRuleName: cloudwatch-log-group-encrypted
Source:
Owner: AWS
SourceIdentifier: CLOUDWATCH_LOG_GROUP_ENCRYPTED
Type: AWS::Config::ConfigRule
CodebuildProjectEnvvarAwscredCheck:
Properties:
ConfigRuleName: codebuild-project-envvar-awscred-check
Scope:
ComplianceResourceTypes:
- AWS::CodeBuild::Project
Source:
Owner: AWS
SourceIdentifier: CODEBUILD_PROJECT_ENVVAR_AWSCRED_CHECK
Type: AWS::Config::ConfigRule
CodebuildProjectSourceRepoUrlCheck:
Properties:
ConfigRuleName: codebuild-project-source-repo-url-check
Scope:
ComplianceResourceTypes:
- AWS::CodeBuild::Project
Source:
Owner: AWS
SourceIdentifier: CODEBUILD_PROJECT_SOURCE_REPO_URL_CHECK
Type: AWS::Config::ConfigRule
DbInstanceBackupEnabled:
Properties:
ConfigRuleName: db-instance-backup-enabled
Scope:
ComplianceResourceTypes:
- AWS::RDS::DBInstance
Source:
Owner: AWS
SourceIdentifier: DB_INSTANCE_BACKUP_ENABLED
Type: AWS::Config::ConfigRule
DmsReplicationNotPublic:
Properties:
ConfigRuleName: dms-replication-not-public
Scope:
ComplianceResourceTypes: []
Source:
Owner: AWS
SourceIdentifier: DMS_REPLICATION_NOT_PUBLIC
Type: AWS::Config::ConfigRule
DynamodbPitrEnabled:
Properties:
ConfigRuleName: dynamodb-pitr-enabled
Scope:
ComplianceResourceTypes:
- AWS::DynamoDB::Table
Source:
Owner: AWS
SourceIdentifier: DYNAMODB_PITR_ENABLED
Type: AWS::Config::ConfigRule
EbsSnapshotPublicRestorableCheck:
Properties:
ConfigRuleName: ebs-snapshot-public-restorable-check
Source:
Owner: AWS
SourceIdentifier: EBS_SNAPSHOT_PUBLIC_RESTORABLE_CHECK
Type: AWS::Config::ConfigRule
Ec2EbsEncryptionByDefault:
Properties:
ConfigRuleName: ec2-ebs-encryption-by-default
Source:
Owner: AWS
SourceIdentifier: EC2_EBS_ENCRYPTION_BY_DEFAULT
Type: AWS::Config::ConfigRule
Ec2InstanceManagedBySsm:
Properties:
ConfigRuleName: ec2-instance-managed-by-systems-manager
Scope:
ComplianceResourceTypes:
- AWS::EC2::Instance
- AWS::SSM::ManagedInstanceInventory
Source:
Owner: AWS
SourceIdentifier: EC2_INSTANCE_MANAGED_BY_SSM
Type: AWS::Config::ConfigRule
Ec2InstanceNoPublicIp:
Properties:
ConfigRuleName: ec2-instance-no-public-ip
Scope:
ComplianceResourceTypes:
- AWS::EC2::Instance
Source:
Owner: AWS
SourceIdentifier: EC2_INSTANCE_NO_PUBLIC_IP
Type: AWS::Config::ConfigRule
Ec2ManagedinstanceAssociationComplianceStatusCheck:
Properties:
ConfigRuleName: ec2-managedinstance-association-compliance-status-check
Scope:
ComplianceResourceTypes:
- AWS::SSM::AssociationCompliance
Source:
Owner: AWS
SourceIdentifier: EC2_MANAGEDINSTANCE_ASSOCIATION_COMPLIANCE_STATUS_CHECK
Type: AWS::Config::ConfigRule
Ec2ManagedinstancePatchComplianceStatusCheck:
Properties:
ConfigRuleName: ec2-managedinstance-patch-compliance-status-check
Scope:
ComplianceResourceTypes:
- AWS::SSM::PatchCompliance
Source:
Owner: AWS
SourceIdentifier: EC2_MANAGEDINSTANCE_PATCH_COMPLIANCE_STATUS_CHECK
Type: AWS::Config::ConfigRule
Ec2SecurityGroupAttachedToEni:
Properties:
ConfigRuleName: ec2-security-group-attached-to-eni
Scope:
ComplianceResourceTypes:
- AWS::EC2::SecurityGroup
Source:
Owner: AWS
SourceIdentifier: EC2_SECURITY_GROUP_ATTACHED_TO_ENI
Type: AWS::Config::ConfigRule
Ec2StoppedInstance:
Properties:
ConfigRuleName: ec2-stopped-instance
Source:
Owner: AWS
SourceIdentifier: EC2_STOPPED_INSTANCE
Type: AWS::Config::ConfigRule
Ec2VolumeInuseCheck:
Properties:
ConfigRuleName: ec2-volume-inuse-check
Scope:
ComplianceResourceTypes:
- AWS::EC2::Volume
Source:
Owner: AWS
SourceIdentifier: EC2_VOLUME_INUSE_CHECK
Type: AWS::Config::ConfigRule
EfsEncryptedCheck:
Properties:
ConfigRuleName: efs-encrypted-check
Source:
Owner: AWS
SourceIdentifier: EFS_ENCRYPTED_CHECK
Type: AWS::Config::ConfigRule
EipAttached:
Properties:
ConfigRuleName: eip-attached
Scope:
ComplianceResourceTypes:
- AWS::EC2::EIP
Source:
Owner: AWS
SourceIdentifier: EIP_ATTACHED
Type: AWS::Config::ConfigRule
ElasticacheRedisClusterAutomaticBackupCheck:
Properties:
ConfigRuleName: elasticache-redis-cluster-automatic-backup-check
Source:
Owner: AWS
SourceIdentifier: ELASTICACHE_REDIS_CLUSTER_AUTOMATIC_BACKUP_CHECK
Type: AWS::Config::ConfigRule
ElasticsearchEncryptedAtRest:
Properties:
ConfigRuleName: elasticsearch-encrypted-at-rest
Source:
Owner: AWS
SourceIdentifier: ELASTICSEARCH_ENCRYPTED_AT_REST
Type: AWS::Config::ConfigRule
ElasticsearchInVpcOnly:
Properties:
ConfigRuleName: elasticsearch-in-vpc-only
Source:
Owner: AWS
SourceIdentifier: ELASTICSEARCH_IN_VPC_ONLY
Type: AWS::Config::ConfigRule
ElbAcmCertificateRequired:
Properties:
ConfigRuleName: elb-acm-certificate-required
Scope:
ComplianceResourceTypes:
- AWS::ElasticLoadBalancing::LoadBalancer
Source:
Owner: AWS
SourceIdentifier: ELB_ACM_CERTIFICATE_REQUIRED
Type: AWS::Config::ConfigRule
ElbLoggingEnabled:
Properties:
ConfigRuleName: elb-logging-enabled
Scope:
ComplianceResourceTypes:
- AWS::ElasticLoadBalancing::LoadBalancer
- AWS::ElasticLoadBalancingV2::LoadBalancer
Source:
Owner: AWS
SourceIdentifier: ELB_LOGGING_ENABLED
Type: AWS::Config::ConfigRule
EmrKerberosEnabled:
Properties:
ConfigRuleName: emr-kerberos-enabled
Source:
Owner: AWS
SourceIdentifier: EMR_KERBEROS_ENABLED
Type: AWS::Config::ConfigRule
EmrMasterNoPublicIp:
Properties:
ConfigRuleName: emr-master-no-public-ip
Scope:
ComplianceResourceTypes: []
Source:
Owner: AWS
SourceIdentifier: EMR_MASTER_NO_PUBLIC_IP
Type: AWS::Config::ConfigRule
EncryptedVolumes:
Properties:
ConfigRuleName: encrypted-volumes
Scope:
ComplianceResourceTypes:
- AWS::EC2::Volume
Source:
Owner: AWS
SourceIdentifier: ENCRYPTED_VOLUMES
Type: AWS::Config::ConfigRule
GuarddutyEnabledCentralized:
Properties:
ConfigRuleName: guardduty-enabled-centralized
Source:
Owner: AWS
SourceIdentifier: GUARDDUTY_ENABLED_CENTRALIZED
Type: AWS::Config::ConfigRule
GuarddutyNonArchivedFindings:
Properties:
ConfigRuleName: guardduty-non-archived-findings
InputParameters:
daysHighSev:
Fn::If:
- guarddutyNonArchivedFindingsParamDaysHighSev
- Ref: GuarddutyNonArchivedFindingsParamDaysHighSev
- Ref: AWS::NoValue
daysLowSev:
Fn::If:
- guarddutyNonArchivedFindingsParamDaysLowSev
- Ref: GuarddutyNonArchivedFindingsParamDaysLowSev
- Ref: AWS::NoValue
daysMediumSev:
Fn::If:
- guarddutyNonArchivedFindingsParamDaysMediumSev
- Ref: GuarddutyNonArchivedFindingsParamDaysMediumSev
- Ref: AWS::NoValue
Source:
Owner: AWS
SourceIdentifier: GUARDDUTY_NON_ARCHIVED_FINDINGS
Type: AWS::Config::ConfigRule
IamPasswordPolicy:
Properties:
ConfigRuleName: iam-password-policy
InputParameters:
MaxPasswordAge:
Fn::If:
- iamPasswordPolicyParamMaxPasswordAge
- Ref: IamPasswordPolicyParamMaxPasswordAge
- Ref: AWS::NoValue
MinimumPasswordLength:
Fn::If:
- iamPasswordPolicyParamMinimumPasswordLength
- Ref: IamPasswordPolicyParamMinimumPasswordLength
- Ref: AWS::NoValue
PasswordReusePrevention:
Fn::If:
- iamPasswordPolicyParamPasswordReusePrevention
- Ref: IamPasswordPolicyParamPasswordReusePrevention
- Ref: AWS::NoValue
RequireLowercaseCharacters:
Fn::If:
- iamPasswordPolicyParamRequireLowercaseCharacters
- Ref: IamPasswordPolicyParamRequireLowercaseCharacters
- Ref: AWS::NoValue
RequireNumbers:
Fn::If:
- iamPasswordPolicyParamRequireNumbers
- Ref: IamPasswordPolicyParamRequireNumbers
- Ref: AWS::NoValue
RequireSymbols:
Fn::If:
- iamPasswordPolicyParamRequireSymbols
- Ref: IamPasswordPolicyParamRequireSymbols
- Ref: AWS::NoValue
RequireUppercaseCharacters:
Fn::If:
- iamPasswordPolicyParamRequireUppercaseCharacters
- Ref: IamPasswordPolicyParamRequireUppercaseCharacters
- Ref: AWS::NoValue
Source:
Owner: AWS
SourceIdentifier: IAM_PASSWORD_POLICY
Type: AWS::Config::ConfigRule
IamPolicyNoStatementsWithAdminAccess:
Properties:
ConfigRuleName: iam-policy-no-statements-with-admin-access
Scope:
ComplianceResourceTypes:
- AWS::IAM::Policy
Source:
Owner: AWS
SourceIdentifier: IAM_POLICY_NO_STATEMENTS_WITH_ADMIN_ACCESS
Type: AWS::Config::ConfigRule
IamRootAccessKeyCheck:
Properties:
ConfigRuleName: iam-root-access-key-check
Source:
Owner: AWS
SourceIdentifier: IAM_ROOT_ACCESS_KEY_CHECK
Type: AWS::Config::ConfigRule
IamUserGroupMembershipCheck:
Properties:
ConfigRuleName: iam-user-group-membership-check
Scope:
ComplianceResourceTypes:
- AWS::IAM::User
Source:
Owner: AWS
SourceIdentifier: IAM_USER_GROUP_MEMBERSHIP_CHECK
Type: AWS::Config::ConfigRule
IamUserMfaEnabled:
Properties:
ConfigRuleName: iam-user-mfa-enabled
Source:
Owner: AWS
SourceIdentifier: IAM_USER_MFA_ENABLED
Type: AWS::Config::ConfigRule
IamUserNoPoliciesCheck:
Properties:
ConfigRuleName: iam-user-no-policies-check
Scope:
ComplianceResourceTypes:
- AWS::IAM::User
Source:
Owner: AWS
SourceIdentifier: IAM_USER_NO_POLICIES_CHECK
Type: AWS::Config::ConfigRule
IamUserUnusedCredentialsCheck:
Properties:
ConfigRuleName: iam-user-unused-credentials-check
InputParameters:
maxCredentialUsageAge:
Fn::If:
- iamUserUnusedCredentialsCheckParamMaxCredentialUsageAge
- Ref: IamUserUnusedCredentialsCheckParamMaxCredentialUsageAge
- Ref: AWS::NoValue
Source:
Owner: AWS
SourceIdentifier: IAM_USER_UNUSED_CREDENTIALS_CHECK
Type: AWS::Config::ConfigRule
IncomingSshDisabled:
Properties:
ConfigRuleName: restricted-ssh
Scope:
ComplianceResourceTypes:
- AWS::EC2::SecurityGroup
Source:
Owner: AWS
SourceIdentifier: INCOMING_SSH_DISABLED
Type: AWS::Config::ConfigRule
InstancesInVpc:
Properties:
ConfigRuleName: ec2-instances-in-vpc
Scope:
ComplianceResourceTypes:
- AWS::EC2::Instance
Source:
Owner: AWS
SourceIdentifier: INSTANCES_IN_VPC
Type: AWS::Config::ConfigRule
InternetGatewayAuthorizedVpcOnly:
Properties:
ConfigRuleName: internet-gateway-authorized-vpc-only
Scope:
ComplianceResourceTypes:
- AWS::EC2::InternetGateway
Source:
Owner: AWS
SourceIdentifier: INTERNET_GATEWAY_AUTHORIZED_VPC_ONLY
Type: AWS::Config::ConfigRule
KmsCmkNotScheduledForDeletion:
Properties:
ConfigRuleName: kms-cmk-not-scheduled-for-deletion
Scope:
ComplianceResourceTypes:
- AWS::KMS::Key
Source:
Owner: AWS
SourceIdentifier: KMS_CMK_NOT_SCHEDULED_FOR_DELETION
Type: AWS::Config::ConfigRule
LambdaFunctionPublicAccessProhibited:
Properties:
ConfigRuleName: lambda-function-public-access-prohibited
Scope:
ComplianceResourceTypes:
- AWS::Lambda::Function
Source:
Owner: AWS
SourceIdentifier: LAMBDA_FUNCTION_PUBLIC_ACCESS_PROHIBITED
Type: AWS::Config::ConfigRule
LambdaInsideVpc:
Properties:
ConfigRuleName: lambda-inside-vpc
Scope:
ComplianceResourceTypes:
- AWS::Lambda::Function
Source:
Owner: AWS
SourceIdentifier: LAMBDA_INSIDE_VPC
Type: AWS::Config::ConfigRule
MfaEnabledForIamConsoleAccess:
Properties:
ConfigRuleName: mfa-enabled-for-iam-console-access
Source:
Owner: AWS
SourceIdentifier: MFA_ENABLED_FOR_IAM_CONSOLE_ACCESS
Type: AWS::Config::ConfigRule
MultiRegionCloudTrailEnabled:
Properties:
ConfigRuleName: multi-region-cloudtrail-enabled
Source:
Owner: AWS
SourceIdentifier: MULTI_REGION_CLOUD_TRAIL_ENABLED
Type: AWS::Config::ConfigRule
RdsInstancePublicAccessCheck:
Properties:
ConfigRuleName: rds-instance-public-access-check
Scope:
ComplianceResourceTypes:
- AWS::RDS::DBInstance
Source:
Owner: AWS
SourceIdentifier: RDS_INSTANCE_PUBLIC_ACCESS_CHECK
Type: AWS::Config::ConfigRule
RdsSnapshotEncrypted:
Properties:
ConfigRuleName: rds-snapshot-encrypted
Scope:
ComplianceResourceTypes:
- AWS::RDS::DBSnapshot
- AWS::RDS::DBClusterSnapshot
Source:
Owner: AWS
SourceIdentifier: RDS_SNAPSHOT_ENCRYPTED
Type: AWS::Config::ConfigRule
RdsSnapshotsPublicProhibited:
Properties:
ConfigRuleName: rds-snapshots-public-prohibited
Scope:
ComplianceResourceTypes:
- AWS::RDS::DBSnapshot
- AWS::RDS::DBClusterSnapshot
Source:
Owner: AWS
SourceIdentifier: RDS_SNAPSHOTS_PUBLIC_PROHIBITED
Type: AWS::Config::ConfigRule
RdsStorageEncrypted:
Properties:
ConfigRuleName: rds-storage-encrypted
Scope:
ComplianceResourceTypes:
- AWS::RDS::DBInstance
Source:
Owner: AWS
SourceIdentifier: RDS_STORAGE_ENCRYPTED
Type: AWS::Config::ConfigRule
RedshiftClusterConfigurationCheck:
Properties:
ConfigRuleName: redshift-cluster-configuration-check
InputParameters:
clusterDbEncrypted: 'true'
loggingEnabled: 'true'
Scope:
ComplianceResourceTypes:
- AWS::Redshift::Cluster
Source:
Owner: AWS
SourceIdentifier: REDSHIFT_CLUSTER_CONFIGURATION_CHECK
Type: AWS::Config::ConfigRule
RedshiftClusterMaintenancesettingsCheck:
Properties:
ConfigRuleName: redshift-cluster-maintenancesettings-check
InputParameters:
allowVersionUpgrade:
Fn::If:
- redshiftClusterMaintenancesettingsCheckParamAllowVersionUpgrade
- Ref: RedshiftClusterMaintenancesettingsCheckParamAllowVersionUpgrade
- Ref: AWS::NoValue
Scope:
ComplianceResourceTypes:
- AWS::Redshift::Cluster
Source:
Owner: AWS
SourceIdentifier: REDSHIFT_CLUSTER_MAINTENANCESETTINGS_CHECK
Type: AWS::Config::ConfigRule
RedshiftClusterPublicAccessCheck:
Properties:
ConfigRuleName: redshift-cluster-public-access-check
Scope:
ComplianceResourceTypes:
- AWS::Redshift::Cluster
Source:
Owner: AWS
SourceIdentifier: REDSHIFT_CLUSTER_PUBLIC_ACCESS_CHECK
Type: AWS::Config::ConfigRule
RedshiftRequireTlsSsl:
Properties:
ConfigRuleName: redshift-require-tls-ssl
Scope:
ComplianceResourceTypes:
- AWS::Redshift::Cluster
Source:
Owner: AWS
SourceIdentifier: REDSHIFT_REQUIRE_TLS_SSL
Type: AWS::Config::ConfigRule
RestrictedIncomingTraffic:
Properties:
ConfigRuleName: restricted-common-ports
InputParameters:
blockedPort1:
Fn::If:
- restrictedIncomingTrafficParamBlockedPort1
- Ref: RestrictedIncomingTrafficParamBlockedPort1
- Ref: AWS::NoValue
blockedPort2:
Fn::If:
- restrictedIncomingTrafficParamBlockedPort2
- Ref: RestrictedIncomingTrafficParamBlockedPort2
- Ref: AWS::NoValue
blockedPort3:
Fn::If:
- restrictedIncomingTrafficParamBlockedPort3
- Ref: RestrictedIncomingTrafficParamBlockedPort3
- Ref: AWS::NoValue
blockedPort4:
Fn::If:
- restrictedIncomingTrafficParamBlockedPort4
- Ref: RestrictedIncomingTrafficParamBlockedPort4
- Ref: AWS::NoValue
blockedPort5:
Fn::If:
- restrictedIncomingTrafficParamBlockedPort5
- Ref: RestrictedIncomingTrafficParamBlockedPort5
- Ref: AWS::NoValue
Scope:
ComplianceResourceTypes:
- AWS::EC2::SecurityGroup
Source:
Owner: AWS
SourceIdentifier: RESTRICTED_INCOMING_TRAFFIC
Type: AWS::Config::ConfigRule
RootAccountHardwareMfaEnabled:
Properties:
ConfigRuleName: root-account-hardware-mfa-enabled
Source:
Owner: AWS
SourceIdentifier: ROOT_ACCOUNT_HARDWARE_MFA_ENABLED
Type: AWS::Config::ConfigRule
RootAccountMfaEnabled:
Properties:
ConfigRuleName: root-account-mfa-enabled
Source:
Owner: AWS
SourceIdentifier: ROOT_ACCOUNT_MFA_ENABLED
Type: AWS::Config::ConfigRule
S3AccountLevelPublicAccessBlocks:
Properties:
ConfigRuleName: s3-account-level-public-access-blocks
InputParameters:
BlockPublicAcls:
Fn::If:
- s3AccountLevelPublicAccessBlocksParamBlockPublicAcls
- Ref: S3AccountLevelPublicAccessBlocksParamBlockPublicAcls
- Ref: AWS::NoValue
BlockPublicPolicy:
Fn::If:
- s3AccountLevelPublicAccessBlocksParamBlockPublicPolicy
- Ref: S3AccountLevelPublicAccessBlocksParamBlockPublicPolicy
- Ref: AWS::NoValue
IgnorePublicAcls:
Fn::If:
- s3AccountLevelPublicAccessBlocksParamIgnorePublicAcls
- Ref: S3AccountLevelPublicAccessBlocksParamIgnorePublicAcls
- Ref: AWS::NoValue
RestrictPublicBuckets:
Fn::If:
- s3AccountLevelPublicAccessBlocksParamRestrictPublicBuckets
- Ref: S3AccountLevelPublicAccessBlocksParamRestrictPublicBuckets
- Ref: AWS::NoValue
Scope:
ComplianceResourceTypes:
- AWS::S3::AccountPublicAccessBlock
Source:
Owner: AWS
SourceIdentifier: S3_ACCOUNT_LEVEL_PUBLIC_ACCESS_BLOCKS
Type: AWS::Config::ConfigRule
S3BucketDefaultLockEnabled:
Properties:
ConfigRuleName: s3-bucket-default-lock-enabled
Scope:
ComplianceResourceTypes:
- AWS::S3::Bucket
Source:
Owner: AWS
SourceIdentifier: S3_BUCKET_DEFAULT_LOCK_ENABLED
Type: AWS::Config::ConfigRule
S3BucketLoggingEnabled:
Properties:
ConfigRuleName: s3-bucket-logging-enabled
Scope:
ComplianceResourceTypes:
- AWS::S3::Bucket
Source:
Owner: AWS
SourceIdentifier: S3_BUCKET_LOGGING_ENABLED
Type: AWS::Config::ConfigRule
S3BucketPolicyGranteeCheck:
Properties:
ConfigRuleName: s3-bucket-policy-grantee-check
Scope:
ComplianceResourceTypes:
- AWS::S3::Bucket
Source:
Owner: AWS
SourceIdentifier: S3_BUCKET_POLICY_GRANTEE_CHECK
Type: AWS::Config::ConfigRule
S3BucketPublicReadProhibited:
Properties:
ConfigRuleName: s3-bucket-public-read-prohibited
Scope:
ComplianceResourceTypes:
- AWS::S3::Bucket
Source:
Owner: AWS
SourceIdentifier: S3_BUCKET_PUBLIC_READ_PROHIBITED
Type: AWS::Config::ConfigRule
S3BucketPublicWriteProhibited:
Properties:
ConfigRuleName: s3-bucket-public-write-prohibited
Scope:
ComplianceResourceTypes:
- AWS::S3::Bucket
Source:
Owner: AWS
SourceIdentifier: S3_BUCKET_PUBLIC_WRITE_PROHIBITED
Type: AWS::Config::ConfigRule
S3BucketReplicationEnabled:
Properties:
ConfigRuleName: s3-bucket-replication-enabled
Scope:
ComplianceResourceTypes:
- AWS::S3::Bucket
Source:
Owner: AWS
SourceIdentifier: S3_BUCKET_REPLICATION_ENABLED
Type: AWS::Config::ConfigRule
S3BucketServerSideEncryptionEnabled:
Properties:
ConfigRuleName: s3-bucket-server-side-encryption-enabled
Scope:
ComplianceResourceTypes:
- AWS::S3::Bucket
Source:
Owner: AWS
SourceIdentifier: S3_BUCKET_SERVER_SIDE_ENCRYPTION_ENABLED
Type: AWS::Config::ConfigRule
S3BucketSslRequestsOnly:
Properties:
ConfigRuleName: s3-bucket-ssl-requests-only
Scope:
ComplianceResourceTypes:
- AWS::S3::Bucket
Source:
Owner: AWS
SourceIdentifier: S3_BUCKET_SSL_REQUESTS_ONLY
Type: AWS::Config::ConfigRule
S3BucketVersioningEnabled:
Properties:
ConfigRuleName: s3-bucket-versioning-enabled
Scope:
ComplianceResourceTypes:
- AWS::S3::Bucket
Source:
Owner: AWS
SourceIdentifier: S3_BUCKET_VERSIONING_ENABLED
Type: AWS::Config::ConfigRule
SagemakerEndpointConfigurationKmsKeyConfigured:
Properties:
ConfigRuleName: sagemaker-endpoint-configuration-kms-key-configured
Source:
Owner: AWS
SourceIdentifier: SAGEMAKER_ENDPOINT_CONFIGURATION_KMS_KEY_CONFIGURED
Type: AWS::Config::ConfigRule
SagemakerNotebookInstanceKmsKeyConfigured:
Properties:
ConfigRuleName: sagemaker-notebook-instance-kms-key-configured
Source:
Owner: AWS
SourceIdentifier: SAGEMAKER_NOTEBOOK_INSTANCE_KMS_KEY_CONFIGURED
Type: AWS::Config::ConfigRule
SagemakerNotebookNoDirectInternetAccess:
Properties:
ConfigRuleName: sagemaker-notebook-no-direct-internet-access
Source:
Owner: AWS
SourceIdentifier: SAGEMAKER_NOTEBOOK_NO_DIRECT_INTERNET_ACCESS
Type: AWS::Config::ConfigRule
SecretsmanagerRotationEnabledCheck:
Properties:
ConfigRuleName: secretsmanager-rotation-enabled-check
Scope:
ComplianceResourceTypes:
- AWS::SecretsManager::Secret
Source:
Owner: AWS
SourceIdentifier: SECRETSMANAGER_ROTATION_ENABLED_CHECK
Type: AWS::Config::ConfigRule
SecretsmanagerScheduledRotationSuccessCheck:
Properties:
ConfigRuleName: secretsmanager-scheduled-rotation-success-check
Scope:
ComplianceResourceTypes:
- AWS::SecretsManager::Secret
Source:
Owner: AWS
SourceIdentifier: SECRETSMANAGER_SCHEDULED_ROTATION_SUCCESS_CHECK
Type: AWS::Config::ConfigRule
SecurityhubEnabled:
Properties:
ConfigRuleName: securityhub-enabled
Source:
Owner: AWS
SourceIdentifier: SECURITYHUB_ENABLED
Type: AWS::Config::ConfigRule
SnsEncryptedKms:
Properties:
ConfigRuleName: sns-encrypted-kms
Scope:
ComplianceResourceTypes:
- AWS::SNS::Topic
Source:
Owner: AWS
SourceIdentifier: SNS_ENCRYPTED_KMS
Type: AWS::Config::ConfigRule
VpcDefaultSecurityGroupClosed:
Properties:
ConfigRuleName: vpc-default-security-group-closed
Scope:
ComplianceResourceTypes:
- AWS::EC2::SecurityGroup
Source:
Owner: AWS
SourceIdentifier: VPC_DEFAULT_SECURITY_GROUP_CLOSED
Type: AWS::Config::ConfigRule
VpcFlowLogsEnabled:
Properties:
ConfigRuleName: vpc-flow-logs-enabled
Source:
Owner: AWS
SourceIdentifier: VPC_FLOW_LOGS_ENABLED
Type: AWS::Config::ConfigRule
VpcSgOpenOnlyToAuthorizedPorts:
Properties:
ConfigRuleName: vpc-sg-open-only-to-authorized-ports
Scope:
ComplianceResourceTypes:
- AWS::EC2::SecurityGroup
Source:
Owner: AWS
SourceIdentifier: VPC_SG_OPEN_ONLY_TO_AUTHORIZED_PORTS
Type: AWS::Config::ConfigRule
Conditions:
accessKeysRotatedParamMaxAccessKeyAge:
Fn::Not:
- Fn::Equals:
- ''
- Ref: AccessKeysRotatedParamMaxAccessKeyAge
acmCertificateExpirationCheckParamDaysToExpiration:
Fn::Not:
- Fn::Equals:
- ''
- Ref: AcmCertificateExpirationCheckParamDaysToExpiration
guarddutyNonArchivedFindingsParamDaysHighSev:
Fn::Not:
- Fn::Equals:
- ''
- Ref: GuarddutyNonArchivedFindingsParamDaysHighSev
guarddutyNonArchivedFindingsParamDaysLowSev:
Fn::Not:
- Fn::Equals:
- ''
- Ref: GuarddutyNonArchivedFindingsParamDaysLowSev
guarddutyNonArchivedFindingsParamDaysMediumSev:
Fn::Not:
- Fn::Equals:
- ''
- Ref: GuarddutyNonArchivedFindingsParamDaysMediumSev
iamPasswordPolicyParamMaxPasswordAge:
Fn::Not:
- Fn::Equals:
- ''
- Ref: IamPasswordPolicyParamMaxPasswordAge
iamPasswordPolicyParamMinimumPasswordLength:
Fn::Not: