By using AWS re:Post, you agree to the Terms of Use

AWS AMI ami-0c7328b3dbb11f540 (Windows_Server-2012-R2_RTM-English-64Bit-Base-2022.07.13) seems corrupt. It can't run basic powershell commands upon autoscaling launch due to missing files?


AWS released the latest Windows Server 2012 R2 AMIs on 7/13/2022. Upon testing this morning, I found that ami-0c7328b3dbb11f540 is corrupt and will not properly run powershell commands upon launch due to missing files in the filesystem. Reverting to the June image (ami-09e13647920b2ba1d) allowed our autoscaling EC2 instances to launch properly.

For specifics, below is the error that triggered an autoscaling build failure.

2022-07-15 13:43:32,501 [ERROR] -----------------------BUILD FAILED!------------------------
2022-07-15 13:43:32,501 [ERROR] Unhandled exception during build: [Errno 2] No such file or directory: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\tmp2_4a69w_/subp-stderr-8e0905c1-1293-4379-bbb8-bf88a2978290.txt'

Traceback (most recent call last):
  File "cfn-init", line 176, in <module>
  File "cfnbootstrap\construction.pyc", line 137, in build
  File "cfnbootstrap\construction.pyc", line 564, in build
  File "cfnbootstrap\construction.pyc", line 578, in run_config
  File "cfnbootstrap\construction.pyc", line 146, in run_commands
  File "cfnbootstrap\command_tool.pyc", line 92, in apply
  File "cfnbootstrap\util.pyc", line 587, in call
  File "cfnbootstrap\util.pyc", line 562, in call
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\tmp2_4a69w_/subp-stderr-8e0905c1-1293-4379-bbb8-bf88a2978290.txt'
3 Answers
Accepted Answer

Hi, I've received an update frow AWS support.

The above looks to be a cloudformation + python error. With this error I was able to locate an issue regarding the Cloudformation Helper Script in the userdata utilizing the latest version from the public url (, to cause issues when performing a windows restart during cfn bootstrapping [1].

The workaround at this stage is to down grade 2.0-10 ( Or as you have done already by rolling back to the June AMI. The internal team is aware of this issue and working on a fix.

I will monitor this issue and inform you as soon as there is a fix for this. If you need further assistance regarding the CFN Bootstrap, I would encourage you to reach out to the Cloudformation Team, along with the below log files [2]: -The EC2 configuration log at C:\Program Files\Amazon\Ec2ConfigService\Logs\Ec2ConfigLog.txt -The cfn-init log at C:\cfn\log\cfn-init.log

answered a month ago
  • Thanks for the follow-up. We don't specify a version of this helper script in the user data, so we have to wait on them to fix it. It's at least good to know they've located the issue and have plans to fix it.


I've got the exact same problem with Windows Server 2019 July AMI. Do you have a solution ? For now, I will recreate my golden ami from june ami provide by aws....

answered a month ago
  • We reverted to AWS's June 2022 image for now in hopes they would fix it. I contacted AWS Support and they wouldn't do anything since we don't pay for support. They suggested I post here, but unless AWS sees this question and resolves the issue, I'm skeptical it'll get fixed.


I'll open a case on my side since we have AWS support.....I'll add info in this post....

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions