ec2-deregister

Description

Deregisters the specified AMI. Once deregistered, the AMI cannot be used to launch new instances.

[Note]Note

This command does not delete the AMI.

Syntax

ec2-deregister ami_id

Options

NameDescriptionRequired

ami_id

Unique ID of the AMI which was assigned during registration. To register an AMI, use RegisterImage. To view the AMI IDs of AMIs that belong to your account. use DescribeImages.

Type: String

Default: None

Example: ami-4fa54026

Yes

Output

The command returns a table that contains the following information:

  • IMAGE identifier

  • The ID of the AMI that was deregistered

Amazon EC2 displays errors on stderr.

Examples

Example Request

This example deregisters the ami-4fa54026 AMI.

PROMPT> ec2-deregister ami-4fa54026
IMAGE ami-4fa54026