title: AWS cloudformation pass parameters to EC2 environment
body: <p>I have an EC2 instance template I'm creating that will be running a specific application. I want to be able to pass parameters through to this application's startup script I have being executed in my templates UserData.</p>
  
  <p>Ideally there would be a way for me to convert the specified parameters into either:
  A) Environment variables on the ec2 instance that I would access in the startup script
  B) Usable variables inside of my UserData script.</p>
  
  <p>Here's a simplified template of what I would like to accomplish... Haven't found any aws docs saying it can be done:</p>
  
  <pre><code>Resources:
    GitlabRunner:
      Type: "AWS::EC2::Instance"
      Description: "AWS stack for a serivce"
      Properties:
        UserData:
          Fn::Base64: "#!/bin/bash\nmy-service $TAGS"
  
  Parameters:
    Tags:
      Type: String
      Default: asd
      Description: Comma delimited list of tags
  </code></pre>