title: Passing userdata file to lamda to create ec2
body: <p>I have a lamda function that creates ec2. Once ec2 is created userdata script for deploying files on ec2 from s3 should be run. Is there any way to place userdata script in s3 or somewhere and pull from there?</p>
  
  <p>I know userdata can be passed inline as in here, but I have many lines of scripts so dont want to paste the entire script inline - <a href="https://stackoverflow.com/questions/46490843/how-to-pass-script-to-userdata-field-in-ec2-creation-on-aws-lambda">How to pass script to UserData field in EC2 creation on AWS Lambda?</a></p>