Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Launch and manage Amazon EC2 instances for scalable compute. Configure AMIs, security groups, key pairs, and EBS volumes. Set up auto-scaling groups for high availability and cost optimization across availability zones.
.claude/skills/terminalskills-aws-ec2/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 125% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 131% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 131% | 0% |
| case-15 | ✗→✓ | ▲ Improved | 118% | 0% |
| case-18 | ✗→✓ | ▲ Improved | 80% | 0% |
Amazon Elastic Compute Cloud (EC2) provides resizable virtual servers in the cloud. It's the foundational compute service for running applications, from simple web servers to complex distributed systems.
bash# Launch a basic EC2 instance aws ec2 run-instances \ --image-id ami-0c55b159cbfafe1f0 \ --instance-type t3.micro \ --key-name my-key-pair \ --security-group-ids sg-0123456789abcdef0 \ --subnet-id subnet-0123456789abcdef0 \ --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=web-server-1}]' \ --count 1
bash# Launch with user data script for bootstrapping aws ec2 run-instances \ --image-id ami-0c55b159cbfafe1f0 \ --instance-type t3.small \ --key-name my-key-pair \ --security-group-ids sg-0123456789abcdef0 \ --user-data file://setup.sh \ --iam-instance-profile Name=ec2-app-role \ --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=app-server},{Key=Env,Value=prod}]'
bash# setup.sh — bootstrap script for EC2 instance #!/bin/bash yum update -y yum install -y docker systemctl start docker systemctl enable docker docker pull myapp:latest docker run -d -p 80:8080 myapp:latest
bash# List running instances with key details aws ec2 describe-instances \ --filters "Name=instance-state-name,Values=running" \ --query 'Reservations[].Instances[].[InstanceId,InstanceType,PublicIpAddress,Tags[?Key==`Name`].Value|[0]]' \ --output table
bash# Stop, start, terminate instances aws ec2 stop-instances --instance-ids i-0123456789abcdef0 aws ec2 start-instances --instance-ids i-0123456789abcdef0 aws ec2 terminate-instances --instance-ids i-0123456789abcdef0
bash# Resize an instance (must be stopped first) aws ec2 stop-instances --instance-ids i-0123456789abcdef0 aws ec2 modify-instance-attribute \ --instance-id i-0123456789abcdef0 \ --instance-type '{"Value": "t3.large"}' aws ec2 start-instances --instance-ids i-0123456789abcdef0
bash# Create a security group for a web server aws ec2 create-security-group \ --group-name web-sg \ --description "Allow HTTP, HTTPS, SSH" \ --vpc-id vpc-0123456789abcdef0
bash# Add inbound rules aws ec2 authorize-security-group-ingress \ --group-id sg-0123456789abcdef0 \ --ip-permissions \ 'IpProtocol=tcp,FromPort=80,ToPort=80,IpRanges=[{CidrIp=0.0.0.0/0}]' \ 'IpProtocol=tcp,FromPort=443,ToPort=443,IpRanges=[{CidrIp=0.0.0.0/0}]' \ 'IpProtocol=tcp,FromPort=22,ToPort=22,IpRanges=[{CidrIp=203.0.113.0/24,Description=Office}]'
bash# Create an AMI from a running instance aws ec2 create-image \ --instance-id i-0123456789abcdef0 \ --name "app-server-v1.2.0-$(date +%Y%m%d)" \ --description "App server with latest patches" \ --no-reboot
bash# List your AMIs aws ec2 describe-images --owners self \ --query 'Images[*].[ImageId,Name,CreationDate]' --output table
bash# Deregister old AMI and delete snapshot aws ec2 deregister-image --image-id ami-0123456789abcdef0 aws ec2 delete-snapshot --snapshot-id snap-0123456789abcdef0
bash# Create and attach an EBS volume aws ec2 create-volume \ --size 100 \ --volume-type gp3 \ --availability-zone us-east-1a \ --iops 3000 \ --throughput 125 \ --tag-specifications 'ResourceType=volume,Tags=[{Key=Name,Value=data-vol}]'
bash# Attach volume to instance aws ec2 attach-volume \ --volume-id vol-0123456789abcdef0 \ --instance-id i-0123456789abcdef0 \ --device /dev/xvdf
bash# Create a snapshot for backup aws ec2 create-snapshot \ --volume-id vol-0123456789abcdef0 \ --description "Daily backup $(date +%Y-%m-%d)" \ --tag-specifications 'ResourceType=snapshot,Tags=[{Key=Name,Value=daily-backup}]'
bash# Create a launch template aws ec2 create-launch-template \ --launch-template-name app-server-template \ --launch-template-data '{ "ImageId": "ami-0c55b159cbfafe1f0", "InstanceType": "t3.medium", "SecurityGroupIds": ["sg-0123456789abcdef0"], "KeyName": "my-key-pair", "IamInstanceProfile": {"Name": "ec2-app-role"}, "UserData": "'$(base64 -w0 setup.sh)'" }'
bash# Create an auto-scaling group aws autoscaling create-auto-scaling-group \ --auto-scaling-group-name app-asg \ --launch-template LaunchTemplateName=app-server-template,Version='$Latest' \ --min-size 2 \ --max-size 10 \ --desired-capacity 2 \ --vpc-zone-identifier "subnet-aaa,subnet-bbb" \ --target-group-arns "arn:aws:elasticloadbalancing:us-east-1:123456789:targetgroup/app-tg/abc123" \ --health-check-type ELB \ --health-check-grace-period 300
bash# Create scaling policy based on CPU aws autoscaling put-scaling-policy \ --auto-scaling-group-name app-asg \ --policy-name cpu-scale-out \ --policy-type TargetTrackingScaling \ --target-tracking-configuration '{ "PredefinedMetricSpecification": {"PredefinedMetricType": "ASGAverageCPUUtilization"}, "TargetValue": 70.0, "ScaleInCooldown": 300, "ScaleOutCooldown": 60 }'
bash# Request spot instances for cost savings (up to 90% off) aws ec2 request-spot-instances \ --instance-count 3 \ --type "one-time" \ --launch-specification '{ "ImageId": "ami-0c55b159cbfafe1f0", "InstanceType": "c5.xlarge", "SecurityGroupIds": ["sg-0123456789abcdef0"], "SubnetId": "subnet-0123456789abcdef0" }'
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-02 | pass→pass | 4,255 | 3,090 | -27% | 1 | 1 | 0% | 1,046 | 2,992 | +186% | 0 | 0 | — |
case-01 | fail→pass | 6,225 | 2,894 | -54% | 1 | 1 | 0% | 1,204 | 2,706 | +125% | 0 | 0 | — |
case-03 | pass→pass | 5,819 | 4,124 | -29% | 1 | 1 | 0% | 1,291 | 3,093 | +140% | 0 | 0 | — |
case-04 | pass→pass | 7,419 | 6,873 | -7% | 1 | 1 | 0% | 1,512 | 3,616 | +139% | 0 | 0 | — |
case-05 | pass→pass | 5,468 | 2,326 | -57% | 1 | 1 | 0% | 870 | 2,638 | +203% | 0 | 0 | — |
case-06 | fail→pass | 8,291 | 5,757 | -31% | 1 | 1 | 0% | 1,474 | 3,398 | +131% | 0 | 0 | — |
case-07 | pass→pass | 6,622 | 5,371 | -19% | 1 | 1 | 0% | 1,522 | 3,333 | +119% | 0 | 0 | — |
case-08 | pass→pass | 6,021 | 3,434 | -43% | 1 | 1 | 0% | 1,410 | 2,966 | +110% | 0 | 0 | — |
case-09 | pass→pass | 2,908 | 2,495 | -14% | 1 | 1 | 0% | 616 | 2,588 | +320% | 0 | 0 | — |
case-10 | fail→pass | 5,739 | 3,360 | -41% | 1 | 1 | 0% | 1,125 | 2,601 | +131% | 0 | 0 | — |
case-11 | pass→pass | 5,270 | 2,735 | -48% | 1 | 1 | 0% | 1,103 | 2,768 | +151% | 0 | 0 | — |
case-12 | pass→pass | 3,849 | 3,653 | -5% | 1 | 1 | 0% | 881 | 3,027 | +244% | 0 | 0 | — |
case-13 | pass→pass | 4,990 | 4,170 | -16% | 1 | 1 | 0% | 1,036 | 2,850 | +175% | 0 | 0 | — |
case-14 | pass→pass | 3,107 | 2,116 | -32% | 1 | 1 | 0% | 564 | 2,611 | +363% | 0 | 0 | — |
case-15 | fail→pass | 6,723 | 4,401 | -35% | 1 | 1 | 0% | 1,428 | 3,108 | +118% | 0 | 0 | — |
case-16 | pass→pass | 5,272 | 3,937 | -25% | 1 | 1 | 0% | 1,048 | 2,963 | +183% | 0 | 0 | — |
case-17 | pass→pass | 5,196 | 3,649 | -30% | 1 | 1 | 0% | 732 | 2,987 | +308% | 0 | 0 | — |
case-18 | fail→pass | 20,155 | 4,342 | -78% | 1 | 1 | 0% | 1,666 | 3,006 | +80% | 0 | 0 | — |
case-19 | pass→pass | 12,637 | 10,987 | -13% | 1 | 1 | 0% | 2,311 | 4,252 | +84% | 0 | 0 | — |
case-20 | pass→pass | 4,182 | 2,933 | -30% | 1 | 1 | 0% | 766 | 2,697 | +252% | 0 | 0 | — |
case-21 | pass→pass | 4,700 | 4,929 | +5% | 1 | 1 | 0% | 967 | 3,180 | +229% | 0 | 0 | — |
case-22 | pass→pass | 4,109 | 4,114 | +0% | 1 | 1 | 0% | 895 | 3,048 | +241% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +23 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.