https://pulumi.com logo
#aws
Title
# aws
w

wooden-truck-40033

03/10/2021, 12:07 PM
Hi folks . I need to create a userdata script for eks windows nodes. The documentation says the script needs to be
<powershell>
              
[string]$EKSBinDir = "$env:ProgramFiles\Amazon\EKS"
              
[string]$EKSBootstrapScriptName = 'Start-EKSBootstrap.ps1'
              
[string]$EKSBootstrapScriptFile = "$EKSBinDir\$EKSBootstrapScriptName"
              
[string]$cfn_signal = "$env:ProgramFiles\Amazon\cfn-bootstrap\cfn-signal.exe"
              
& $EKSBootstrapScriptFile -EKSClusterName ${ClusterName} ${BootstrapArguments} 3>&1 4>&1 5>&1 6>&1
              
$LastError = if ($?) { 0 } else { $Error[0].Exception.HResult }
              `& $cfn_signal --exit-code=$LastError ``                 `--stack="${AWS::StackName}" ``                 `--resource="NodeGroup" ``                 
--region=${AWS::Region}
              
</powershell>