diff --git a/builder/amazon/common/state.go b/builder/amazon/common/state.go index 1bfce11d8..7ac866ecd 100644 --- a/builder/amazon/common/state.go +++ b/builder/amazon/common/state.go @@ -217,6 +217,12 @@ func WaitForImageToBeImported(c *ec2.EC2, ctx aws.Context, input *ec2.DescribeIm Argument: "ImportImageTasks[].Status", Expected: "completed", }, + { + State: request.FailureWaiterState, + Matcher: request.PathAnyWaiterMatch, + Argument: "ImportImageTasks[].Status", + Expected: "deleted", + }, }, Logger: c.Config.Logger, NewRequest: func(opts []request.Option) (*request.Request, error) {