Modifies an attribute of an instance.
ec2-modify-instance-attribute
instance_id id { --block-device-mapping
mapping | --disable-api-termination |
--instance-initiated-shutdown-behavior behavior |
--instance-type type | --kernel
kernel_id | --ramdisk ramdisk_id
| --user-data data}
| Name | Description | Required |
|---|---|---|
|
|
The instance ID. Type: String Default: None Example: i-43a4412a |
Yes |
|
|
The instance type of the instance. Type: String Default: m1.small Example: m1.large |
No |
|
|
Describes the ID of the kernel associated with the AMI. Type: String Default: None Example: --kernel |
No |
|
|
Describes the ID of the RAM disk associated with the AMI. Type: String Default: None Example: --ramdisk |
No |
|
|
MIME, Base64-encoded user data. Type: String Default: None Example: |
No |
|
|
Specifies whether the instance can be terminated using the APIs. You must modify this attribute before you can terminate any "locked" instances from the APIs. Type: Boolean Default: true Example: --disable-api-termination |
No |
|
|
Specifies whether the instance's Amazon EBS volumes are stopped or terminated when the instance is shut down. Type: Boolean Valid Values: Default: true Example: --instance-initiated-shutdown-behavior |
No |
|
|
The root device name (e.g., /dev/sda1). Type: String Default: None Example: --root-device-name |
No |
|
|
Describes the mapping that defines native device names to use when exposing virtual devices. Type: String Default: None Example: -block-device-mapping |
No |
The command returns a table that contains the following information:
Attribute type identifier
ID of the instance on which attributes are being modified
Action performed on the attribute
Attribute or attribute list item value type
Attribute or attribute list item value
Amazon EC2 displays errors on stderr.
This example changed the kernel for the instance.
PROMPT>ec2-modify-instance-attribute i-10a64379 --kernel aki-f70657b2KERNEL i-10a64379 aki-f70657b2