hashicorp / packer-plugin-amazon

Packer plugin for Amazon AMI Builder
https://www.packer.io/docs/builders/amazon
Mozilla Public License 2.0
76 stars 112 forks source link

Previously working setup fail due to introduction of ec2-instance-connect:SendSSHPublicKey call #369

Closed danielkza closed 1 year ago

danielkza commented 1 year ago

Overview of the Issue

Previously working setup faisl due to introduction of ec2-instance-connect:SendSSHPublicKey call.

The public key installation was previously managed with user data startup commands. I don't need to use ec2-instance-connect for it, and yet my builds fail due to missing IAM permissions.

Reproduction Steps

Try to build any image with an IAM user or role without access to SendSSHPublicKey using SSH communicator and SSM interface.

Plugin and Packer version

Packer 1.8.6 Plugin 1.2.3

Simplified Packer Buildfile

Anything with communicator = "ssh" and ssh_interface = "session_manager"

Operating system and Environment details

Irreleveant


Why don't I just update IAM to add that permission? I will, but in the meanwhile my builds are broken with the latest versions of the plugin, which is a shitty experience.