-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create AMI because packer keeps exiting with KMS incorrect state #12683
Comments
Thanks for reaching out. In order for us to best help, could you provide the things requested in the issue template; including the simplest Packer configuration and scripts needed to reproduce the bug. That said, this looks like an error coming directly from AWS that Packer may be outputting. Have you tried to retrieve the key using the aws kms command with the same IAM or login being used by Packer? |
Currently dealing with this as well..
vars.pkr.hcl
source.pkr.hcl
|
I fixed by adding full KMS access to the IAM role assigned to the instance that packer spins up. Initially tried Read, Write only but failed with the same error, Only full access to KMS fixed it. |
I have the same issue, also I just had the chance to grant more permissions to the ec2 |
+1 |
These were my permissions, I tried to granulize my permissions. I didnt want to give |
@dchittibala I was facing this issue as well. I believe you only need the following permissions in the KMS key' policy:
The policy can then target the role that is running Packer. In our case, we have a other EC2 machines executing Packer to create the AMIs. |
Hi Folks,
I need help understanding why packer fails while retrieving KMS key state. The provided key actually is enabled but fails with this error when we are build:
Instance state change details: Client.InternalError: Client.InvalidKMSKey.InvalidState: The KMS key provided is in an incorrect state�[0m
The text was updated successfully, but these errors were encountered: