HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //usr/local/aws-cli/v2/dist/awscli/examples/ec2/restore-snapshot-tier.rst
**Example 1: To permanently restore an archived snapshot**

The following ``restore-snapshot-tier`` example permanently restores the specified snapshot. Specify the ``--snapshot-id`` and include the ``permanent-restore`` option. ::

    aws ec2 restore-snapshot-tier \
        --snapshot-id snap-01234567890abcedf \
        --permanent-restore

Output::

    {
        "SnapshotId": "snap-01234567890abcedf",
        "IsPermanentRestore": true
    }

For more information about snapshot archiving, see `Archive Amazon EBS snapshots <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-archive.html>` in the *Amazon EC2 User Guide*.

**Example 2: To temporarily restore an archived snapshot**

The following ``restore-snapshot-tier`` example temporarily restores the specified snapshot. Omit the ``--permanent-restore`` option. Specify the ``--snapshot-id`` and, for ``temporary-restore-days``, specify the number of days for which to restore the snapshot. ``temporary-restore-days`` must be specified in days. The allowed range is ``1`` to ``180``. If you do not specify a value, it defaults to ``1`` day. ::

    aws ec2 restore-snapshot-tier \
        --snapshot-id snap-01234567890abcedf \
        --temporary-restore-days 5

Output::

    {
        "SnapshotId": "snap-01234567890abcedf",
        "RestoreDuration": 5,
        "IsPermanentRestore": false
    }

For more information about snapshot archiving, see `Archive Amazon EBS snapshots <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-archive.html>` in the *Amazon EC2 User Guide*.

**Example 3: To modify the restore period**

The following ``restore-snapshot-tier`` example changes the restore period for the specified snapshot to ``10`` days. ::

    aws ec2 restore-snapshot-tier \
        --snapshot-id snap-01234567890abcedf 
        --temporary-restore-days 10

Output::

    {
        "SnapshotId": "snap-01234567890abcedf",
        "RestoreDuration": 10,
        "IsPermanentRestore": false
    }

For more information about snapshot archiving, see `Archive Amazon EBS snapshots <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-archive.html>` in the *Amazon EC2 User Guide*.

**Example 4: To modify the restore type**

The following ``restore-snapshot-tier`` example changes the restore type for the specified snapshot from temporary to permanent. ::

    aws ec2 restore-snapshot-tier \
        --snapshot-id snap-01234567890abcedf 
        --permanent-restore

Output::

    {
        "SnapshotId": "snap-01234567890abcedf",
        "IsPermanentRestore": true
    }

For more information about snapshot archiving, see `Archive Amazon EBS snapshots <https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/snapshot-archive.html>` in the *Amazon EC2 User Guide*.