Hands-On: Moving Configuration Parameters to the SSM Parameter Store
Understand how to relocate WordPress application configuration values from EC2 user data to AWS SSM Parameter Store, including handling sensitive database credentials as SecureString. This lesson guides you through using AWS CLI commands to create, read, and overwrite parameters, ensuring your scalable application configurations are stored securely and managed efficiently.
We'll cover the following...
We'll cover the following...
Let’s move the configuration parameters from the EC2 user data into the SSM parameter store.
We learned the commands to do so already in the last lesson:
ssm put-parameterto create a new parameterssm get-parameterto read a SSM parameter
Now it’s your turn!
Extracting database credentials
The script below extracts the EC2 user data from the latest version of our launch template and stores the following configuration values in variables:
DB_HOST: The hostname of our RDS databaseDB_PASSWORD: The password for our RDS databaseDB_NAME: The database name within RDS databaseDB_USER: The username to