hashicorp / packer-plugin-amazon

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

iam_instance_profile doesn't seem to work anymore #234

Closed andersonb-sysadmin closed 2 years ago

andersonb-sysadmin commented 2 years ago

Packer v1.8.1 Amazon plugin v1.0.9

Hi,

Using the old packer version 1.3.4 and .json templates everything works without any issue. Since we started to use Packer Version 1.8.1 and Amazon plugin 1.0.9 if we use the option iam_instance_profile it leads to the following error:

Couldn't find specified instance profile: RequestError: send request failed
caused by: Post "https://iam.amazonaws.com/": Proxy Authentication Required

That happens for .json and .pkr.hcl templates.

Running : aws iam get-instance-profile --instance-profile-name NAME I can see the name correctly and it's been working on the old client for a while.

Removing the option iam_instance_profile makes everything works without issues.

nywilken commented 2 years ago

Hi @Mando-gh thanks for reaching out. There have been a number of changes to the handling of instance profiles between 1.3.4 and 1.8.1. so it is possible that a regression exist or that their is a change that needs to be made to the template.

In order for us to best assist could you provide us with the full debug logs PACKER_LOG=1 packer build source.json for the build using Packer 1.8.1 along with a minimal template to reproduce the issue.

nywilken commented 2 years ago

Hi @Mando-gh just wanted to follow up here. I'm going to close this issue since there's been no activity on it in 2 months. If you are still running in to issues can you please provide the requested information so that we may get a better understanding on what is happening. Cheers!