aws_ssm_document cost estimation
An SSM document is free. It is a JSON or YAML definition of commands or an automation workflow. AWS charges nothing to store it. Cost comes from what its steps run.
An aws_ssm_document defines the actions Systems Manager performs: a Command document (Run Command) that runs shell or PowerShell on managed instances, an Automation document (runbook) that orchestrates a multi-step workflow, or a Session document. Creating and storing documents is free, and Run Command itself and standard Automation steps are free to execute.
The cost is not the document; it is what the steps do. Automation runbooks are free at standard rates, but if you opt into higher-throughput Automation, steps are billed per step (on the order of a fraction of a cent each). More importantly, a document's steps drive real resources: a runbook that patches, snapshots EBS volumes, launches instances, or invokes Lambda incurs the cost of those actions (EBS snapshot storage, instance-hours, Lambda invocations). A Session Manager session using an interface VPC endpoint for private connectivity carries that endpoint's hourly and per-GB charge. The document orchestrates; the orchestrated resources bill.
Because the document is free, cost management is about what it triggers: prune snapshots the runbook creates, keep automation efficient so it does not launch or run resources longer than needed, and stay on standard Automation throughput. c3x prices the resources a document's steps provision and treats the document itself as free.
Terraform example
A minimal but realistic configuration that C3X can estimate.
resource "aws_ssm_document" "restart_app" {
name = "restart-app"
document_type = "Command"
content = jsonencode({
schemaVersion = "2.2"
description = "Restart the app service"
mainSteps = [{
action = "aws:runShellScript"
name = "restart"
inputs = { runCommand = ["systemctl restart app"] }
}]
})
}Pricing dimensions
What you actually pay for when you provision aws_ssm_document.
| Dimension | Unit | What's being charged |
|---|---|---|
| SSM document | free | Storing a Command, Automation, or Session document has no charge. $0 |
| Resources the steps run | varies (billed elsewhere) | Snapshots, instance-hours, and Lambda invocations a runbook triggers are billed on those services. Depends on the action |
| Higher-throughput Automation steps | per step | Opting into higher-throughput Automation bills each step; standard throughput is free. Fraction of a cent per step |
Optimization tips
Common ways to reduce aws_ssm_document cost without changing the workload.
Prune resources a runbook creates
Avoids growing snapshot storageAutomation that snapshots EBS volumes or creates AMIs accumulates storage cost. Add cleanup steps or lifecycle rules so the artifacts the document produces do not pile up.
Stay on standard Automation throughput
Standard Automation execution is free. Only opt into higher-throughput (per-step billed) Automation when you genuinely run very high step volumes.
Keep session and command actions efficient
A runbook that leaves instances running or provisions oversized resources bills for that idle time. Ensure steps stop or right-size what they start.
FAQ
Does an SSM document cost money?
No. Storing Command, Automation, and Session documents is free, and Run Command plus standard Automation execution are free too. Cost comes from the resources the document's steps actually run.
Is running an SSM automation runbook free?
At standard throughput, yes. The charge, if any, is from what the runbook does: EBS snapshots, instance-hours, Lambda invocations, or opting into higher-throughput Automation billed per step.
Does Run Command cost anything?
No. Run Command on managed instances is free. You only pay for what the commands cause, such as extra compute time or resources they create, not for the document or the command execution.
Related resources
Estimate this resource in your own Terraform
Free, open source, no API key. C3X parses your Terraform and shows line-item cost for every resource, including aws_ssm_document.