Ad space (banner)
AD
Got the fundamentals? A structured AWS course is a fast way to level up.
Find AWS courses on UdemyAffiliate link. Costs you nothing extra.
☁️AWS Lessons
- 01Getting Started
- 02What Is AWS?
- 03Checking the Version with aws --version
- 04Setting Credentials with aws configure
- 05Confirming Who You Are with aws sts get-caller-identity
- 06What Is a Region?
- 07Reviewing Settings with aws configure list
- 08What Is IAM?
- 09Listing Users with aws iam list-users
- 10Creating a User with aws iam create-user
- 11Listing Roles with aws iam list-roles
- 12What Is an IAM Policy?
- 13Attaching a Policy with aws iam attach-role-policy
- 14Checking Attached Policies with aws iam list-attached-role-policies
- 15What Is S3?
- 16Creating a Bucket with aws s3 mb
- 17Listing Buckets with aws s3 ls
- 18Uploading a File with aws s3 cp
- 19Listing Objects with aws s3 ls
- 20Syncing a Folder with aws s3 sync
- 21Deleting an Object with aws s3 rm
- 22Deleting a Bucket with aws s3 rb
- 23What Is EC2?
- 24Launching an Instance with aws ec2 run-instances
- 25Listing Instances with aws ec2 describe-instances
- 26Stopping an Instance with aws ec2 stop-instances
- 27Restarting an Instance with aws ec2 start-instances
- 28Terminating an Instance with aws ec2 terminate-instances
- 29What Is a Security Group?
- 30Creating a Security Group with aws ec2 create-security-group
- 31Listing Security Groups with aws ec2 describe-security-groups
- 32What Is Tagging?
- 33Adding Tags with aws ec2 create-tags
- 34What Is Lambda?
- 35Creating a Function with aws lambda create-function
- 36Listing Functions with aws lambda list-functions
- 37Invoking a Function with aws lambda invoke
- 38Deleting a Function with aws lambda delete-function
- 39What Is CloudWatch?
- 40Listing Log Groups with aws logs describe-log-groups
- 41Hands-On: Building a Three-Tier Web Architecture on AWS
Lesson 27 / 41
Restarting an Instance with aws ec2 start-instances
When you want a stopped server back, use aws ec2 start-instances. It starts the instance again, with its disk contents intact.
The syntax is aws ec2 start-instances --instance-ids id.
Running it transitions the instance from stopped to pending, and it is usable shortly after.
A common stumble is finding the public IP address has changed. Stopping and starting reassigns it unless you attached an Elastic IP.
In real work, it pairs with stop for the scheduled shutdown of non-production environments.
AWS
Try it (type this into the pseudo terminal)
❯ aws ec2 start-instances --instance-ids i-0123456789abcdef0
🧑💻 You can type this command into the AWS pseudo terminal to try it yourself (this page itself has no interactive terminal).
Ad space (banner)
Ad space (in-article)
