title: How to obtain pseudo-parameters user data with AWS CDK?
body: <p>I would like to convert this working CloudFormation Code into a proper Python AWS CDK version. The EC2 shall be launched within a VPC. The user data are used to install apps. After completion, I need a call back to Cloudformation.</p>
  
  <pre><code>UserData:
          Fn::Base64: !Sub |
            &lt;script&gt;
            cfn-signal.exe --exit-code 0 --stack ${AWS::StackId} --resource EC2Instance --region ${AWS::Region}
            &lt;/script&gt;
  </code></pre>
  
  <p>I tried to use the direct way with <code>aws_cdk.core.Fn.base64</code> which is not working with regard to pseudo-parameters declaration within the EC2 the user data.</p>
  
  <p>This is my current state:</p>
  
  <pre><code>EC2InstanceUserData = aws_ec2.UserData.for_windows()
  EC2InstanceUserData.add_commands(
     "cfn-signal.exe --exit-code 0 ",
     "--stack ",
     VpcStack.stack_id(XXX, e.g. self?), # not working
     " --resource ",
     VpcStack.get_logical_id(XXX, e.g. self?), # not working
     " --region ",
     VpcStack.region(XXX, e.g. self?) # not working
  )
  </code></pre>