% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cost.R
\name{get_ec2_instance_price}
\alias{get_ec2_instance_price}
\title{Get EC2 instance pricing (live, cached, with static fallback)}
\usage{
get_ec2_instance_price(instance_type, use_spot = FALSE, region = NULL)
}
\arguments{
\item{instance_type}{EC2 instance type (e.g., "c7g.xlarge")}

\item{use_spot}{Whether to use spot pricing}

\item{region}{AWS region (default: from config or "us-east-1")}
}
\value{
Price per hour in USD
}
\description{
Looks up the current AWS price for an instance type. On-Demand rates come from
the AWS Pricing API and Spot rates from EC2 spot-price history; both are cached
per session. Any failure (offline, missing perms, unknown type) falls back to a
built-in static rate, so cost estimates always return a number.
}
\keyword{internal}
