Hi @johnowens looking at the documentation for Amazon Linux 2022 it appears to based off of Fedora 35 which by default requires key pair types of ED25519
. As of the current release of Packer and the Amazon Packer Plugin the only supported type for the Amazon builder is RSA
.
However, we just merged in a new change to support ED25519
key types which should resolve this issue. To verify that this is indeed the issue I tested against the following template and confirmed that using a dev build of the latest plugin code fixes the issue.
I’ll follow up with the team on making an Amazon plugin release.
source "amazon-ebs" "basic-example" {
region = "us-west-2"
source_ami = "ami-044065b5480679567"
instance_type = "t2.small"
ssh_username = "ec2-user"
ssh_agent_auth = false
temporary_key_pair_type = "ed25519"
ami_name = "packer_AWS {{timestamp}}"
}
build {
sources = [
"source.amazon-ebs.basic-example"
]
provisioner "shell"{
inline = ["echo Hello from Amazon Linux 2022"]
}
}