Search

Terminate Instance

Last Updated: May 10, 2022

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

To know more about access_key and secret_key, click here.

Returns

Return Value Description
Output
  • On Success returns 1 | Instance Terminated Time
  • On Failure returns 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?