EC2: Edit-EC2ImageAttribute Cmdlet | AWS Tools for PowerShell (original) (raw)
Example 1
Edit-EC2ImageAttribute -ImageId ami-12345678 -Description "New description"
This example updates the description for the specified AMI.
Example 2
Edit-EC2ImageAttribute -ImageId ami-12345678 -Attribute launchPermission -OperationType add -UserGroup all
This example makes the AMI public (for example, so any AWS account can use it).
Example 3
Edit-EC2ImageAttribute -ImageId ami-12345678 -Attribute launchPermission -OperationType remove -UserGroup all
This example makes the AMI private (for example, so that only you as the owner can use it).
Example 4
Edit-EC2ImageAttribute -ImageId ami-12345678 -Attribute launchPermission -OperationType add -UserId 111122223333
This example grants launch permission to the specified AWS account.
Example 5
Edit-EC2ImageAttribute -ImageId ami-12345678 -Attribute launchPermission -OperationType remove -UserId 111122223333
This example removes launch permission from the specified AWS account.