LAMP and phpMyAdmin AMI
AWS Marketplace AMI User Guide
This AMI is a LAMP Web Server with phpMyAdmin installed.
AMI Overview
This AMI supports following versions.
LAMP Base Version
– PHP 7.2
– Apache 2.4
– Amazon Linux 2 AMI (HVM)
– MariaDB 10.2
– phpMyAdmin 4.9.0.1
LAMP PHP 7.3 Version
– PHP 7.3
– Apache 2.4
– Amazon Linux 2 AMI (HVM)
– MariaDB 10.3
– phpMyAdmin 5.0.2
LAMP PHP 7.4 Version
– PHP 7.4
– Apache 2.4
– Amazon Linux 2 AMI (HVM)
– MariaDB 10.4
– phpMyAdmin 5.0.2
Web Server
We prepared SSL/TLS so you can access to top page using http:// or https://.
When we access phpMyAdmin page, you will receive certificate error like this image below. It is due to the fact that the setting for SSL/TLS on Web server is self-signed dummy certificate.

For simplicity, click on the Advanced button, and click Proceed to {ip-address} (unsafe) to access phpMyAdmin
If you want to set up a CA signed certificate, please refer to the following document for ‘Step 2: Obtain a CA-signed Certificate’
DB Server
You can find DB Server password from EC2 management console System Log.
– Go to Amazon EC2 console at https://console.aws.amazon.com/ec2/.
– Chose your Instance and Click Actions → Monitor and troubleshoot → Get System log

Get System Log
You can also SSH into your instance and find the login credential using the following command.
$ cat /home/ec2-user/credentials
/////////////////////////credentials info ///////////////////////// — — MariaDB
— — — User : root
— — — Password : ****************
////////////////////////////////////////////////////////////////
If you find ‘setting error’ message, please try to set the root password according to following documentation below.
Tutorial: Install a LAMP Web Server on Amazon Linux 2 | 2. Run mysql_secure_installation.
If MySQL database is not already installed, use this command to install.
$ sudo mysql_secure_installation
phpMyAdmin
You can access ‘phpMyAdmin’ only with ‘https’ to protect your database password and data. If you access via ‘http’, you will be redirected to https.phpMyAdmin’s path
https://{your-ec2-ip-address}/phpMyAdmin

For phpMyAdmin please refer to phpMyAdmin User Guide
Amazon Linux Security Center updates
Once the instance is installed please apply security patches as per Amazon Linux Security Center updates and available at:
• Here for Linux versions. Updates can be done by running sudo yam update
command.
• Here for kernel. Updates can be done by running sudo yum update kernel
command.
Reference
1. Tutorial: Install a LAMP Web Server on Amazon Linux 2
2. Tutorial: Configure SSL/TLS on Amazon Linux 2
3. phpMyAdmin User Guide