Skip to content

feat(aws/ec2): add instance type recommender - #4

Merged
rwaterman merged 1 commit into
developfrom
feat/ec2-recommend-instance-types
Aug 24, 2026
Merged

feat(aws/ec2): add instance type recommender#4
rwaterman merged 1 commit into
developfrom
feat/ec2-recommend-instance-types

Conversation

@rwaterman

Copy link
Copy Markdown
Owner

Summary

aws/ec2/recommend_instance_types.sh — prompts for architecture (x86 or arm/Graviton), memory in GiB, and vCPU count (or takes them as positional args), then prints the five cheapest current-generation instance types matching those specs. Prices are on-demand Linux, shared tenancy, in the active region (AWS_REGION or aws configure get region).

Specs come from ec2 describe-instance-types; prices from the Pricing API via us-east-1. Requires jq (Homebrew).

Usage

./aws/ec2/recommend_instance_types.sh            # prompts for everything
./aws/ec2/recommend_instance_types.sh arm 8 4    # no prompts

Example (arm 8 4, us-west-2):

TYPE         USD/HR  USD/MONTH  NETWORK             BURSTABLE  LOCAL_DISK  PROCESSOR
c6g.xlarge   0.136   99.28      Up to 10 Gigabit    false      false       AWS Graviton2 Processor
c7g.xlarge   0.145   105.85     Up to 12.5 Gigabit  false      false       AWS Graviton3 Processor
c6gd.xlarge  0.1536  112.13     Up to 10 Gigabit    false      true        AWS Graviton2 Processor
c8g.xlarge   0.1595  116.45     Up to 12.5 Gigabit  false      false       AWS Graviton4 Processor
c7gd.xlarge  0.1814  132.42     Up to 12.5 Gigabit  false      true        AWS Graviton3 Processor

Verified

Ran locally against us-west-2: arm and x86 with args, prompted via stdin, empty prompts (defaults x86/8/4), no-match (arm 7 4) and invalid inputs exit 1 with a message.

🤖 Generated with Claude Code

https://claude.ai/code/session_01LDy1zbMiZbgvzDwH8BkagL

Prompt for architecture (x86 or arm), memory in GiB, and vCPU count, or
take them as positional arguments, then print the five cheapest
current-generation instance types matching those specs, priced on-demand
Linux in the active region. Specs come from ec2 describe-instance-types
and prices from the Pricing API (queried via us-east-1).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LDy1zbMiZbgvzDwH8BkagL
@rwaterman
rwaterman marked this pull request as ready for review August 24, 2026 03:20
@rwaterman
rwaterman merged commit 19e41d6 into develop Aug 24, 2026
2 checks passed
@rwaterman
rwaterman deleted the feat/ec2-recommend-instance-types branch August 24, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant