
Amazon Elastic Compute Cloud also known as Amazon EC2 will provide you with a scalable computing service that will eliminate the need of purchasing a physical server that will need an upfront fee. AWS EC2 can help to spin up as many virtual servers as you may need for your project in minutes. Another important aspect of AWS EC2 is that it is highly scalable in reacting to environmental changes. You can also configure the security and networking part to suit your requirement. In this guide, I will be showing you the Various ways to restart an AWS EC2 instance and you may also want to know How to Add and Format a New Virtual Disk to an EC2 Instance and How to sync S3 Bucket with an EC2 instance and How to Deploy Dynamic Website to AWS EC2 and How to Deploy MVC Application to AWS EC2 Using RDP Connection and Web Deploy.
Follow the various ways to restart an AWS EC2 instance
Please follow the steps below to restart an AWS EC2 instance. See how to Set up and configure Route 53 for your Domain in AWS, Various methods to launch the Event Viewer and Various Ansible Authentication Options.
1. Restart using AWS Console
a) Login into your AWS Account and navigate to your AWS EC2 Console.
b) Navigate to the exact EC2 instance and check the box. Under the Instance state drop-down select Reboot instance.

c) Once rebooted you will see the message at the top “Successfully rebooted instance id”.

2. Restart EC2 using Command Line Interface
a) Launch the AWS CLI by searching for CloudShell.

b) Once the CLI is launched enter the below command and hit the enter key.
aws ec2 reboot-instances --instance-ids “enter your instance id here”

Please note that while using the AWS CLI you will not get any message or notification.
3. Restart EC2 using PowerShell
a) You will need to create an AWS key to make use of PowerShell to connect to your AWS account.
b) Go to your EC2 account and create key pair.

c) Run your PowerShell as an Administrator and make sure you have saved the created key pair file in the user folder as depicted in the image below.
d) Enter the below command on the PowerShell and hit the enter key and when asked Yes/No question type Yes.
ssh -i “enter key pair” “enter EC2 user”@“enter your EC2 Public IP”
ssh -i techdirect.pem ec2-user@54.204.119.41

e) After connecting to AWS via PowerShell, you still need to do a few configurations before you can use it to restart your EC2 instance.
f) Navigate to the Security credentials.

g) Navigate to the Access keys section and click the Create access key and create an access key and Secret access key that you will use to action PowerShell to reboot the EC2.

As you can see, the Access Key and Secret Access Key have been created.

h) On the PowerShell enter the AWS Access Key ID and AWS Secret Access Key.
i) Enter any other information you see and hit the enter key.

j) Next enter the following command to restart the EC2 instance. Once its successful you will see the message The system will reboot now!
aws ec2 reboot-instances --instance-ids “enter your instance id here”

Here is a YouTube video discussing this topic highllighing different methods to restart an AWS EC2 instance.
I hope you found this blog post on various ways to restart an AWS EC2 instance Interesting and helpful. In case you have any questions do not hesitate to ask in the comment section.