Search

Terminate Instance

Last Updated: Nov 4, 2020

Articles

Use this function to terminate an Instance in AWS with the given details.

Syntax

Terminate Instance (access_key, secret_key, location, instance_id)

Parameters

Input Parameter Name Description
access_key AWS access_key_ID of the user
secret_key AWS Secret_access_key of the user
location Location where the machine is hosted
instance_id ID of the instance

Returns

Return Value Description
Output
  • On Success: 1, Instance Terminated Successfully
  • On Failure: 0, Error Message

Sample

Terminate Instance (XYZ, ABC, us-east-2, i-111111)

  • Uses the access key ‘XYZ’ and the secret key ‘ABC’ to login to AWS, terminates the instance ‘i-111111’ in the location ‘us-east-2’.
    Returns the ‘Instance Terminated Time’ on terminating the instance.

To view all the AWS functions, click here.

Did you find what you were looking for?