githubEdit

Change EC2 Instance Type Using AWS CLI

Tasks

  • Change the instance type from t2.micro to t2.nano for the nautilus-ec2 instance using aws-cli only.

  • Ensure the nautilus-ec2 instance is in the running state after the change.

Steps

  1. Get the instance ID and Stop the nautilus-ec2 instance:

     aws ec2 describe-instances --filters "Name=tag:Name,Values=nautilus-ec2" --query "Reservations[*].Instances[*].InstanceId" --output text
    • i-0a089a6cf430546c4

  1. Wait until the instance is stopped:

  1. Change the instance type to t2.nano:

  1. Start the nautilus-ec2 instance:

  1. Ensure the instance is in the running state:

  2. Check the instance type now.

#aws #cloudcomputing #happylearning