feat(aws/ec2): add instance type recommender - #4
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_REGIONoraws configure get region).Specs come from
ec2 describe-instance-types; prices from the Pricing API viaus-east-1. Requiresjq(Homebrew).Usage
Example (
arm 8 4, us-west-2):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