EC2 Stop Instances

Amazon Web Services (AWS)’s Elastic Compute Cloud (EC2) is a commercial web service that allows users to rent virtual computers. Using AWS EC2’s cloud infrastructure, you can build powerful servers in the cloud. This service completely eliminates the need to set up and invest in hardware, enabling you to deploy your apps quickly. With AWS EC2, you can set up servers, configure networking and security, and manage storage.

An instance is nothing but a virtual machine. AWS offers a variety of instance types, which are various combinations of CPU, storage, memory, networking capacity, and so on.  

If you are already using EC2 instances, which have attached EBS volumes (block level storage), you can use this action to stop an instance or multiple instance.  To do this, you first need to configure the action, and select the required AWS connection. Select the region in which your EC2 instance resides. Then provide the ID of the instance that you wish to stop. If you want to stop multiple instances at once, click on ‘+ Instance ID’ to add more instances. 

ec2-stop-instances

While configuring this action, you can set ‘Force’ as true or false. If set as true, it stops instances forcefully, without giving the instances an opportunity to flush system cache or metadata.

You can also perform a test dry run before the instances are stopped. This dry run will check if you have the required permissions to stop an instance.

Before stopping an instance, it is important to ensure that it is stopped in a state from where it can be easily restarted. Stopping an instance wipes out the data stored in RAM.

Once you have entered all the required details, click on ‘Done’ and run the workflow. This will stop the specified EC2 instance.

Output:
  • output-arrow aws-128 EC2 Stop Instances
    • left-triangle StoppingInstances array
      • left-triangle InstanceId string
      • left-triangle CurrentState object