You can stop a running instance at any time, and then start it again. Stopping an instance enables you, for example, to service the instance or to treat its root volume.

The following procedures are available:

Stopping and Starting Instances Using Cockpit

Stopping an Instance

  1. Click Compute > Instances.

  2. Click the running instance you want to stop.

    Multiselection is available.


    The instance is selected.

  3. Click Stop .
    The STOP INSTANCE(S) confirmation dialog box appears.

  4. Click Stop to confirm the operation.
    The state of the selected instance changes to stopping, and then to stopped once the operation is completed.

    If the instance does not stop, you can force it to stop. Beware that forcing an instance to stop may damage your instance system and lose data. Therefore, it is recommended to avoid using force stop. For more information about it and why the instance does not stop properly, see About Instance Lifecycle > Force Stop.

    To force an instance to stop, click Stop  , and then Force Stop.


Starting an Instance

  1. Click Compute > Instances.

  2. Click the stopped instance you want to start.

    Multiselection is available.


    The instance is selected.

  3. Click Start .
    The state of the selected instance changes to pending, and then to running once the operation is completed.


Stopping and Starting Instances Using AWS CLI

Stopping Instances

  • To stop one or more instances, use the stop-instances command following this syntax:

    Request sample
    $ aws ec2 stop-instances \
        --profile YOUR_PROFILE \
        --instance-ids i-12345678 \
        --force \
        --endpoint https://fcu.eu-west-2.outscale.com 

    This command contains the following attributes that you need to specify:

    • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.
    • instance-ids: One or more instance IDs.
    • (optional) force: If set to true, forces the instance to stop without properly exiting running applications.

      Beware that forcing an instance to stop may damage your instance system and data. Therefore, it is recommended to avoid using force stop. For more information about it and why the instance does not stop properly, see About Instance Lifecycle > Force Stop.

    • endpoint: The endpoint corresponding to the Region you want to send the request to.


    The stop-instances command returns the following elements:
    • StoppingInstances: Information about one or more stopping instances. This element contains the following information for each instance:
      • InstanceId: The ID of the instance.
      • CurrentState: The current state of the instance, with the code and the name of the state.
      • PreviousState: The state of the instance before the action, with the code and the name of the state.
    Result sample
    {
        "StoppingInstances": [
            {
                "InstanceId": "i-12345678",
                "CurrentState": {
                    "Code": 64,
                    "Name": "stopping"
                },
                "PreviousState": {
                    "Code": 16,
                    "Name": "running"
                }
            }
        ]
    } 
  • The state of the specified instances changes to stopping, and then to stopped once the operation is completed.

Starting Instances

  • To start one or more instances, use the start-instances command following this syntax:

    Request sample
    $ aws ec2 start-instances \
        --profile YOUR_PROFILE \
        --instance-ids i-12345678 \
        --endpoint https://fcu.eu-west-2.outscale.com 

    This command contains the following attributes that you need to specify:

    • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.
    • instance-ids: One or more instance IDs.
    • endpoint: The endpoint corresponding to the Region you want to send the request to.


    The start-instances command returns the following elements:
    • StartingInstances: Information about one or more starting instances. This element contains the following information for each instance:
      • InstanceId: The ID of the instance.
      • CurrentState: The current state of the instance, with the code and the name of the state.
      • PreviousState: The state of the instance before the action, with the code and the name of the state.
    Result sample
    {
        "StartingInstances": [
            {
                "InstanceId": "i-12345678",
                "CurrentState": {
                    "Code": 0,
                    "Name": "pending"
                },
                "PreviousState": {
                    "Code": 80,
                    "Name": "stopped"
                }
            }
        ]
    } 
  • The state of the specified instances changes to pending, and then to running once the operation is completed.
     



AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.