At AWS re:Invent? Bring your audit questions to Anton Babenko.Meet Anton at AWS re:InventAsk for a time
Sign in
Menu
Start free
Annex G: FedRAMP Moderate

FedRAMP Moderate controls built into your Terraform modules. Enforced before apply.

Your 3PAO assesses the infrastructure controls of the FedRAMP Moderate baseline on AWS. The modules enforce these controls before apply and list the baseline control ID each one maps to, where the catalog names one.

Modules enforce 61 of 112 FedRAMP Moderate controls in the catalog. Of the 112 that cite a FedRAMP Moderate clause, they enforce 61. The controls they do not enforce stay with your team, with your SSP, POA&M, continuous monitoring and the 3PAO assessment.

No credit card or AWS account needed to start. By Anton Babenko, maintainer of terraform-aws-modules, more than 2 billion provisions.

Annex G: FedRAMP Moderate

Framework
FedRAMP Moderate baseline, Rev 5
For
Your team, on Terraform
G.1

Scope for FedRAMP Moderate

If a US federal agency uses your cloud service for work in FedRAMP scope, the service needs FedRAMP authorization. The Moderate baseline applies to systems that handle moderate-impact federal information, which covers most SaaS used by agencies.

G.1.1

Covers

  • Infrastructure controls on AWS resources that map to FedRAMP Moderate baseline control IDs, by control family in G.3.
  • terraform-aws-modules through the FedRAMP Moderate framework host or your org endpoint. Once your team switches to the compliance.tf provider, resources written by hand outside modules are checked against its built-in CIS controls, not the FedRAMP Moderate set.
G.1.2

Stays with your team

  • 3PAO assessment engagement and coordination.
  • System Security Plan (SSP) documentation.
  • Plan of Action and Milestones (POA&M) management.
  • Continuous monitoring program.
  • Incident response and reporting to the FedRAMP PMO.
  • Personnel security and access authorization.
  • Physical and environmental protection.
  • Resources outside compliance.tf module coverage, and every control G.4 lists as Mapped: 51 with a FedRAMP Moderate clause and 0 without one.
G.2

The source line

Point a module at the FedRAMP Moderate framework host. Same inputs and outputs, no state migration. Terraform 1.0 or later.

-  source  = "terraform-aws-modules/s3-bucket/aws"
+  source  = "fedrampmoderate.compliance.tf/terraform-aws-modules/s3-bucket/aws"
   version = "~> 5.0"

With an org endpoint, the source names your org host instead, and FedRAMP Moderate comes from your org's configuration.

G.3

Enforced and mapped, by control family

Of the 112 FedRAMP Moderate controls in the documented catalog that cite a clause, modules enforce 61. A control appears once under each control family it maps to.

SC33 of 54
AU23 of 32
AC9 of 25
IA2 of 12
CP6 of 11
SI5 of 8
CM4 of 7
CA2 of 2

The catalog maps 0 more controls to FedRAMP Moderate without naming a clause, 0 of them enforced. They are listed apart at the end of G.4 and left out of these counts.

Every row is a control your 3PAO can look up.

Filter the register, or search by control name or clause, for example SC-28.

112 of 112 shown

Each control links to its public docs page.

Enforced
Modules set this control before anything is deployed.
Mapped
Documented on its docs page, not set by modules. Your team owns it.
G.4

Control register

ControlStatusFedRAMP Moderate clauses
AppSync API caches should have encryption at rest enabledEnforcedSC-13, SC-28, SC-28(1)
AppSync API caches should have encryption in transit enabledEnforcedSC-8(1), SC-13, SC-8
AppSync GraphQL APIs should have field-level logging enabledEnforcedAU-2, AU-3, AU-12
CloudFront distributions should have a default root object configuredEnforcedCM-6, SC-7
CloudFront distributions should require encryption in transitEnforcedSC-8(1)
CloudFront distributions should use custom SSL/TLS certificatesEnforcedSC-8(1)
CloudWatch alarms should have an action configuredEnforcedAU-5, AU-7(1), CA-7(4), CM-11, CM-6, CA-7, SI-4(5)
CloudWatch alarms should have action enabledEnforcedSI-4(5)
CloudWatch log groups should have retention period of at least 365 daysEnforcedAU-11
DMS endpoints for MongoDB should have an authentication mechanism enabledEnforcedAC-3, IA-2, IA-5(1), AC-4
DMS endpoints should use SSLEnforcedSC-8(1)
DynamoDB tables should have AWS KMS encryption enabledEnforcedSC-28(1)
DynamoDB tables should have encryption enabledEnforcedSC-28(1)
DynamoDB tables should have point-in-time recovery enabledEnforcedCP-9, CP-10(2)
Attached EBS volumes should have encryption enabledEnforcedSC-13, SC-28, SC-28(1)
EC2 launch templates should use Instance Metadata Service Version 2 (IMDSv2)EnforcedSC-23, SI-2(2)
ECR repositories should have image scan on push enabledEnforcedSI-2(2)
EFS file systems should have encryption at rest enabledEnforcedSC-28, SC-28(1)
EFS file systems should be encrypted with CMKEnforcedSC-28, SC-28(1)
EKS clusters should have control plane audit logging enabledEnforcedAU-2, AU-3, AU-3(1), AU-12
ElastiCache Redis clusters should have automatic backups enabled with a retention period of 15 days or greaterEnforcedCP-9
ElastiCache for Redis replication groups should be encrypted at restEnforcedSC-28(1)
ElastiCache for Redis replication groups should be encrypted in transitEnforcedSC-8(1)
ELB application and network load balancer listeners should use secure protocolsEnforcedSC-8(1), SC-13, SC-8
ELB classic load balancers should have cross-zone load balancing enabledEnforcedCP-7
FSx for Lustre file systems should be configured to copy tags to backupsEnforcedCM-8
Lambda functions tracing should be enabledEnforcedCA-7, SI-4, SI-4(2)
Log groups should have encryption at rest enabledEnforcedAU-9, SC-28(1)
MSK clusters should require TLS for client-broker connectionsEnforcedSC-8(1)
MSK clusters should have public access disabledEnforcedSC-7, SC-7(3), SC-7(5)
MSK clusters should disable unauthenticated accessEnforcedAC-6, AC-3, IA-2, IA-8
Network Firewall firewalls should have subnet change protection enabledEnforcedAC-6(10), CM-3, CM-5, CM-6, SC-7
OpenSearch domains should have at least three data nodesEnforcedCP-7
OpenSearch domains node-to-node encryption should be enabledEnforcedSC-8(1)
Aurora MySQL DB clusters should have audit logging enabledEnforcedAU-2, AU-3, AU-12
Aurora PostgreSQL DB clusters should publish logs to CloudWatch LogsEnforcedAU-2, AU-3, AU-3(1), AU-12
RDS DB clusters should be encrypted at restEnforcedSC-28(1)
RDS DB instance encryption at rest should be enabledEnforcedSC-28, SC-28(1)
RDS for PostgreSQL DB instances should publish logs to CloudWatch LogsEnforcedAU-2, AU-3, AU-3(1), AU-12
RDS for SQL Server DB instances should publish logs to CloudWatch LogsEnforcedAU-2, AU-3, AU-3(1), AU-12
Redshift clusters should have automatic snapshots enabledEnforcedCP-9, CP-10(2)
Redshift cluster encryption in transit should be enabledEnforcedSC-8(1)
Redshift clusters should have audit logging and encryption enabledEnforcedSC-28(1)
Redshift clusters should have KMS encryption enabledEnforcedSC-28(1)
Redshift clusters should have Multi-AZ deployments enabledEnforcedCP-2, CP-6, CP-7, CP-7(1)
S3 buckets should not use ACLs for user access controlEnforcedAU-9
S3 buckets should have default encryption enabledEnforcedAU-9, SC-28(1)
S3 buckets should have default encryption enabled using KMSEnforcedAU-9, SC-28(1)
S3 buckets should have lifecycle policies configuredEnforcedAU-4, AU-11
S3 buckets should have logging enabledEnforcedAU-2, AU-3, AU-12
S3 buckets should not be accessible to all authenticated usersEnforcedAU-9
S3 buckets should have object lock enabledEnforcedAU-9
S3 buckets should prohibit public read accessEnforcedAC-6, AC-3, AU-9, AC-4, SC-7
S3 buckets should prohibit public write accessEnforcedAC-6, AC-3, AU-9, AC-4, SC-7
S3 buckets with versioning enabled should have lifecycle policies configuredEnforcedAU-4, AU-11
S3 buckets should have versioning enabledEnforcedAU-9
S3 public access should be blocked at account levelEnforcedAU-9, AC-4, SC-7
S3 public access should be blocked at bucket levelEnforcedAU-9, AC-4, SC-7
VPC Security groups should only allow unrestricted incoming traffic for authorized portsEnforcedAC-4, SC-7, SC-7(4)
VPC security groups should restrict ingress from 0.0.0.0/0 or ::/0 to cassandra ports 7199 or 9160 or 8888EnforcedAC-4, SC-7, SC-7(4)
EC2 VPN connections should have logging enabledEnforcedAU-2, AU-3, AU-3(1), AU-12
API Gateway stages should have cache encryption at rest enabledMappedSC-28(1)
API Gateway stages should have logging enabledMappedAU-2, AU-3, AU-12
Athena workgroups should be encrypted at restMappedSC-28, SC-28(1)
Athena workgroups should enforce configurationMappedCM-2, CM-6
Athena workgroups should have logging enabledMappedAU-2, AU-3, AU-3(1), AU-12
Backup plan rules should retain recovery points for at least 35 daysMappedCP-9
CloudFormation stacks should have notifications enabledMappedCM-8(3)
CloudTrail trails should have logs encrypted using a customer managed KMS keyMappedAU-9, SC-28, SC-28(1)
CloudTrail trails should have log file validation enabledMappedAU-9
CodeBuild report group exports should be encrypted at restMappedSC-13, SC-28, SC-28(1)
Cognito identity pools should not allow unauthenticated identitiesMappedAC-3, IA-2
DataSync tasks should have logging enabledMappedAU-2, AU-3, AU-3(1), AU-12
DynamoDB Accelerator (DAX) clusters should be encrypted at restMappedSC-28(1)
DynamoDB Accelerator clusters should be encrypted in transitMappedSC-8(1), SC-13, SC-8
DMS endpoints for Redis OSS should have TLS enabledMappedSC-8(1), SC-13, SC-8
DocumentDB clusters should have an adequate backup retention periodMappedCP-10(2)
DocumentDB clusters should have encryption at rest enabledMappedSC-28, SC-28(1)
EC2 network interfaces should have source/destination checking enabledMappedAC-4, SC-7, SC-7(3), SC-7(5)
EC2 transit gateways should have auto accept shared attachments disabledMappedAC-4, SC-7, SC-7(4)
EKS clusters should be configured to have kubernetes secrets encrypted using KMSMappedSC-12, SC-13, SC-28, SC-28(1)
ElastiCache clusters should not use the default subnet groupMappedAC-4
Elasticsearch domain node-to-node encryption should be enabledMappedSC-8(1)
IAM password policies should have minimum length set to 14 or greaterMappedAC-2, IA-2, IA-5, IA-5(1)
IAM password policies should require at least one lowercase letterMappedAC-2, IA-2, IA-5, IA-5(1)
IAM password policies should require at least one numberMappedAC-2, IA-2, IA-5, IA-5(1)
IAM password policies should require at least one symbolMappedAC-2, IA-2, IA-5, IA-5(1)
IAM password policies should require at least one uppercase letterMappedAC-2, IA-2, IA-5, IA-5(1)
IAM password policies should prevent password reuseMappedAC-2, IA-2, IA-5, IA-5(1)
IAM password policies should have strong configurations with minimum length of 8 or greaterMappedAC-2, IA-2, IA-5, IA-5(1)
IAM password policies should have strong configurationsMappedAC-2, IA-2, IA-5, IA-5(1)
IAM password policies should expire passwords within 90 days or lessMappedAC-2, IA-2, IA-5, IA-5(1)
Kinesis firehose delivery streams should have server side encryption enabledMappedSC-13, SC-28, SC-28(1)
Kinesis streams should have an adequate data retention periodMappedSI-12
MQ brokers should have audit log streaming to CloudWatch enabledMappedAU-2, AU-12
MQ brokers should have automatic minor version upgrade enabledMappedSI-2, SI-2(2)
MQ brokers should restrict public accessMappedAC-4, SC-7, SC-7(5)
MSK connectors should have logging enabledMappedAU-2, AU-3, AU-12
Neptune DB clusters should have automated backups enabledMappedCP-9, CP-10(2)
Neptune DB clusters should be encrypted at restMappedSC-28, SC-28(1)
RDS DB instance backup should be enabledMappedCP-9, CP-10(2)
Redshift Serverless namespaces should export logs to CloudWatch LogsMappedAU-2, AU-3, AU-12
Redshift Serverless namespaces should not use the default database nameMappedCM-2, CM-6
Redshift Serverless workgroups should have enhanced VPC routing enabledMappedAC-4, SC-7
Redshift Serverless workgroups should prohibit public accessMappedSC-7, SC-7(3), SC-7(5)
S3 buckets should have object logging enabledMappedAU-2, AU-3, AU-3(1), AU-12
SageMaker endpoint production variants should have an initial instance count greater than 1MappedCP-7, CP-7(1)
SageMaker models should be in a VPCMappedSC-7, SC-7(3)
SageMaker models should have network isolation enabledMappedSC-7, SC-7(3), SC-28
SQS queues should have a dead-letter queue configuredMappedSI-10
VPC security groups should not allow ingress from 0.0.0.0/0 to remote server administration ports (IPv4)MappedAC-4, SC-7, SC-7(3), SC-7(4), SC-7(5)
VPC security groups should not allow ingress from ::/0 to remote server administration portsMappedSC-7, SC-7(3), SC-7(5)

Clause IDs for the 3PAO. Your stack stays as it is.

Compliance.tf works alongside your scanners, plan policy, CSPM and GRC tool. It sets the controls in the modules and lists the clause each one is there for.

G.5

Evidence

G.5.1

What compliance.tf gives your 3PAO

  • The FedRAMP Moderate clause IDs behind each enforced setting, with stable control IDs and public docs pages.
  • The config snapshot bound to each environment, and the per-action audit log of promotions between environments.
G.5.2

What comes from your AWS account and GRC tool

Evidence of what actually runs comes from your own account, for example AWS Config and your CSPM. Your GRC tool keeps tracking policies and audit workflows.

G.5.3

Related reading

Make Non-Compliant Terraform Impossible, the comparisons with other tools, and the FedRAMP Moderate framework registry at fedrampmoderate.compliance.tf.

G.6

Plans for FedRAMP Moderate

FedRAMP Moderate is in the 30-day trial and in Full Access, $1,000 a year on AWS Marketplace. Schedule of fees.

G.7

Questions about FedRAMP Moderate

G.7.1

Which FedRAMP baseline does this cover?

Compliance.tf maps controls to the FedRAMP Moderate baseline (Rev 5), which selects its controls from NIST SP 800-53 Revision 5. The mapping covers 74 Moderate baseline control IDs that relate to AWS resource configuration, mapped from AWS Config managed conformance pack rules, for example in the Access Control (AC), Audit and Accountability (AU), System and Communications Protection (SC), and Contingency Planning (CP) families. The module registry subdomain fedrampmoderate.compliance.tf serves these mappings, and fedramplow.compliance.tf and fedramphigh.compliance.tf serve the Rev 5 Low and High baselines.

G.7.2

What changed for teams on FedRAMP Rev 4?

On AWS, compliance.tf no longer offers the FedRAMP Rev 4 Low and Moderate baselines. Their registry hostnames, such as fedrampmoderaterev4.compliance.tf, now serve the Rev 5 mappings.

G.7.3

Can I adopt this gradually, or is it all-or-nothing?

Fully incremental. Start with one module in one environment. Your existing modules continue working untouched. If you use Terragrunt or Terramate to orchestrate your runs, nothing changes - you're only swapping the module source line. There is no global policy agent to deploy, no wrapper binary, no sidecar. Each module source line is independent.

G.7.4

What if we want to switch back?

Each module keeps the inputs and outputs of its terraform-aws-modules counterpart and needs no state migration, so switching back is the same source line change in reverse.