User-data script doens't launch with EC2 Insta

2019-06-03 20:07发布

问题:

Background:

  • Services used: ec2, autoscaling, s3, sqs, cloudwatch
  • AMI and Environement: Windows 64-bit
  • Network: IAM and security group attached
  • Job: Run a script which starts a program (.exe) which is loaded from S3

I have an auto scale option that launches a N number of Instances. The user data script is based on aws CLI and few commands in powershell. I was expecting the instances to execute my script upon their initialization. Note that some of the tasks before the Job is to first download the aws CLI using powershell, because the rest of the script is based on aws commands

What am I missing ? I thought the launch should start the script in user-data.

Note that this script was tested on an instance with the same configurations (VPC, Security Group, etc..)