Answer the question
In order to leave comments, you need to log in
AWS: How to pass large files (like configs) to USERDATA when creating LaunchConfiguration?
In Amazon AWS, I create a Launch Configuration for an Ubuntu Server 16.04 LTS (HVM) instance, SSD Volume Type - ami-da05a4a0
I then want to use these instances for Auto Scaling Groups
When the instance starts, you need to install nginx, php, nodejs, etc., also you need to install SSL certificates and create custom configs.
To do this, I use the following method in the file that I pass to USERDATA (this is a bash script):
cat << 'EOF' > /etc/nginx/nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
.... тут весь конфиг ....
EOF
Answer the question
In order to leave comments, you need to log in
you will need to recreate the AMI image. Though it probably won't happen often.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question