hashicorp / hashicorp/packer-plugin-amazon
Unstable builds with temporary IAM Profile
- Dominant language
- Go
- Stars
- 91
- Forks
- 141
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 3
Description
_This issue was originally opened by @siddhantvirmani as hashicorp/packer#9344. It was migrated here as a result of the [Packer plugin split](https://github.com/hashicorp/packer/issues/8610#issuecomment-770034737). The original body of the issue is below._
#### Overview of the Issue
I'm having this very weird bug where every few builds there is an issue with the IAM profile not being attached to the temporal EC2 instance (which results in `yum` complaining).
#### Reproduction Steps
I run `PACKER_LOG=1 packer build packer/build.json`. _Usually_, immediately rerunning the build works. However, if I wait too long before rebuilding I get the same problem. I haven't been able to find a guaranteed pattern whatsoever.
### Packer version
1.5.5
### Simplified Packer Buildfile
https://gist.github.com/siddhantvirmani/61946abc1e8f9321562186feb60d4b29#file-build-json
### Operating system and Environment details
I run packer on WSL2. Env has aws secrets.
### Log Fragments and crash.log files
Successful log: https://gist.github.com/siddhantvirmani/61946abc1e8f9321562186feb60d4b29#file-successful-packer-log
I cancelled after the successful `aws configure list`. Can confirm that if it finds the credentials, the build succeeds without any issues. I can run a full build and upload that log too if needed.
Unsuccessful log: https://gist.github.com/siddhantvirmani/61946abc1e8f9321562186feb60d4b29#file-unsuccessful-packer-log
Cancelled this one after yum shows the update list - it just hangs there after that.
Contributor guide
Assessment
This issue has not been assessed yet.