ModifyImageAttribute

The ModifyImageAttribute operation modifies an attribute of an AMI.

Currently the only attribute supported is launchPermission. By modifying this attribute it is possible to make an AMI public or to grant specific users launch permissions for the AMI. To make the AMI public add the group=all attribute item. To grant launch permissions for a specific user add a userId=<userid> attribute item.

The following table describes the request parameters for ModifyImageAttribute. Parameter names are case sensitive.

Element NameDefinitionRequired?Type
imageId AMI ID to modify an attribute on. Yesxsd:string
launchPermissionAdds or removes launch permissions for the AMI.Yesec2:LaunchPermissionOperationType

The following table describes the default response tags included in ModifyImageAttribute responses.

Element NameDefinitionType
return true if the operation succeeded, otherwise false. xsd:boolean
<ModifyImageAttribute xmlns="http://ec2.amazonaws.com/doc/2007-01-19">
  <imageId>ami-61a54008</imageId>
  <launchPermission>
    <add>
      <item>
        <group>all</group>
      </item>
      <item>
        <userId>495219933132</userId>
      </item>
    </add>
  <launchPermission>
</ModifyImageAttribute>
<ModifyImageAttributeResponse xmlns="http://ec2.amazonaws.com/doc/2007-01-19">
  <return>true</return>
</ModifyImageAttributeResponse>