...
/Hands-On: Updating the Launch Template
Hands-On: Updating the Launch Template
Learn to update the launch template to use the SSM parameter store.
We'll cover the following...
When all the parameters are stored in the SSM parameter store, we can update the EC2 user data script of our launch template to read the values directly from the SSM parameter store.
There are two parts of the EC2 user data script that we need to replace:
- Database parameters
Press + to interact
cat > /opt/bitnami/.env <<EOLDB_HOST=wordpress-db.c42jq3qqvmir.us-east-2.rds.amazonaws.com:3306DB_PASSWORD=ad65a86fa04f7f1f100b22e93da2dcba6c8a0f9cf6a6d81f99e201f102ad6156DB_NAME=bitnami_wordpressDB_USER=bn_wordpressEOL
- Mounting of the EFS file system
Press + to interact
# 4. Add the EFS volume to the mount targetsecho "fs-044c22ac078984d92.efs.us-east-2.amazonaws.com:/ /efs efs nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2,noresvport 0 0" >> /etc/fstab
Now that all our configuration is stored in the ...