Real-time Pricing

MechCloud displays cost information directly in the plan output before any infrastructure changes are applied. This enables cost-aware infrastructure decisions during development rather than discovering costs after deployment.

Overview

When generating an execution plan, MechCloud calculates and displays comprehensive cost information for AWS resources that have associated costs.

Supported Billing Models

Model
How it appears in the plan
Examples

Usage-based (hourly)

Hourly rate + max monthly total (744 hours)

EC2, RDS, Lambda duration, NAT Gateway

Storage (GB-month)

Rate + total when size is known

EBS, S3, RDS storage, DynamoDB storage

Consumption-based

Rate only (actual usage unknown at plan time)

Lambda requests, DynamoDB on-demand, data transfer out

Usage-Based Charges (Price + Cost)

For resources with predictable usage patterns, MechCloud shows both price rates and calculated costs:

  • EC2 instance hours

  • RDS database hours

  • EBS volume storage (GB-Mo)

  • Load balancer hours

  • NAT Gateway hours

Example: An EC2 t3.nano instance shows price: $0.00520/Hrs, monthly: $3.87

EC2 Spot Pricing: For all on-demand EC2 instances, MechCloud displays both on-demand and spot pricing in the plan output. This helps users evaluate potential cost savings by using spot instances when suitable for their workloads.

Example: vm1 (action: create, price: $0.00520/Hrs, monthly: $3.87, spot-price: $0.00160/Hrs, spot-monthly: $1.19)

Consumption-Based Charges (Price Only)

For resources with variable consumption, MechCloud shows pricing rates but cannot calculate costs without actual usage data:

  • Data transfer (GB)

  • DynamoDB requests (Million-WRU, Million-RRU)

  • S3 requests

  • Lambda invocations

  • API Gateway requests

  • NAT Gateway data processing (GB)

Example: DynamoDB write request units pricing shown as Price (Write request units - price: $0.625/Million-WRU)

Cost Change Tracking

MechCloud displays cost change percentages for all resource actions, helping you understand the financial impact of infrastructure changes.

Create Actions

When creating new resources, the cost change is +100% (from $0 to the new cost):

Update Actions

When modifying existing resources, the change percentage reflects the actual cost difference.

Example: Downsizing an instance from t3.medium to t3.small

The -50% change indicates a 50% cost reduction from the previous t3.medium configuration.

Example: Increasing DynamoDB write capacity from 25 to 35 WCU

The +100% change shows new costs since previously all 25 WCU were in the free tier.

Delete Actions

When deleting resources, the cost change is -100% (from current cost to $0):

Plan Output Examples

EC2 Instance (Usage-Based Charges)

EC2 instances have predictable usage patterns, so MechCloud calculates and displays actual hourly and monthly costs.

Creating an on-demand EC2 instance:

Plan output:

The plan shows:

  • On-demand price: $0.00520/Hrs - calculated hourly cost for t3.nano instance

  • On-demand monthly: $3.87 - estimated monthly cost (hourly × 730 hours)

  • Spot price: $0.00160/Hrs - spot instance hourly cost for comparison

  • Spot monthly: $1.19 - estimated monthly spot cost

  • Change: +100% - new resource, going from $0 to $3.87/month

Key Feature: MechCloud displays spot pricing alongside on-demand pricing for all EC2 instances. This encourages users to evaluate spot instances when suitable for their workloads, potentially saving up to 70-90% on compute costs.

Creating a spot EC2 instance:

Plan output:

For spot instances, only spot pricing is shown since the instance will use spot capacity. The +100% change indicates a new resource.

DynamoDB Table (Mixed: Usage-Based + Consumption-Based)

DynamoDB provisioned capacity tables demonstrate both pricing types - calculated costs for provisioned capacity (usage-based) and pricing rates for storage (consumption-based).

Creating a DynamoDB table (Standard class, provisioned capacity):

Plan output:

The plan shows:

  • Usage-based (calculated costs): Provisioned read/write capacity units with tiered pricing

    • First 25 WCU/RCU are free

    • Additional capacity shows quantity and calculated monthly cost

    • Example: 10 WCU beyond free tier = $4.84/month

  • Consumption-based (pricing only): Storage shows pricing rates ($0.25/GB-Mo) without calculated costs since actual storage volume is unknown at provisioning time

Creating a DynamoDB table (Infrequent Access class):

Plan output:

The Infrequent Access class shows:

  • Higher capacity costs: No free tier, all capacity units are charged

    • 35 WCU = $21.09/month (calculated)

    • 30 RCU = $3.57/month (calculated)

  • Lower storage costs: $0.10/GB-Mo vs $0.25/GB-Mo for Standard class (pricing only)

Supported Resources

MechCloud provides real-time pricing for a comprehensive set of AWS resource types including compute, storage, networking, databases, and other services.

For the complete list of supported resources with pricing examples, see Examples (Resources With Cost).

Regional Pricing

Costs vary by AWS region. MechCloud automatically applies region-specific pricing.

Example - t3.medium pricing:

Using Pricing Data

Compare Configurations

Track Environment Costs

When generating plans for different Resource Contexts:

Document Cost Decisions

Example Workflow

This example demonstrates how real-time pricing helps optimize infrastructure costs during development.

Initial Configuration

When you generate a plan, MechCloud shows costs for each resource. You can then adjust instance types and storage to optimize costs before deploying.

Cost Optimization

By reviewing the pricing information in the plan:

  1. Resize compute: Change t3.large to t3.medium to reduce EC2 costs

  2. Adjust storage: Reduce RDS storage from 100GB to 50GB if appropriate

  3. Consider spot: Evaluate spot instances for non-critical workloads

Each configuration change generates a new plan showing updated costs, enabling iterative optimization before any resources are created.

Best Practices

Include cost justification in code comments - Document why specific instance types or sizes were chosen.

Compare costs during code review - Review cost deltas alongside configuration changes.

Track cost trends over time - Save plan outputs to monitor infrastructure cost evolution.

Use Resource Context for cost isolation - Separate cost tracking by environment (dev, staging, prod).

Monitor actual vs estimated costs - Compare MechCloud estimates against actual cloud bills to refine understanding.

Integration with Stateless IaC

Real-time pricing works seamlessly with MechCloud's stateless architecture:

Fresh pricing every plan - No stale data from state files

Accurate cost deltas - Costs compared against actual current state

Environment isolation - Resource Context enables per-environment cost tracking

Next Steps

Last updated

Was this helpful?