Creating EC2 instance with bootstrap script



1) Launch an EC2 instance
2) On advanced details > user data as text, write:
 #!/bin/bash
yum  install httpd -y
service httpd start
chkconfig httpd on
yum install wget -y
yum install php php-msql mysql -y\
3) Launch the instance
4) Goto actions> Instance settings > View Change User Data

Creating role for EC2 instance:

Goto IAM> Roles > Create role > (select ec2 service, ec2 use case)
On permissions > Give S3 full access > give-a-name






Comments

Popular Posts