This Terraform module helps to setup an AWS account with the requirements of CIS Amazon Web Services Foundations Benchmark v1.1.0
- Identity and Access Management
- Avoid the use of the "root" account (Scored) - Cannot be codified
- Ensure multi-factor authentication (MFA) is enabled for all IAM users that have a console password (Scored)
- Ensure credentials unused for 90 days or greater are disabled (Scored)
- Ensure access keys are rotated every 90 days or less (Scored)
- Ensure IAM password policy requires at least one uppercase letter (Scored)
- Ensure IAM password policy require at least one lowercase letter (Scored)
- Ensure IAM password policy require at least one symbol (Scored)
- Ensure IAM password policy require at least one number (Scored)
- Ensure IAM password policy requires minimum length of 14 or greater (Scored)
- Ensure IAM password policy prevents password reuse (Scored)
- Ensure IAM password policy expires passwords within 90 days or less (Scored)
- Ensure no root account access key exists (Scored)
- Ensure MFA is enabled for the "root" account (Scored)
- TODO: Ensure hardware MFA is enabled for the "root" account (Scored)
- Ensure security questions are registered in the AWS account (Not Scored) Cannot be codified
- Ensure IAM policies are attached only to groups or roles (Scored)
- Enable detailed billing (Scored) Manual intervention 1
- TODO: Ensure IAM Master and IAM Manager roles are active (Scored).
- Maintain current contact details (Scored) Cannot be codified Manual intervention 2
- Ensure security contact information is registered (Scored) Cannot be codified Manual intervention 2
- Ensure IAM instance roles are used for AWS resource access from instances (Not Scored)
- Ensure a support role has been created to manage incidents with AWS Support (Scored)
- Logging
- Ensure CloudTrail is enabled in all regions (Scored)
- Ensure CloudTrail log file validation is enabled (Scored)
- Ensure the S3 bucket CloudTrail logs to is not publicly accessible (Scored)
AWS API does not support to set up billing reports and the section 1.17 only creates the necessary bucket. The rest should be taken care of manually.
After applying Terraform, a privileged user needs to take following actions
- Open https://console.aws.amazon.com/billing/home?#/preference
- Enable Receive Billing Reports
- Type the name of the bucket you've created in section 1.17 into the textbox.
- Click Verify
- Click Save preferences
AWS API does not support this action, so needs to be completed manually by the root user. To find out what needs to be done, please visit https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/manage-account-payment.html#contact-info