Created
June 14, 2020 15:54
-
-
Save luanvuhlu/d0f6b8b1818650c6e9a3a9340e35d043 to your computer and use it in GitHub Desktop.
Tự động run khi launch một EC2 instance mới https://aws.amazon.com/premiumsupport/knowledge-center/execute-user-data-ec2/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Content-Type: multipart/mixed; boundary="//" | |
MIME-Version: 1.0 | |
--// | |
Content-Type: text/cloud-config; charset="us-ascii" | |
MIME-Version: 1.0 | |
Content-Transfer-Encoding: 7bit | |
Content-Disposition: attachment; filename="cloud-config.txt" | |
#cloud-config | |
cloud_final_modules: | |
- [scripts-user, always] | |
--// | |
Content-Type: text/x-shellscript; charset="us-ascii" | |
MIME-Version: 1.0 | |
Content-Transfer-Encoding: 7bit | |
Content-Disposition: attachment; filename="userdata.txt" | |
#!/bin/bash | |
service httpd start | |
hostname -I > /var/www/html/index.html | |
--// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment