Created
August 2, 2016 15:12
-
-
Save todd-dsm/cf650e68a70d6d48856ba792ff991d22 to your computer and use it in GitHub Desktop.
build crashes on name collision with another (public) AMI also called 'template'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ packer build ami-rhel-7.2-x86_64.json | |
amazon-ebs output will be in this color. | |
==> amazon-ebs: Force Deregister flag found, skipping prevalidating AMI Name | |
==> amazon-ebs: Inspecting the source AMI... | |
==> amazon-ebs: Creating temporary keypair: packer 57a0b035-02ff-447f-d366-41b5b93c3369 | |
==> amazon-ebs: Launching a source AWS instance... | |
amazon-ebs: Instance ID: i-080cd371343b6baea | |
==> amazon-ebs: Waiting for instance (i-080cd371343b6baea) to become ready... | |
==> amazon-ebs: Waiting for SSH to become available... | |
==> amazon-ebs: Connected to SSH! | |
==> amazon-ebs: Stopping the source instance... | |
==> amazon-ebs: Waiting for the instance to stop... | |
==> amazon-ebs: Error deregistering existing AMI: AuthFailure: Not authorized for image:ami-2cdbca4d | |
==> amazon-ebs: status code: 400, request id: | |
==> amazon-ebs: Terminating the source AWS instance... | |
==> amazon-ebs: No AMIs to cleanup | |
==> amazon-ebs: Deleting temporary keypair... | |
Build 'amazon-ebs' errored: Error deregistering existing AMI: AuthFailure: Not authorized for image:ami-2cdbca4d | |
status code: 400, request id: | |
==> Some builds didn't complete successfully and had errors: | |
--> amazon-ebs: Error deregistering existing AMI: AuthFailure: Not authorized for image:ami-2cdbca4d | |
status code: 400, request id: | |
==> Builds finished but no artifacts were created. | |
---------------------------------------------------------------------------------- | |
$ aws ec2 describe-images --image-id ami-2cdbca4d | |
{ | |
"Images": [ | |
{ | |
"VirtualizationType": "paravirtual", | |
"Name": "template", | |
"Hypervisor": "xen", | |
"ImageId": "ami-2cdbca4d", | |
"RootDeviceType": "ebs", | |
"State": "available", | |
"BlockDeviceMappings": [ | |
{ | |
"DeviceName": "/dev/sda1", | |
"Ebs": { | |
"DeleteOnTermination": false, | |
"SnapshotId": "snap-5140680c", | |
"VolumeSize": 8, | |
"VolumeType": "gp2", | |
"Encrypted": false | |
} | |
} | |
], | |
"Architecture": "x86_64", | |
"ImageLocation": "004177223155/template", | |
"KernelId": "aki-fc8f11cc", | |
"OwnerId": "004177223155", | |
"RootDeviceName": "/dev/sda1", | |
"CreationDate": "2015-11-15T16:05:09.000Z", | |
"Public": true, | |
"ImageType": "machine", | |
"Description": "" | |
} | |
] | |
} | |
---------------------------------------------------------------------------------- | |
$ aws iam get-user | |
{ | |
"User": { | |
"UserName": "myUserName", | |
"Path": "/", | |
"CreateDate": "2016-07-18T19:08:27Z", | |
"UserId": "IUDV26BNNVVVS1VRPZY1XX", | |
"Arn": "arn:aws:iam::323341003169:user/myUserName" | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment