

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Aturan yang Dikurasi SCPs dan Config
<a name="scp-library-compliance"></a>

Aturan Terkurasi SCPs dan Konfigurasi untuk AMS Advanced.
+ **Kebijakan kontrol layanan (SCPs)**: Yang disediakan SCPs adalah tambahan dari kebijakan AMS default.

  Anda dapat menggunakan kontrol pustaka ini bersama-sama dengan kontrol default untuk memenuhi persyaratan keamanan tertentu.
+ **Aturan Konfigurasi**: Sebagai ukuran dasar, AMS merekomendasikan penerapan Paket Kesesuaian (lihat Paket Kesesuaian dalam AWS Config panduan) selain aturan konfigurasi [AMS](https://docs.aws.amazon.com/config/latest/developerguide/conformance-packs.html) default (lihat Artefak AMS untuk aturan default). Paket Kesesuaian mencakup sebagian besar persyaratan kepatuhan dan AWS memperbaruinya secara berkala.

  Aturan yang tercantum di sini dapat digunakan untuk menutupi kesenjangan khusus kasus penggunaan yang tidak dicakup oleh Paket Kesesuaian

**catatan**  
Karena aturan default AMS dan paket kesesuaian diperbarui dari waktu ke waktu, Anda mungkin melihat duplikat aturan ini.  
AMS merekomendasikan untuk melakukan pembersihan berkala dari Aturan Konfigurasi duplikat secara umum.  
Untuk AMS Advanced, Aturan Konfigurasi tidak boleh menggunakan remediasi otomatis (lihat Memediasi [Sumber Daya AWS yang Tidak Sesuai dengan Aturan AWS Config) untuk menghindari](https://docs.aws.amazon.com/config/latest/developerguide/remediation.html) perubahan. out-of-band

## SCP-AMS-001: Batasi pembuatan EBS
<a name="scp-ebs-create"></a>

Cegah pembuatan volume EBS jika Anda tidak mengaktifkan enkripsi.

```
{
      "Condition": {
        "Bool": {
          "ec2:Encrypted": "false"
        }
      },
      "Action": "ec2:CreateVolume",
      "Resource": "*",
      "Effect": "Deny"
    }
```

## SCP-AMS-002: Batasi peluncuran EC2
<a name="scp-ec2-launch"></a>

Cegah peluncuran instans EC2 jika volume EBS tidak dienkripsi. Ini termasuk menolak peluncuran EC2 dari yang tidak terenkripsi AMIs karena SCP ini juga berlaku untuk volume root.

```
{
      "Condition": {
        "Bool": {
          "ec2:Encrypted": "false"
        }
      },
      "Action": "ec2:RunInstances",
      "Resource": "arn:aws:ec2:*:*:volume/*",
      "Effect": "Deny"
    }
```

## SCP-ADV-001: Batasi pengiriman RFC
<a name="scp-restrict-rfcs"></a>

**Batasi peran AMS default agar tidak mengirimkan otomatis tertentu seperti RFCs Buat **VPC atau Hapus VPC**.** Ini sangat membantu jika Anda ingin menerapkan izin yang lebih terperinci ke peran federasi Anda.

Misalnya, Anda mungkin `AWSManagedServicesChangeManagement Role` ingin default dapat mengirimkan sebagian besar yang tersedia RFCs kecuali yang memungkinkan pembuatan dan penghapusan VPC, pembuatan subnet tambahan, offboarding akun aplikasi, memperbarui atau menghapus penyedia identitas SAMP:

## SCP-AMS-003: Batasi pembuatan EC2 atau RDS di AMS
<a name="scp-restrict-ec2-rds-creation"></a>

Cegah pembuatan instans Amazon EC2 dan RDS yang tidak memiliki tag tertentu, sambil mengizinkan `AMS Backup IAM` peran default AMS melakukannya. Ini diperlukan untuk pemulihan bencana atau DR.

```
{
    "Sid": "DenyRunInstanceWithNoOrganizationTag",
    "Effect": "Deny",
    "Action": [
        "ec2:RunInstances",
        "rds:CreateDBInstance"
    ],
    "Resource": [
        "arn:aws:ec2:*:*:instance/*",
        "arn:aws:ec2:*:*:volume/*",
        "arn:aws:rds:*:*:db:*"
    ],
    "Condition": {
        "Null": {
            "aws:RequestTag/organization": "true"
        },
        "StringNotLike": {
            "aws:PrincipalArn": [
                "arn:aws:iam::<Account_Number>:role/ams-backup-iam-role"
            ]
        }
    }
}
```

## SCP-AMS-004: Batasi unggahan S3
<a name="scp-prevent-s3-uploads"></a>

Mencegah unggahan objek S3 yang tidak terenkripsi.

```
{
            "Sid": "DenyUnencryptedS3Uploads",
            "Effect": "Deny",
            "Action": "s3:PutObject",
            "Resource": "*",
            "Condition": {
                "StringNotLike": {
                    "s3:x-amz-server-side-encryption": ["aws:kms", "AES256"]
                },
                "Null": {
                    "s3:x-amz-server-side-encryption": "false"
                }
            }
        }
    ]
}
```

## SCP-AMS-005: Batasi akses API dan konsol
<a name="scp-prevent-access"></a>

Cegah akses AWS Console dan API untuk permintaan yang berasal dari alamat IP buruk yang diketahui sebagai pelanggan yang ditentukan InfoSec.

## SCP-AMS-006: Mencegah entitas IAM menghapus akun anggota dari organisasi
<a name="scp-prevent-iam-entity"></a>

Mencegah AWS Identity and Access Management entitas menghapus akun anggota dari organisasi.

```
{
  "Effect": "Deny",
  "Action": ["organizations:LeaveOrganization"],
  "Resource": ["*"]
}
```

## SCP-AMS-007: Mencegah berbagi sumber daya ke akun di luar organisasi Anda
<a name="scp-prevent-sharing-resources"></a>

Mencegah berbagi sumber daya dengan akun eksternal di luar AWS organisasi Anda

```
  {
    "Effect": "Deny",
    "Action": [
      "ram:*"
    ],
    "Resource": [
      "*"
    ],
    "Condition": {
      "Bool": {
        "ram:AllowsExternalPrincipals": "true"
      }
    }
  },
  {
    "Effect": "Deny",
    "Action": [
      "ram:CreateResourceShare",
      "ram:UpdateResourceShare"
    ],
    "Resource": "*",
    "Condition": {
      "Bool": {
        "ram:RequestedAllowsExternalPrincipals": "true"
      }
    }
  }
```

## SCP-AMS-008: Mencegah berbagi dengan organisasi atau unit organisasi () OUs
<a name="scp-prevent-sharing-with-organizations"></a>

Cegah berbagi sumber daya dengan akun and/or OU yang ada di organisasi.

```
{
  "Effect": "Deny",
  "Action": [
    "ram:CreateResourceShare",
    "ram:AssociateResourceShare"
  ],
  "Resource": "*",
  "Condition": {
    "ForAnyValue:StringLike": {
      "ram:Principal": [
        "arn:aws:organizations::*:account/o-${OrganizationId}/${AccountId}",
        "arn:aws:organizations::*:ou/o-${OrganizationId}/ou-${OrganizationalUnitId}"
      ]
    }
  }
}
```

## SCP-AMS-009: Mencegah pengguna menerima undangan berbagi sumber daya
<a name="scp-prevent-resource-share-acceptance"></a>

Cegah akun anggota menerima undangan untuk bergabung dengan pembagian sumber AWS RAM daya. API ini tidak mendukung kondisi apa pun dan mencegah pembagian hanya dari akun eksternal.

```
{
  "Effect": "Deny",
  "Action": ["ram:AcceptResourceShareInvitation"],
  "Resource": ["*"]
}
```

## SCP-AMS-010: Mencegah Wilayah akun mengaktifkan dan menonaktifkan tindakan
<a name="scp-prevent-account-region-enable-disable"></a>

Cegah mengaktifkan atau menonaktifkan AWS Wilayah baru untuk akun Anda. AWS 

```
{
  "Effect": "Deny",
  "Action": [
    "account:EnableRegion",
    "account:DisableRegion"
  ],
  "Resource": "*"
}
```

## SCP-AMS-011: Mencegah tindakan modifikasi penagihan
<a name="scp-prevent-billing-modification"></a>

Mencegah modifikasi konfigurasi penagihan dan pembayaran.

```
{
  "Effect": "Deny",
  "Action": [
    "aws-portal:ModifyBilling",
    "aws-portal:ModifyAccount",
    "aws-portal:ModifyPaymentMethods"
  ],
  "Resource": "*"
}
```

## SCP-AMS-012: Mencegah penghapusan atau modifikasi ke spesifik CloudTrails
<a name="scp-prevent-cloudtrail-modification"></a>

Cegah modifikasi pada AWS CloudTrail jalur tertentu.

```
{
  "Effect": "Deny",
  "Action": [
    "cloudtrail:DeleteEventDataStore",
    "cloudtrail:DeleteTrail",
    "cloudtrail:PutEventSelectors",
    "cloudtrail:PutInsightSelectors",
    "cloudtrail:UpdateEventDataStore",
    "cloudtrail:UpdateTrail",
    "cloudtrail:StopLogging"
  ],
  "Resource": [
    "arn:${Partition}:cloudtrail:${Region}:${Account}:trail/${TrailName}"
  ]
}
```

## SCP-AMS-013: Mencegah menonaktifkan enkripsi EBS default
<a name="scp-prevent-disable-ebs-encryption"></a>

Mencegah penonaktifan enkripsi Amazon EBS default.

```
{
  "Effect": "Deny",
  "Action": [
    "ec2:DisableEbsEncryptionByDefault"
  ],
  "Resource": "*"
}
```

## SCP-AMS-014: Mencegah pembuatan VPC dan subnet default
<a name="scp-prevent-default-vpc-subnet-creation"></a>

Cegah pembuatan VPC dan subnet Amazon default.

```
{
  "Effect": "Deny",
  "Action": [
    "ec2:CreateDefaultSubnet",
    "ec2:CreateDefaultVpc"
  ],
  "Resource": "*"
}
```

## SCP-AMS-015: Mencegah menonaktifkan dan memodifikasi GuardDuty
<a name="scp-prevent-default-vpc-subnet-creation"></a>

 GuardDuty Cegah Amazon dimodifikasi atau dinonaktifkan.

```
{
  "Effect": "Deny",
  "Action": [
    "guardduty:AcceptInvitation",
    "guardduty:ArchiveFindings",
    "guardduty:CreateDetector",
    "guardduty:CreateFilter",
    "guardduty:CreateIPSet",
    "guardduty:CreateMembers",
    "guardduty:CreatePublishingDestination",
    "guardduty:CreateSampleFindings",
    "guardduty:CreateThreatIntelSet",
    "guardduty:DeclineInvitations",
    "guardduty:DeleteDetector",
    "guardduty:DeleteFilter",
    "guardduty:DeleteInvitations",
    "guardduty:DeleteIPSet",
    "guardduty:DeleteMembers",
    "guardduty:DeletePublishingDestination",
    "guardduty:DeleteThreatIntelSet",
    "guardduty:DisableOrganizationAdminAccount",
    "guardduty:DisassociateFromMasterAccount",
    "guardduty:DisassociateMembers",
    "guardduty:InviteMembers",
    "guardduty:StartMonitoringMembers",
    "guardduty:StopMonitoringMembers",
    "guardduty:TagResource",
    "guardduty:UnarchiveFindings",
    "guardduty:UntagResource",
    "guardduty:UpdateDetector",
    "guardduty:UpdateFilter",
    "guardduty:UpdateFindingsFeedback",
    "guardduty:UpdateIPSet",
    "guardduty:UpdateMalwareScanSettings",
    "guardduty:UpdateMemberDetectors",
    "guardduty:UpdateOrganizationConfiguration",
    "guardduty:UpdatePublishingDestination",
    "guardduty:UpdateThreatIntelSet"
  ],
  "Resource": "*"
}
```

## SCP-AMS-016: Mencegah aktivitas pengguna root
<a name="scp-prevent-root-user-activity"></a>

Cegah pengguna root melakukan tindakan apa pun.

```
{
  "Action": "*",
  "Resource": "*",
  "Effect": "Deny",
  "Condition": {
    "StringLike": {
      "aws:PrincipalArn": [
        "arn:aws:iam::*:root"
      ]
    }
  }
}
```

## SCP-AMS-017: Mencegah membuat kunci akses untuk pengguna root
<a name="scp-prevent-access-key-creation"></a>

Cegah pembuatan kunci akses untuk pengguna root.

```
{
  "Effect": "Deny",
  "Action": "iam:CreateAccessKey",
  "Resource": "arn:aws:iam::*:root"
}
```

## SCP-AMS-018: Mencegah menonaktifkan blok akses publik akun S3
<a name="scp-prevent-disabling-s3-public-access-block"></a>

Cegah menonaktifkan blok akses publik akun Amazon S3. Ini mencegah ember apa pun di akun menjadi publik.

```
{
  "Effect": "Deny",
  "Action": "s3:PutAccountPublicAccessBlock",
  "Resource": "*"    
}
```

## SCP-AMS-019: Mencegah menonaktifkan AWS Config atau memodifikasi aturan Config
<a name="scp-prevent-modifying-config-rules"></a>

Mencegah menonaktifkan atau memodifikasi AWS Config aturan.

```
{
  "Effect": "Deny",
  "Action": [
    "config:DeleteConfigRule",
    "config:DeleteConfigurationRecorder",
    "config:DeleteDeliveryChannel",
    "config:DeleteEvaluationResults",
    "config:StopConfigurationRecorder"
  ],
  "Resource": "*"
}
```

## SCP-AMS-020: Cegah semua tindakan IAM
<a name="scp-prevent-iam-actions"></a>

Cegah semua tindakan IAM.

```
{
  "Effect": "Deny",
  "Action": [
    "iam:*"
  ],
  "Resource": "*"
}
```

## SCP-AMS-021: Mencegah penghapusan grup dan aliran Log CloudWatch
<a name="scp-prevent-iam-actions"></a>

Cegah penghapusan grup dan aliran Amazon CloudWatch Logs.

```
{
  "Effect": "Deny",
  "Action": [
    "logs:DeleteLogGroup",
    "logs:DeleteLogStream"
  ],
  "Resource": "*"
}
```

## SCP-AMS-022: Mencegah penghapusan gletser
<a name="scp-prevent-glacier-deletion"></a>

Cegah penghapusan Amazon Glacier.

```
{
  "Effect": "Deny",
  "Action": [
    "glacier:DeleteArchive",
    "glacier:DeleteVault"
  ],
  "Resource": "*"
}
```

## SCP-AMS-023: Mencegah penghapusan IAM Access Analyzer
<a name="scp-prevent-iam-access-analyzer-deletion"></a>

Mencegah penghapusan IAM Access Analyzer.

```
{
  "Action": [
    "access-analyzer:DeleteAnalyzer"
  ],
  "Resource": "*",
  "Effect": "Deny"
}
```

## SCP-AMS-024: Mencegah modifikasi pada Security Hub CSPM
<a name="scp-prevent-security-hub-modification"></a>

Mencegah penghapusan. AWS Security Hub CSPM

```
{
  "Action": [
    "securityhub:DeleteInvitations",
    "securityhub:DisableSecurityHub",
    "securityhub:DisassociateFromMasterAccount",
    "securityhub:DeleteMembers",
    "securityhub:DisassociateMembers"
  ],
  "Resource": "*",
  "Effect": "Deny"
}
```

## SCP-AMS-025: Mencegah penghapusan di bawah Directory Service
<a name="scp-prevent-directory-service-deletion"></a>

Mencegah penghapusan sumber daya di bawah. Directory Service

```
{
  "Action": [
    "ds:DeleteDirectory",
    "ds:DeleteLogSubscription",
    "ds:DeleteSnapshot",
    "ds:DeleteTrust",
    "ds:DeregisterCertificate",
    "ds:DeregisterEventTopic",
    "ds:DisableLDAPS",
    "ds:DisableRadius",
    "ds:DisableSso",
    "ds:UnshareDirectory"
  ],
  "Resource": "*",
  "Effect": "Deny"
}
```

## SCP-AMS-026: Mencegah penggunaan layanan yang tidak terdaftar
<a name="scp-prevent-denylisted-service"></a>

Cegah penggunaan layanan yang tidak terdaftar.

**catatan**  
Ganti {{service1}} dan {{service2}} dengan nama layanan Anda. Contoh {{access-analyzer}} atau{{IAM}}.

```
{
  "Effect": "Deny",
  "Resource": "*",
  "Action": ["{{service1}}:*", "{{service2}}:*"]
}
```

## SCP-AMS-027: Mencegah penggunaan layanan yang tidak terdaftar di Wilayah tertentu
<a name="scp-prevent-denylisted-service-specifc-regions"></a>

Mencegah penggunaan layanan yang tidak terdaftar di AWS Wilayah tertentu.

**catatan**  
Ganti {{service1}} dan {{service2}} dengan nama layanan Anda. Contoh {{access-analyzer}} atau{{IAM}}.  
Ganti {{region1}} dan {{region2}} dengan nama layanan Anda. Contoh {{us-west-2}} atau{{use-east-1}}.

```
{
  "Effect": "Deny",
  "Resource": "*",
  "Action": ["{{service1}}:*", "{{service2}}:*"],
  "Condition": {
    "StringEquals": {
      "aws:RequestedRegion": [
        "{{region1}}",
        "{{region2}}"
      ]
    }
  }
}
```

## SCP-AMS-028: Mencegah tag diubah kecuali oleh kepala sekolah yang berwenang
<a name="scp-prevent-tag-modifications"></a>

Mencegah modifikasi tag oleh pengguna mana pun kecuali kepala sekolah yang berwenang. Gunakan tag otorisasi untuk mengotorisasi prinsipal. Tag otorisasi harus dikaitkan dengan sumber daya dan dengan prinsipal. A hanya user/role dianggap sah jika tag pada sumber daya dan prinsipal cocok. Untuk informasi selengkapnya, lihat sumber daya berikut:
+ [Mengamankan tag sumber daya yang digunakan untuk otorisasi menggunakan kebijakan kontrol layanan di AWS Organizations](https://aws.amazon.com/blogs/security/securing-resource-tags-used-for-authorization-using-service-control-policy-in-aws-organizations/)
+ [Mencegah tag agar tidak dimodifikasi kecuali oleh prinsipal resmi](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples_tagging.html#example-require-restrict-tag-mods-to-admin)

```
{
  "Effect": "Deny",
  "Action": [
    "ec2:CreateTags",
    "ec2:DeleteTags"
  ],
  "Resource": [
    "*"
  ],
  "Condition": {
    "StringNotEquals": {
      "ec2:ResourceTag/access-project": "${aws:PrincipalTag/access-project}",
      "aws:PrincipalArn": "arn:aws:iam::{{{ACCOUNT_ID}}}:{{{RESOURCE_TYPE}}}/{{{RESOURCE_NAME}}}"
    },
    "Null": {
      "ec2:ResourceTag/access-project": false
    }
  }
},
{
  "Effect": "Deny",
  "Action": [
    "ec2:CreateTags",
    "ec2:DeleteTags"
  ],
  "Resource": [
    "*"
  ],
  "Condition": {
    "StringNotEquals": {
      "aws:RequestTag/access-project": "${aws:PrincipalTag/access-project}",
      "aws:PrincipalArn": "arn:aws:iam::{{{ACCOUNT_ID}}}:{{{RESOURCE_TYPE}}}/{{{RESOURCE_NAME}}}"
    },
    "ForAnyValue:StringEquals": {
      "aws:TagKeys": [
        "access-project"
      ]   
    }   
  }
},
{       
  "Effect": "Deny", 
  "Action": [
    "ec2:CreateTags",
    "ec2:DeleteTags"
  ],      
  "Resource": [
    "*"     
  ],      
  "Condition": {
    "StringNotEquals": {
      "aws:PrincipalArn": "arn:aws:iam::{{{ACCOUNT_ID}}}:{{{RESOURCE_TYPE}}}/{{{RESOURCE_NAME}}}"
    },      
    "Null": {
      "aws:PrincipalTag/access-project": true
    }       
  }       
}
```

## SCP-AMS-029: Mencegah pengguna menghapus Amazon VPC Flow Logs
<a name="scp-prevent-vpc-flow-log-deletion"></a>

Mencegah penghapusan Amazon VPC Flow Logs.

```
{
  "Action": [
    "ec2:DeleteFlowLogs",
    "logs:DeleteLogGroup",
    "logs:DeleteLogStream",
    "s3:DeleteBucket",
    "s3:DeleteObject",
    "s3:DeleteObjectVersion",
    "s3:PutLifecycleConfiguration",
    "firehose:DeleteDeliveryStream"
  ],
  "Resource": "*",
  "Effect": "Deny"
}
```

## SCP-AMS-030: Mencegah berbagi subnet VPC dengan akun selain akun jaringan
<a name="scp-prevent-sharing-vpc-subnet"></a>

Cegah berbagi subnet Amazon VPC dengan akun selain akun jaringan.

**catatan**  
Ganti {{NETWORK\_ACCOUNT\_ID}} dengan ID akun jaringan Anda.

```
{
  "Effect": "Deny",
  "Action": [
    "ram:AssociateResourceShare",
    "ram:CreateResourceShare"
  ],
  "Resource": "*",
  "Condition": {
    "StringNotEquals": {
      "ram:Principal": "{{NETWORK_ACCOUNT_ID}}"
    },
    "StringEquals": {
      "ram:RequestedResourceType": "ec2:Subnet"
    }
  }
}
```

## SCP-AMS-031: Mencegah peluncuran instance dengan tipe instans terlarang
<a name="scp-prevent-launching-prohibited-instances"></a>

Mencegah pencucian jenis instans Amazon EC2 yang dilarang.

**catatan**  
Ganti {{instance\_type1}} dan {{instance\_type2}} dengan jenis instance yang ingin Anda batasi, seperti {{t2.micro}} atau string wildcard seperti. {{\*.nano}}

```
{
  "Effect": "Deny",
  "Action": "ec2:RunInstances",
  "Resource": [
    "arn:aws:ec2:*:*:instance/*"
  ],
  "Condition": {
    "ForAnyValue:StringLike": {
      "ec2:InstanceType": [
        "{{instance_type1}}", 
        "{{instance_type2}}"
      ]
    }
  }
}
```

## SCP-AMS-032: Mencegah peluncuran instance tanpa IMDSv2
<a name="scp-prevent-launching-instances-without-imdsv2"></a>

Cegah instans Amazon EC2 tanpa. IMDSv2

```
[
  {
    "Effect": "Deny",
    "Action": "ec2:RunInstances",
    "Resource": "arn:aws:ec2:*:*:instance/*",
    "Condition": {
      "StringNotEquals": {
        "ec2:MetadataHttpTokens": "required"
      }
    }
  },
  {
    "Effect": "Deny",
    "Action": "ec2:RunInstances",
    "Resource": "arn:aws:ec2:*:*:instance/*",
    "Condition": {
      "NumericGreaterThan": {
        "ec2:MetadataHttpPutResponseHopLimit": "3"
      }
    }
  },
  {
    "Effect": "Deny",
    "Action": "*",
    "Resource": "*",
    "Condition": {
      "NumericLessThan": {
        "ec2:RoleDelivery": "2.0"
      }
    }
  },
  {
    "Effect": "Deny",
    "Action": "ec2:ModifyInstanceMetadataOptions",
    "Resource": "*"
  }
]
```

## SCP-AMS-033: Mencegah modifikasi pada peran IAM tertentu
<a name="scp-prevent-modifications-to-iam-roles"></a>

Mencegah modifikasi pada peran IAM tertentu.

```
{
  "Action": [
    "iam:AttachRolePolicy",
    "iam:DeleteRole",
    "iam:DeleteRolePermissionsBoundary",
    "iam:DeleteRolePolicy",
    "iam:DetachRolePolicy",
    "iam:PutRolePermissionsBoundary",
    "iam:PutRolePolicy",
    "iam:TagRole",
    "iam:UntagRole",
    "iam:UpdateAssumeRolePolicy",
    "iam:UpdateRole",
    "iam:UpdateRoleDescription"
  ],
  "Resource": [
     "arn:aws:iam::{{{ACCOUNT_ID}}}:role/{{{RESOURCE_NAME}}}"
  ],
  "Effect": "Deny"
}
```

## SCP-AMS-034: Mencegah AssumeRolePolicy modifikasi pada peran IAM tertentu
<a name="scp-prevent-assumerolepolicy-modifications"></a>

Mencegah modifikasi untuk peran IAM yang ditentukan. AssumeRolePolicy 

```
{
  "Action": [
    "iam:UpdateAssumeRolePolicy"
  ],
  "Resource": [
     "arn:aws:iam::{{{ACCOUNT_ID}}}:role/{{{RESOURCE_NAME}}}"
  ],
  "Effect": "Deny"
}
```

## ConfigRule: Tag yang dibutuhkan
<a name="cnfgrl-required-tags"></a>

Periksa apakah instans EC2 memiliki tag khusus yang Anda butuhkan. Selain itu InfoSec, ini juga berguna untuk Manajemen Biaya Anda

```
ConfigRuleName: required-tags
      Description: >-
        A Config rule that checks whether EC2 instances have the required tags.
      Scope:
        ComplianceResourceTypes:
          - 'AWS::EC2::Instance'
      InputParameters:
        tag1Key: COST_CENTER
        tag2Key: APP_ID
      Source:
        Owner: AWS
        SourceIdentifier: REQUIRED_TAGS
```

## ConfigRule: Kunci akses diputar
<a name="cnfgrl-access-key-rotate"></a>

Periksa apakah kunci akses sedang diputar dalam periode waktu yang ditentukan. Ini biasanya diatur menjadi 90 hari per persyaratan kepatuhan tipikal.

```
ConfigRuleName: access-keys-rotated
      Description: >-
        A config rule that checks whether the active access keys are rotated
        within the number of days specified in maxAccessKeyAge. The rule is
        NON_COMPLIANT if the access keys have not been rotated for more than
        maxAccessKeyAge number of days.
      InputParameters:
        maxAccessKeyAge: '90'
      Source:
        Owner: AWS
        SourceIdentifier: ACCESS_KEYS_ROTATED
      MaximumExecutionFrequency: TwentyFour_Hours
```

## ConfigRule: Kunci akses root IAM di AMS
<a name="cnfgrl-iam-root-rotate"></a>

Periksa apakah kunci akses root tidak ada di akun. Untuk akun AMS Advanced, ini diharapkan sesuai. out-of-the-box

```
ConfigRuleName: iam-root-access-key-check
      Description: >-
        A config rule that checks whether the root user access key is available. The rule is COMPLIANT if the user access key does not exist.
      Source:
        Owner: AWS
        SourceIdentifier: IAM_ROOT_ACCESS_KEY_CHECK
      MaximumExecutionFrequency: TwentyFour_Hours
```

## ConfigRule: EC2 yang dikelola SSM
<a name="cnfgrl-ssm-managed"></a>

Periksa apakah Anda EC2s sedang dikelola oleh SSM Systems Manager.

```
ConfigRuleName: ec2-instance-managed-by-systems-manager
      Description: >-
        A Config rule that checks whether the EC2 instances in the
        account are managed by AWS Systems Manager.
      Scope:
        ComplianceResourceTypes:
          - 'AWS::EC2::Instance'
          - 'AWS::SSM::ManagedInstanceInventory'
      Source:
        Owner: AWS
        SourceIdentifier: EC2_INSTANCE_MANAGED_BY_SSM
```

## ConfigRule: Pengguna IAM yang tidak digunakan di AMS
<a name="cnfgrl-unused-user"></a>

Periksa kredensil pengguna IAM yang belum digunakan selama durasi tertentu. Seperti pemeriksaan rotasi kunci, ini biasanya default hingga 90 hari per persyaratan kepatuhan tipikal.

```
ConfigRuleName: iam-user-unused-credentials-check
      Description: >-
        A config rule that checks whether IAM users have passwords
        or active access keys that have not been used within the
        specified number of days provided.
      InputParameters:
        maxCredentialUsageAge: '90'
      Source:
        Owner: AWS
SourceIdentifier: IAM_USER_UNUSED_CREDENTIALS_CHECK
      MaximumExecutionFrequency: TwentyFour_Hours
```

## ConfigRule: Pencatatan ember S3
<a name="cnfgrl-s3-logging"></a>

Periksa apakah logging telah diaktifkan untuk bucket S3 di akun.

```
ConfigRuleName: s3-bucket-logging-enabled
      Description: >-
        A Config rule that checks whether logging is enabled for S3 buckets.
      Scope:
        ComplianceResourceTypes:
          - 'AWS::S3::Bucket'
      Source:
        Owner: AWS
SourceIdentifier: S3_BUCKET_LOGGING_ENABLED
```

## ConfigRule: Versi ember S3
<a name="cnfgrl-s3-versioning"></a>

Periksa apakah pembuatan versi dan MFA-delete (opsional) diaktifkan di semua bucket S3

```
ConfigRuleName: s3-bucket-versioning-enabled
      Description: >-
        A Config rule that checks whether versioning is enabled for S3
        buckets. Optionally, the rule checks if MFA delete is enabled for S3 buckets.
      Scope:
        ComplianceResourceTypes:
          - 'AWS::S3::Bucket'
      Source:
        Owner: AWS
SourceIdentifier: S3_BUCKET_VERSIONING_ENABLED
```

## ConfigRule: Akses publik S3
<a name="cnfgrl-s3-public-access"></a>

Periksa apakah pengaturan akses publik (ACL Publik, Kebijakan Publik, Bucket Publik) dibatasi di seluruh akun

```
ConfigRuleName: s3-account-level-public-access-blocks
      Description: >-
        A Config rule that checks whether the required public access block
        settings are configured from account level. The rule is only
        NON_COMPLIANT when the fields set below do not match the corresponding
        fields in the configuration item.
      Scope:
        ComplianceResourceTypes:
          - 'AWS::S3::AccountPublicAccessBlock'
      InputParameters:
        IgnorePublicAcls: 'True'
        BlockPublicPolicy: 'True'
        BlockPublicAcls: 'True'
        RestrictPublicBuckets: 'True'
      Source:
        Owner: AWS
SourceIdentifier: S3_ACCOUNT_LEVEL_PUBLIC_ACCESS_BLOCKS
```

## ConfigRule: Temuan yang tidak diarsipkan GuardDuty
<a name="cnfgrl-gd-findings"></a>

Periksa GuardDuty temuan yang tidak diarsipkan yang lebih tua dari durasi yang ditentukan. Durasi default adalah 30 hari untuk low-sev, 7 hari untuk medium-sev dan 1 hari untuk temuan high-sev.

```
ConfigRuleName: guardduty-non-archived-findings
      Description: >-
        A Config rule that checks whether the Amazon GuardDuty has findings that
        are non archived. The rule is NON_COMPLIANT if GuardDuty has non
        archived low/medium/high severity findings older than the specified number.
      InputParameters:
        daysLowSev: '30'
        daysMediumSev: '7'
        daysHighSev: '1'
      Source:
        Owner: AWS
        SourceIdentifier: GUARDDUTY_NON_ARCHIVED_FINDINGS
      MaximumExecutionFrequency: TwentyFour_Hours
```

## ConfigRule: Penghapusan CMK
<a name="cnfgrl-cmk-deletion"></a>

Periksa kunci master AWS Key Management Service kustom (CMKs) yang dijadwalkan (alias tertunda) untuk dihapus. Ini penting karena ketidaksadaran seputar penghapusan CMK dapat menyebabkan data tidak dapat dipulihkan

```
ConfigRuleName: kms-cmk-not-scheduled-for-deletion
      Description: >-
        A config rule that checks whether customer master keys (CMKs) are not
        scheduled for deletion in AWS Key Management Service (AWS KMS). The rule is
        NON_COMPLIANT if CMKs are scheduled for deletion.
      Source:
        Owner: AWS
SourceIdentifier: KMS_CMK_NOT_SCHEDULED_FOR_DELETION
      MaximumExecutionFrequency: TwentyFour_Hours
```

## ConfigRule: Rotasi CMK
<a name="cnfgrl-cmk-rotation"></a>

Periksa apakah rotasi otomatis diaktifkan untuk setiap CMK di akun

```
ConfigRuleName: cmk-backing-key-rotation-enabled
      Description: >-
        A config rule that checks that key rotation is enabled for each customer
        master key (CMK). The rule is COMPLIANT, if the key rotation is enabled
        for specific key object. The rule is not applicable to CMKs that have
        imported key material.
      Source:
        Owner: AWS
SourceIdentifier: CMK_BACKING_KEY_ROTATION_ENABLED
      MaximumExecutionFrequency: TwentyFour_Hours
```