AWS Terraform Resources
Cost estimation reference for 113 AWS resources supported by C3X. Each page covers pricing dimensions, Terraform examples, and optimization tips.
Analytics
aws_athena_workgroupServerless query engine for S3 data. $5 per TB scanned (standard). Provisioned capacity option starts at $0.30/DPU-hour with 24-hour minimum. Workgroups themselves are free; the queries within bill.
aws_elasticsearch_domainThe legacy Elasticsearch Service domain (now OpenSearch). Bills per data-node instance-hour plus storage. A single t3.small.search node is ~$26/month.
aws_emr_clusterManaged Hadoop, Spark, Hive, Presto, and HBase. Bills EC2 instance hours plus EMR service fee (typically $0.063-$0.27/instance-hour on top of EC2). EMR Serverless eliminates instance management; EMR on EKS allows reusing EKS clusters.
aws_glue_crawlerA crawler that catalogs data sources into the Glue Data Catalog, billed per DPU-hour while it runs. 10 DPU-hours/month is ~$4.40 — it only bills during crawl runs.
aws_kendra_indexA managed intelligent-search index. Priced as a flat hourly fee by edition, billed continuously, with a substantial monthly floor.
aws_kinesis_firehose_delivery_streamA managed stream that loads data into S3, Redshift, OpenSearch, or Splunk. Priced per GB ingested, with extras for format conversion and VPC delivery.
aws_kinesisanalyticsv2_applicationA managed Apache Flink (Kinesis Data Analytics) application billed per Kinesis Processing Unit-hour. Two KPUs run ~$161/month, billed while the application runs.
aws_msk_serverless_clusterA serverless Apache Kafka cluster that scales automatically. Priced per cluster-hour plus partition-hours, storage, and data in/out.
aws_mwaa_environmentA managed Apache Airflow environment. Priced per environment-hour by size, plus additional worker and scheduler hours and metadata storage.
aws_opensearchserverless_collectionServerless OpenSearch billed per OpenSearch Compute Unit-hour, with a minimum capacity floor. The 4-OCU minimum is ~$701/month.
aws_redshiftserverless_workgroupServerless Redshift compute billed per RPU-hour only while queries run. 100 RPU-hours is ~$36; idle workgroups cost nothing for compute.
Application Integration
aws_appsync_graphql_apiA managed GraphQL API with real-time subscriptions. Priced per query/mutation operation and per real-time update, plus connection minutes and optional caching.
aws_mq_brokerA managed ActiveMQ or RabbitMQ message broker. Priced per broker-instance-hour by instance type and deployment mode, plus storage.
Backup
Compute
aws_apprunner_serviceA managed container service that scales to zero between requests. Priced on provisioned memory plus active vCPU, with separate build minutes.
aws_ec2_hostA physical server dedicated to your account, billed per host-hour by instance family. An m5 dedicated host is ~$3,700/month — you pay for the whole host, not the instances on it.
aws_instanceAn EC2 virtual machine. Priced per hour by instance type, OS, tenancy, and region, with separate charges for attached EBS volumes and data transfer.
aws_lightsail_instanceSimplified VPS bundles for small workloads. Flat monthly pricing from $3.50/month (512 MB) to $160/month (64 GB). Includes data transfer allowance. Much simpler than EC2 but limited features.
aws_sfn_state_machineWorkflow orchestration. Standard workflows at $0.025 per 1,000 state transitions. Express workflows at $1 per 1M requests + duration fees. Standard for long-running workflows; Express for high-volume short workflows.
aws_spot_instance_requestAn EC2 instance run at Spot prices — up to ~90% below on-demand — in exchange for possible interruption. c3x prices it at the on-demand ceiling (a t3.micro is ~$7.59/month).
Containers
aws_ecr_repositoryA container image registry. Priced per GB-month stored, with the first 500 MB free, plus data transfer charges.
aws_ecs_clusterAn ECS cluster. The cluster itself is free. Cost comes from the EC2 instances and Fargate tasks that run inside it.
aws_ecs_serviceA long-running ECS service. Cost depends on launch type: EC2 (pay for nodes), Fargate (pay per task vCPU/memory), or Fargate Spot.
aws_eks_clusterA managed Kubernetes control plane. Flat $0.10/hour per cluster, with worker nodes and storage billed separately.
aws_eks_node_groupManaged EC2 worker nodes for an EKS cluster. The node group has no charge of its own — it bills as the EC2 instances it launches. 3× m5.large is ~$210/month.
Database
aws_dax_clusterAn in-memory write-through cache for DynamoDB. Priced per node-hour by node type, multiplied across the cluster's node count.
aws_db_instanceA managed relational database instance on RDS. Priced per hour by instance class, engine, deployment option, and region, with storage and IOPS billed separately.
aws_db_proxyA managed connection pool in front of RDS or Aurora. Priced per vCPU-hour of the proxied database instances, billed continuously.
aws_db_snapshotA manual snapshot of an RDS instance, billed per GB-month of backup storage beyond the free allowance. A 50 GB snapshot is ~$4.75/month.
aws_dms_replication_instanceA managed instance that runs database migration and replication tasks. Priced per instance-hour by class, doubled for Multi-AZ, plus storage.
aws_documentdb_clusterMongoDB-compatible managed document database. Instance-hour ($0.277/hour for db.r6g.large) plus storage ($0.10/GB-month) plus I/O ($0.20/M-requests). Backup storage above retention is $0.021/GB-month.
aws_dynamodb_tableA managed NoSQL table. Pay-per-request (on-demand) or provisioned capacity, plus storage. No instances to manage.
aws_elasticache_clusterManaged Redis or Memcached. Priced per node-hour by instance type, with no storage or request charges.
aws_elasticache_replication_groupA Redis (or Valkey) replication group with primary and replica nodes, optionally cluster-mode sharded. Priced per node-hour by node type across all shards and replicas.
aws_elasticache_serverless_cacheA serverless Redis or Valkey cache that scales automatically. Priced per GB-hour of data stored plus per million ElastiCache Processing Units (ECPUs).
aws_glue_jobA managed ETL job using Spark or Python shell. Priced per DPU-hour with 1-minute billing minimum, plus development endpoint and Data Catalog costs.
aws_lightsail_databaseA simplified managed database (MySQL/PostgreSQL) sold as a flat monthly bundle. The micro bundle is ~$15/month, all-in; HA bundles cost more.
aws_memorydb_clusterA durable, Redis-compatible in-memory database. Priced per node-hour across all shards and replicas, plus per-GB data written and snapshot storage.
aws_neptune_clusterManaged graph database supporting Gremlin, openCypher, and SPARQL. Instance hours ($0.348/hour for db.r5.large) plus storage ($0.10/GB-month) plus I/O ($0.20/M requests). Neptune Serverless offers auto-scaling per-NCU.
aws_neptune_cluster_instanceA compute instance in a Neptune graph-database cluster, billed per instance-hour by class. A db.r5.large runs ~$254/month, and a cluster usually has a writer plus readers.
aws_opensearch_domainA managed OpenSearch (formerly Elasticsearch) cluster. Priced per node-hour by instance type, plus storage and optional UltraWarm/Cold tiers.
aws_qldb_ledgerA serverless immutable ledger database billed by write IOs, read IOs, and journal/indexed storage — no instances. 10M write IOs + 20 GB is ~$12/month.
aws_rds_clusterAn Aurora cluster (MySQL or PostgreSQL compatible). Priced by per-instance compute, storage by GB used, and I/O (Standard) or compute (I/O-Optimized).
aws_rds_cluster_instanceA compute instance in an Aurora cluster, billed per instance-hour by class. A db.r6g.large Aurora PostgreSQL instance is ~$247/month — and a cluster usually runs several.
aws_redshift_clusterA managed data warehouse. Two compute models: classic node-based pricing (per-hour) or Redshift Serverless (per-RPU-hour), plus managed storage.
aws_timestreamwrite_tableA serverless time-series table billed by writes, storage tier, and queries — no instances. 100M writes + 500 GB magnetic storage is ~$65/month.
Developer Tools
aws_amplify_appManaged hosting for web apps, billed by build minutes, served data, and storage. A small app (500 build min, 15 GB served, 5 GB stored) is ~$7/month.
aws_codeartifact_domainA package-registry domain billed by stored artifacts, requests, and cross-region data transfer. 100 GB + 1M requests is ~$10/month.
aws_codebuild_projectA managed build environment for CI/CD. Priced per build-minute by compute type, with no idle cost between builds.
aws_codepipelineA managed CI/CD pipeline billed ~$1/month per active pipeline (V1). The cost is trivial; the spend lives in the compute the pipeline triggers.
End User Computing
aws_appstream_fleetA fleet of streaming application instances. Bills per instance-hour by type × fleet size. Two stream.standard.medium instances always-on are ~$146/month.
aws_workspaces_workspaceA managed cloud desktop billed monthly or hourly by bundle. An always-on Value bundle is ~$25/month; larger bundles run up to ~$220.
Integration
Machine Learning
aws_sagemaker_endpointReal-time ML inference endpoint. Bills instance hours 24/7 (e.g., $0.0532/hour for ml.t2.medium, up to $30+/hour for ml.p4d.24xlarge). Serverless inference bills per-invocation. Async inference for batch-like workloads.
aws_sagemaker_notebook_instanceA managed Jupyter notebook instance billed per hour while running. An ml.t3.medium is ~$37/month if left on 24/7 — and idle notebooks are the classic waste.
Management
Messaging
aws_kinesis_streamA real-time data stream. Two capacity modes: Provisioned (priced per shard-hour) or On-Demand (priced per record and per GB).
aws_msk_clusterA managed Apache Kafka cluster. Priced per broker-hour by instance type, plus EBS storage per GB-month and data transfer.
aws_sns_topicA pub/sub topic for sending notifications. Priced per message published, per delivery, and by destination protocol.
aws_sqs_queueA managed message queue. Priced per request, with no per-queue or storage fee. Generous free tier.
Networking
aws_api_gateway_rest_apiA REST API endpoint. Priced per request, with no base hourly fee. Cheaper than ALB at low volume.
aws_apigatewayv2_apiHTTP and WebSocket APIs. HTTP API is 70% cheaper than REST API: $1.00 per million requests vs $3.50. WebSocket connections billed separately by connection-minute and messages.
aws_cloudfront_distributionA CDN distribution. Priced by data transfer to viewers and request count, with rates varying by region.
aws_dx_connectionA dedicated physical network link to AWS, billed per port-hour by speed plus data transfer out. A 1 Gbps port is ~$219/month before egress.
aws_dx_connectionA dedicated physical network connection from on-premises to AWS. Priced per port-hour by bandwidth, plus per-GB data transfer at a lower rate than internet.
aws_ec2_transit_gatewayA network hub connecting multiple VPCs, VPNs, and Direct Connects. $0.05/hour per attachment plus $0.02/GB processed.
aws_ec2_transit_gateway_vpc_attachmentAttaches a VPC to a Transit Gateway, billed ~$0.05/hour (~$36.50/month) per attachment plus the data the TGW processes for it.
aws_eipA static public IPv4 address. Free while attached and in use, $0.005/hour while detached or unassociated. As of 2024, also charges per-hour for attached IPv4 in some scenarios.
aws_globalaccelerator_acceleratorAnycast IPs that route users to the nearest healthy endpoint over the AWS backbone. Priced as a fixed hourly fee plus a per-GB data transfer premium.
aws_lbA managed load balancer (ALB or NLB). Priced per hour plus per LCU/NLCU based on processed traffic.
aws_lightsail_distributionA simplified CDN fronting a Lightsail (or other) origin, sold as a flat monthly bundle with an included transfer allowance. The small bundle is ~$2.50/month.
aws_nat_gatewayA managed NAT gateway for outbound internet access from private subnets. Notoriously expensive: $0.045/hour plus $0.045/GB processed.
aws_networkfirewall_firewallA managed VPC firewall billed per endpoint-hour plus traffic processed. One endpoint with 100 GB is ~$295/month — and multi-AZ deployments multiply the endpoint fee.
aws_route53_health_checkA health check that monitors an endpoint for DNS failover, billed ~$0.50/month for AWS endpoints or ~$0.75 for external ones, plus optional feature add-ons.
aws_route53_resolver_endpointAn inbound or outbound DNS resolver endpoint for hybrid name resolution, billed per elastic network interface (IP) per hour. Two IPs are ~$183/month, plus DNS query charges.
aws_route53_zoneA DNS hosted zone. Flat $0.50/month per zone, plus tiered per-query charges.
aws_vpc_endpointA private endpoint into AWS services from your VPC. Gateway endpoints (S3, DynamoDB) are free; Interface endpoints are ~$7/month per AZ plus data fees.
aws_vpn_connectionA site-to-site IPsec VPN connection between your VPC and on-premises network. $0.05/hour per active connection plus data transfer.
Observability
aws_cloudtrailAn audit log of AWS API calls. Management events are free. Data events and Insights are billed per event.
aws_cloudwatch_dashboardA CloudWatch dashboard for visualizing metrics, billed ~$3/dashboard/month. The first 3 dashboards (with limited metrics) are free.
aws_cloudwatch_log_groupA log group for storing application and AWS service logs. Priced by ingestion ($0.50/GB), storage ($0.03/GB-month), and queries.
aws_cloudwatch_metric_alarmAlarm that triggers actions when a metric breaches a threshold. $0.10/alarm-month for standard resolution. High-resolution alarms (10s) cost $0.30/month. Composite alarms are free per logical condition.
aws_prometheus_workspaceManaged Prometheus billed by samples ingested and metrics stored — no node cost. 1B samples + 100 GB storage is ~$93/month, and the bill scales with metric cardinality.
aws_xray_groupDistributed tracing billed per trace recorded plus per trace retrieved/scanned. 10M traces recorded + 1M scanned is ~$50.50.
Security
aws_acm_certificateTLS certificates for AWS services. Public certificates are free with auto-renewal. Private CA-issued certificates bill $400/month per private CA. Wildcard and SAN certificates included at no extra cost.
aws_acmpca_certificate_authorityA managed private certificate authority. Priced as a flat monthly CA fee by mode, plus a per-certificate issuance charge.
aws_cognito_user_poolA managed user directory for sign-up and sign-in. Priced per monthly active user (MAU) above a free tier, with the rate set by the feature tier.
aws_kms_keyA managed encryption key. Flat $1/month per key, plus per-request charges for cryptographic operations.
aws_secretsmanager_secretA managed secret with versioning, rotation, and IAM-controlled access. Flat $0.40/month per secret plus per-API-call charges.
aws_wafv2_web_aclA web application firewall. $5/month per Web ACL, $1/month per rule, plus $0.60 per million inspected requests.
Security & Identity
aws_cloudhsm_v2_hsmA dedicated, single-tenant hardware security module billed per HSM-hour. One HSM is ~$1,168/month — and production needs at least two for HA.
aws_config_config_ruleA compliance rule evaluated by AWS Config, billed per rule evaluation. 10,000 evaluations is ~$10; cost scales with resource changes and rule count.
aws_config_configuration_recorderRecords resource configuration changes into AWS Config, billed per configuration item. 10,000 items is ~$30; cost is driven by recording scope and churn.
aws_directory_service_directoryA managed directory (Microsoft AD, Simple AD, or AD Connector) billed per hour. Standard Microsoft AD is ~$88/month; Simple AD is cheaper.
aws_fms_policyA Firewall Manager policy that centrally manages WAF/Shield/security-group rules across accounts, billed ~$100/policy/region/month — plus the resources it deploys.
aws_guardduty_detectorManaged threat detection billed by the volume of CloudTrail events, VPC flow logs, and DNS logs analyzed. ~10M events + 100 GB logs is ~$140/month.
aws_macie2_accountManaged sensitive-data discovery for S3, billed per bucket evaluated plus per GB inspected. 50 buckets + 100 GB inspected is ~$105/month.
aws_securityhub_accountCentralized security posture management, billed per security check and per finding ingested. 100K checks/month is ~$100, with tiers lowering the rate at scale.
aws_shield_protectionEnrolls a resource in AWS Shield Advanced DDoS protection. Shield Advanced is a flat ~$3,000/month subscription per organization — shared across all protected resources.
Serverless
Storage
aws_ebs_snapshotA point-in-time backup of an EBS volume, stored in S3. $0.05/GB-month standard (incremental), or $0.0125/GB-month in the archive tier.
aws_ebs_volumeA persistent block storage volume. Priced per GB-month by volume type, with separate IOPS and throughput charges on certain types.
aws_efs_file_systemA managed NFS file system for shared access from EC2, ECS, EKS, and Lambda. Priced per GB stored, with tiered storage classes.
aws_fsx_file_systemManaged file storage for Windows, Lustre, NetApp ONTAP, and OpenZFS workloads. Pricing varies wildly: from $0.025/GB-month (Lustre HDD) to $0.30+/GB-month (Windows SSD with deduplication).
aws_fsx_lustre_file_systemA high-performance Lustre file system for HPC and ML. Bills per GB of provisioned storage, with throughput coupled to capacity. 1.2 TB at 125 MB/s/TiB is ~$174/month.
aws_fsx_ontap_file_systemA managed NetApp ONTAP file system with multiprotocol access and NetApp features, billed per GB of SSD capacity plus throughput. 1 TB Multi-AZ is ~$256/month.
aws_fsx_openzfs_file_systemA managed OpenZFS file system for NFS workloads with ZFS features, billed per GB of SSD capacity plus throughput. 64 GB Single-AZ is ~$5.76/month.
aws_fsx_windows_file_systemA managed SMB file system with Active Directory integration. Bills per GB of provisioned storage plus throughput; 32 GB SSD Single-AZ is ~$4/month, scaling with capacity.
aws_glacier_vaultA vault for long-term archival storage, billed per GB-month at the deep-archive rate. 1 TB is ~$3.60/month — cheap to store, but retrieval costs time and money.
aws_lightsail_bucketSimplified object storage sold as a flat monthly bundle with included storage and transfer. The small bundle is ~$1/month, all-in.
aws_s3_bucketObject storage on S3. Priced by storage class, request count, and data transfer, with the bucket itself being free.
aws_storagegateway_gatewayHybrid storage bridging on-premises to AWS. File Gateway ($0.023/GB-month + data transfer), Volume Gateway (per-GB cached or stored mode), Tape Gateway (VTL for backup). Pricing varies significantly by gateway type.
aws_transfer_serverManaged SFTP, FTPS, or FTP access to S3 and EFS. Priced per protocol-hour the endpoint is enabled, plus per-GB uploaded and downloaded.