I have a customer requirement where they want to have automated start of Windows instance and have 2 Web pages open by default - automatically.
I know how to create AWS instance using AWS CLI but where to specify to e.g. install Chrome and open 2 web pages (so that they are open and ready once user login to this Win instance).
You can specify commands to run on the first launch of an EC2 instance in the user data field.
If you'd like to specify an EC2 instance's user data script via the AWS CLI, use the --user-data
parameter like so:
aws ec2 run-instances --image-id ami-abcd1234 --count 1 --instance-type m3.medium \
--key-name my-key-pair --subnet-id subnet-abcd1234 --security-group-ids sg-abcd1234 \
--user-data <user data here>