diff --git a/samcli/local/docker/lambda_image.py b/samcli/local/docker/lambda_image.py index 0ffb70434b..a8272b3c2c 100644 --- a/samcli/local/docker/lambda_image.py +++ b/samcli/local/docker/lambda_image.py @@ -169,6 +169,11 @@ def build(self, runtime, packagetype, image, layers, architecture, stream=None, tag_prefix = f"{runtime_only_number}-" base_image = f"{self._INVOKE_REPO_PREFIX}/{runtime_image_tag}" + # Temporarily add a version tag to the emulation image so that we don't pull a broken image + if platform.system().lower() == "windows" and runtime in [Runtime.go1x.value, Runtime.java8.value]: + LOG.info("Falling back to a previous version of the emulation image") + base_image = f"{base_image}.2023.08.02.10" + if not base_image: raise InvalidIntermediateImageError(f"Invalid PackageType, PackageType needs to be one of [{ZIP}, {IMAGE}]")