Packer version: 1.3.2
When trying to bake AMIs using EBS builder, Packer hangs infinitely when the STS token used inside the packer configuration expires. This happens when an AMI takes too long (1 to 1.5 hours) to become "available". Ideally it should error out when the STS token expires but instead hangs infinitely at "Waiting for AMI to become ready...". We had to figure this out manually and increase the STS token expiry time
==> amazon-ebs: Stopping the source instance...
amazon-ebs: Stopping instance, attempt 1
==> amazon-ebs: Waiting for the instance to stop...
==> amazon-ebs: Creating unencrypted AMI CbqbpEh from instance i-0e0d0a316326a1a78
amazon-ebs: AMI: ami-0616a1967f986df5a
==> amazon-ebs: Waiting for AMI to become ready...
Ah, this looks like it is related to #6919 which should be fixed by https://github.com/aws/aws-sdk-go/pull/2298
I'm going to leave this open but remove the milestone; that said, it'll be a lot better in 1.3.3 than it is now. The retry won't wait as long and we're not going to require the region in validation.
I'm also seeing this with Packer 1.3.3. The timings are different, but the symptom is the same.
I believe this issue is now documented here: https://packer.io/docs/builders/amazon.html#resourcenotready-error
Is the "RequestExpired: Request has expired" an accurate error for what you all see once this eventually times out ?
I'm going to close since I'm fairly certain the documented behavior is what you all were seeing; if that isn't the case, please open a new issue with steps to reproduce, and what happens when packer "hangs" -- including whether it ever eventually times out.
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
I'm also seeing this with Packer 1.3.3. The timings are different, but the symptom is the same.