Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

change AWS AMI Name

is it possible to use the aws cli to change an AMI name?

I can successfully add a "Name" tag (using aws ec2 create-tags) but not change the "AMI Name" that shows on the web UI. This is an imported AMI so the AMI Name is something like
import-ami-XXXXX.

I've tried:

aws ec2 modify-image-attribute --image-id AMI_ID --attribute Name --value VALUE

but I'm getting back a:

An error occurred (InvalidParameterCombination) when calling the ModifyImageAttribute operation: No attributes specified.

any suggestion?

like image 704
user2987504 Avatar asked Nov 17 '17 18:11

user2987504


People also ask

How do I rename an AWS AMI?

You have 2 possible resolutions: Create the AMI image again, using a different name. However, in your case, the name may be automatically generated and this may not be an option. Copy the AMI within the same region, giving the copy a more desirable name.

How do I customize my AMI?

Log in to the AWS Management Console, display the EC2 page for your region, then click Instances. Choose the instance from which you want to create a custom AMI. Click Actions and click Create Image. Type a name for Image Name that is easily identifiable to you and, optionally, input text for Image Description.

How do I find my AMI name?

To find the most recent AMI for your account, you can search with an AMS SKMS CLI command or use the AMS console details page for relevant VPC: Use the AMS console: Available AMIs are listed on the AMI page in the AMS console. Select from AMIs with names that begin with "customer-".

Can I change EC2 instance name?

Save this answer. Show activity on this post. In 2021 this can be done from the AWS console, by going to EC2 > Instances, clicking the instance ID, then in the bottom panel clicking on the Tags tab, and clicking Manage tags. From there, you can simply change the value of the Name tag then click Save to apply.


1 Answers

It is not possible to change the name of an AMI image. Once the name is set, it cannot be changed.

You have 2 possible resolutions:

  1. Create the AMI image again, using a different name. However, in your case, the name may be automatically generated and this may not be an option.
  2. Copy the AMI within the same region, giving the copy a more desirable name.
like image 103
Matt Houser Avatar answered Nov 26 '22 17:11

Matt Houser