Skip to content

Instantly share code, notes, and snippets.

@EvgeniGordeev
EvgeniGordeev / ec2-ls-price.sh
Created July 17, 2025 17:59
List EC2 instances by a filter and list prices
function ec2-ls-price() {
local name_filter=${1:?}
local year=${2:-1yr}
local offering=${3:-All Upfront}
local region=${AWS_REGION:-$(aws configure get region)}
local pricing_region="$region"
local pricing_location
pricing_location=$(get_aws_pricing_location "$region")
if [[ -z "$pricing_location" ]]; then