Skip to content

AWS Controls

David Stevens edited this page Mar 26, 2025 · 29 revisions

ECS

aws.controls.ecs.1

Explanation

Require Amazon ECS Fargate Services to run on the latest Fargate platform version

Remediation

Set platform_version to LATEST

References

Control Tower CT.ECS.PR.1, FSBP ECS.10

aws.controls.ecs.2

Explanation

Require any Amazon ECS cluster to have container insights activated

Remediation

Add

setting {
  name  = "containerInsights"
  value = "enabled"
}

References

Control Tower CT.ECS.PR.2, FSBP ECS.12

aws.controls.ecs.3

Explanation

Require any Amazon ECS task definition to specify a user that is not the root

Remediation

Set user to a non-root user for all containers in container_definitions.

References

Control Tower CT.ECS.PR.3

aws.controls.ecs.4

Explanation

Require Amazon ECS tasks to use 'awsvpc' networking mode

Remediation

Set network_mode = "awsvpc"

References

Control Tower CT.ECS.PR.4

aws.controls.ecs.5

Explanation

Require an active Amazon ECS task definition to have a logging configuration

Remediation

Set logConfiguration for each container in container_definitions.

References

Control Tower CT.ECS.PR.5, FSBP ECS.9

aws.controls.ecs.6

Explanation

Require Amazon ECS containers to allow read-only access to the root filesystem

Remediation

Set readonlyRootFilesystem = "true" for each container in container_definitions.

References

Control Tower CT.ECS.PR.6, FSBP ECS.5

aws.controls.ecs.7

Explanation

Require an Amazon ECS task definition to have a specific memory usage limit

Remediation

Set memory for each container in container_definitions.

References

Control Tower CT.ECS.PR.7

aws.controls.ecs.8

Explanation

Require Amazon ECS task definitions to have secure networking modes and user definitions. This rule applies to tasks that use network_mode = "host".

Remediation

Set privileged = false and user to a non-root user for each container in container_definitions.

References

Control Tower CT.ECS.PR.8, FSBP ECS.1

aws.controls.ecs.9

Explanation

Require Amazon ECS services not to assign public IP addresses automatically

Remediation

Set assign_public_ip = false.

References

Control Tower CT.ECS.PR.9, FSBP ECS.2

aws.controls.ecs.10

Explanation

Require that Amazon ECS task definitions do not share the host's process namespace

Remediation

Set pid_mode to something other than host.

References

Control Tower CT.ECS.PR.10, FSBP ECS.3

aws.controls.ecs.11

Explanation

Require an Amazon ECS container to run as non-privileged

Remediation

Set privileged = false for each container in container_definitions.

References

Control Tower CT.ECS.PR.11, FSBP ECS.4

aws.controls.ecs.12

Explanation

Require that Amazon ECS task definitions do not pass secrets as container environment variables. This rule checks for environment variables AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, and ECS_ENGINE_AUTH_DATA.

Remediation

Remove the offending environment variables. Prefer using IAM roles if possible. If you must use access keys, store them in SSM or Secrets Manager and use the secrets container definition parameter to populate the environment with them.

References

Control Tower CT.ECS.PR.12, FSBP ECS.8

Passing secrets safely to an ECS container

aws.controls.ecs.13

Explanation

Require that ECS task sets do not automatically assign public IP addresses

Remediation

Set assign_public_ip = false.

References

FSBP ECS.16

IAM

aws.controls.iam.1

Explanation

Require that an AWS Identity and Access Management (IAM) inline policy does not have a statement that includes "*" in the Action and Resource elements

Remediation

Remove all IAM policy statements that allow Action: "*" with Resource: "*". These should be made more specific.

References

Control Tower CT.IAM.PR.1

Control Tower CT.IAM.PR.2

aws.controls.iam.2

Explanation

Require that AWS Identity and Access Management (IAM) customer-managed policies do not have wildcard service actions

Remediation

Remove any IAM policy statements with Effect: "Allow" and Action: "service:*" or NotAction.

References

Control Tower CT.IAM.PR.3 Control Tower CT.IAM.PR.5

aws.controls.iam.3

Explanation

Require that an AWS Identity and Access Management(IAM) user does not have an inline or managed policy attached

Remediation

Remove any policy attachments to users and inherit permissions from IAM groups or roles instead.

References

Control Tower CT.IAM.PR.4

Lambda

aws.controls.lambda.1

Explanation

Require AWS Lambda function policies to prohibit public access.

Remediation

If your action is lambda:InvokeFunction, restrict access to the Lambda through either setting Principal to a specific IAM identity or AWS account instead of a service or wildcard principal or through setting source_account, source_arn, or principal_org_id.

If your Lambda is a function URL, set function_url_auth_type = "AWS_IAM".

References

Control Tower CT.LAMBDA.PR.2

aws.controls.lambda.2

Explanation

Require an AWS Lambda function to be in a customer-managed Amazon Virtual Private Cloud (VPC)

Remediation

Configure vpc_config, providing lists of subnet_ids and security_group_ids.

References

Control Tower CT.LAMBDA.PR.3

aws.controls.lambda.3

Explanation

Require an AWS Lambda layer permission to grant access to an AWS organization or specific AWS account

Remediation

Restrict access to the Lambda layer by either setting principal to a different value than * or by setting organization_id.

References

Control Tower CT.LAMBDA.PR.4

aws.controls.lambda.4

Explanation

Require an AWS Lambda function URL to use AWS IAM-based authentication

Remediation

Set authorization_type = "AWS_IAM"

References

Control Tower CT.LAMBDA.PR.5 AWS documentation for AWS_IAM authorization type

aws.controls.lambda.5

Explanation

Require an AWS Lambda function URL CORS policy to restrict access to specific origins

Remediation

Ensure that cors.allow_origins has been specified and that none of the origins are wildcard origins (*, http://*, https://*).

References

Control Tower CT.LAMBDA.PR.6

RDS

aws.controls.rds.1

Explanation

Require that an Amazon RDS database instance is configured with multiple Availability Zones

Remediation

Set multi_az = true

References

Control Tower CT.RDS.PR.1

aws.controls.rds.2

Explanation

Require an Amazon RDS database instance or cluster to have enhanced monitoring configured

Remediation

Enable enhanced monitoring by setting monitoring_interval to a supported interval higher than 0 and monitoring_role_arn to an IAM role ARN that is configured for monitoring.

References

Control Tower CT.RDS.PR.2

aws.controls.rds.3

Explanation

Require an Amazon RDS cluster to have deletion protection configured

Remediation

Set deletion_protection = true

References

Control Tower CT.RDS.PR.3

aws.controls.rds.4

Explanation

Require an Amazon RDS database cluster to have AWS IAM database authentication configured

Remediation

Set iam_database_authentication_enabled = true and refactor your application to connect using IAM instead of static credentials.

References

Control Tower CT.RDS.PR.4

IAM database authentication documentation

aws.controls.rds.5

Explanation

Require an Amazon RDS database instance to have minor version upgrades configured

Remediation

Set auto_minor_version_upgrade = true.

References

Control Tower CT.RDS.PR.5

aws.controls.rds.6

Explanation

Require an Amazon RDS database cluster to have backtracking configured

Remediation

Set backtrack_window to a positive number of seconds.

References

Control Tower CT.RDS.PR.6

aws.controls.rds.7

Explanation

Require Amazon RDS database instances to have IAM authentication configured

Remediation

Set iam_database_authentication_enabled = true and refactor your application to connect using IAM instead of static credentials.

References

Control Tower CT.RDS.PR.7

IAM database authentication documentation

aws.controls.rds.8

Explanation

Require an Amazon RDS database instance to have automatic backups configured

Remediation

Set backup_retention_period to at least 7 days.

References

Control Tower CT.RDS.PR.8

aws.controls.rds.9

Explanation

Require an Amazon RDS database cluster to copy tags to snapshots

Remediation

Set copy_tags_to_snapshot = true.

References

Control Tower CT.RDS.PR.9

aws.controls.rds.10

Explanation

Require an Amazon RDS database instance to copy tags to snapshots

Remediation

Set copy_tags_to_snapshot = true.

References

Control Tower CT.RDS.PR.10

aws.controls.rds.11

Explanation

Require an Amazon RDS database instance to have a VPC configuration

Remediation

Set db_subnet_group_name to the database VPC subnet group you want to place your instance in.

References

Control Tower CT.RDS.PR.11

aws.controls.rds.12

Explanation

Require an Amazon RDS event subscription to have critical cluster events configured

Remediation

Set enabled = true and include maintenance and failure in your selected event categories.

References

Control Tower CT.RDS.PR.12

aws.controls.rds.13

Explanation

Require any Amazon RDS instance to have deletion protection configured

Remediation

Set deletion_protection = true.

References

Control Tower CT.RDS.PR.13

aws.controls.rds.14

Explanation

Require an Amazon RDS database instance to export logs to Amazon CloudWatch Logs by means of the EnableCloudwatchLogsExports property

Remediation

Set enabled_cloudwatch_logs_exports to a set containing all log types for your database engine.

  • MySQL / MariaDB: enabled_cloudwatch_logs_exports = ["audit", "error", "general", "slowquery"]
  • PostgreSQL: enabled_cloudwatch_logs_exports = ["postgresql", "upgrade"]
  • SQL Server: enabled_cloudwatch_logs_exports = ["agent", "error"]
  • Oracle: enabled_cloudwatch_logs_exports = ["alert", "audit", "listener", "oemagent", "trace"]

References

Control Tower CT.RDS.PR.14

aws.controls.rds.15

Explanation

Require an Amazon RDS database cluster to have encryption at rest configured

Remediation

Set storage_encrypted = true.

References

Control Tower CT.RDS.PR.16

aws.controls.rds.16

Explanation

Require an Amazon RDS event notification subscription to have critical database instance events configured.

Remediation

Set enabled = true and add "maintenance", "failure", and "configuration change" to event_categories.

References

Control Tower CT.RDS.PR.17

aws.controls.rds.17

Explanation

Require an Amazon RDS event notification subscription to have critical database parameter group events configured

Remediation

Set enabled = true and add "configuration change" to event_categories.

References

Control Tower CT.RDS.PR.18

aws.controls.rds.18

Explanation

Require an Amazon RDS event notification subscription to have critical database parameter group events configured

Remediation

Set enabled = true and add "configuration change" and "failure" to event_categories.

References

Control Tower CT.RDS.PR.19

aws.controls.rds.19

Explanation

Require an Amazon RDS database instance not to use a database engine default port

Remediation

Set port to a non-default port number.

References

Control Tower CT.RDS.PR.20

aws.controls.rds.20

Explanation

Require an Amazon RDS DB cluster to have a unique administrator username

Remediation

Set master_username to a different value than admin or postgres.

References

Control Tower CT.RDS.PR.21

aws.controls.rds.21

Explanation

Require an Amazon RDS DB instance to have a unique administrator username

Remediation

Set username to a different value than admin or postgres.

References

Control Tower CT.RDS.PR.22

aws.controls.rds.22

Explanation

Require an Amazon RDS database instance to not be publicly accessible

Remediation

Set publicly_accessible = false.

References

Control Tower CT.RDS.PR.23

aws.controls.rds.23

Explanation

Require an Amazon RDS database instance to have encryption at rest configured

Remediation

Set storage_encrypted = true.

References

Control Tower CT.RDS.PR.24

aws.controls.rds.24

Explanation

Require an Amazon RDS database cluster to export logs to Amazon CloudWatch Logs by means of the EnableCloudwatchLogsExports property

Remediation

Set enabled_cloudwatch_logs_exports to a set containing all log types for your database engine.

  • MySQL / Aurora MySQL: enabled_cloudwatch_logs_exports = ["audit", "error", "general", "slowquery"]
  • PostgreSQL: enabled_cloudwatch_logs_exports = ["postgresql", "upgrade"]
  • Aurora PostgreSQL: enabled_cloudwatch_logs_exports = ["postgresql"]

References

Control Tower CT.RDS.PR.25

aws.controls.rds.25

Explanation

Require an Amazon Relational Database Service DB Proxy to require Transport Layer Security (TLS) connections

Remediation

Set require_tls = true

References

Control Tower CT.RDS.PR.26

aws.controls.rds.26

Explanation

Require an Amazon Relational Database Service DB cluster parameter group to require Transport Layer Security (TLS) connections for supported engine types

Remediation

For Aurora MySQL or MySQL, add

parameter {
  name  = "require_secure_transport"
  value = true
}

For Aurora PostgreSQL or PostgreSQL, add

parameter {
  name  = "rds.force_ssl"
  value = true
}

References

Control Tower CT.RDS.PR.27

aws.controls.rds.27

Explanation

Require an Amazon Relational Database Service DB parameter group to require Transport Layer Security (TLS) connections for supported engine types

Remediation

For MySQL or MariaDB, add

parameter {
  name  = "require_secure_transport"
  value = true
}

For PostgreSQL or SQL Server, add

parameter {
  name  = "rds.force_ssl"
  value = true
}

References

Control Tower CT.RDS.PR.28

aws.controls.rds.28

Explanation

Require that an Amazon RDS database instance has encryption at rest configured to use a KMS key that you specify for supported engine types

Remediation

Set kms_key_id to the ARN or alias of an AWS KMS key that is configured to allow RDS usage.

References

Control Tower CT.RDS.PR.30

Clone this wiki locally