This document provides a step-by-step guide for deploying PrestaShop on AWS using Amazon Linux 2023, Docker, and Amazon RDS. The deployment was done using the AWS Free Tier.
- An AWS account with root user access.
- AWS Free Tier eligibility to avoid unnecessary charges.
- Basic knowledge of AWS services (EC2, RDS, Docker).
- Logged into the AWS Management Console as the root user.
- Verified that all resources created were within the AWS Free Tier limits.
- Navigated to the EC2 Console and clicked Launch Instance.
- Selected the Amazon Linux 2023 AMI.
- Chose the t2.micro instance type (free tier eligible).
- Configured instance details, enabling Auto-assign Public IP.
- Added the default 8GB SSD storage.
- Created a new security group with the following rules:
- SSH (Port 22): Allow access from my IP address.
- HTTP (Port 80): Allow access from anywhere (
0.0.0.0/0). - HTTPS (Port 443): Allow access from anywhere (
0.0.0.0/0).
- Launched the instance and downloaded the key pair (
prestashop-key.pem).
- Connected to the instance via SSH:
ssh -i /path/to/prestashop-key.pem ec2-user@<public-ip-of-instance>
- Step 4: Update the System
sudo yum update -ysudo yum install docker -y
sudo systemctl start docker
sudo systemctl enable docker- Create and Configure the Dockerfile
Create a Dockerfile with the following content:
FROM amazonlinux:2023
RUN yum install -y php php-mysqlnd php-gd php-curl php-zip php-mbstring
RUN yum install -y httpd
RUN yum clean all
COPY . /var/www/html
EXPOSE 80
CMD ["httpd", "-D", "FOREGROUND"]Build the Docker image:
sudo docker build -t prestashop-app .Run the Docker container:
sudo docker run -d -p 80:80 --name prestashop-container prestashop-app- Navigate to the AWS RDS Console and click Create Database.
- Select MySQL as the database engine.
- Configure the database settings:
- DB Instance Identifier:
prestashop-db - Master Username:
admin - Master Password:
securepassword - DB Instance Class:
db.t2.micro(free tier eligible) - Storage:
20GBGeneral Purpose SSD
- DB Instance Identifier:
- Configure connectivity:
- Connect the RDS instance to the same VPC as the EC2 instance.
- Make the RDS instance publicly accessible.
- Create a security group allowing inbound traffic on port
3306from the EC2 instance’s security group.
- Create the database.
- Access the PrestaShop installer via
http://<public-ip-of-instance>. - Follow the installation wizard:
- Select language and agree to terms.
- Enter the RDS database details:
- Database server:
<RDS-endpoint> - Database name:
prestashop - Database user:
admin - Database password:
securepassword
- Database server:
- Configure store details (admin email, password, etc.).
- Complete the installation and delete the install folder for security:
sudo docker exec -it prestashop-container rm -rf /var/www/html/install- Link to live installed Prestashop on my instance: [http://13.48.25.108/]
- Enable CloudWatch Logs to monitor the EC2 instance and RDS database.
- Set up AWS Backup for regular RDS database backups.
- Instance Type: Used
t2.microto stay within the Free Tier. - Security Group: Opened only necessary ports (
22,80,443) for security. - Database: Used Amazon RDS (MySQL) for managed database services.
- Docker: Containerized the application for easier deployment and scalability.
- EC2 Instance Dashboard – Showing the running instance.
- RDS Database Configuration – Highlighting the database endpoint and security group.
- Dockerfile Content – Showing the configuration for the PrestaShop application.
- PrestaShop Installation Wizard – Showing the RDS database configuration step.
This deployment successfully set up PrestaShop on AWS using Docker and RDS. The use of Free Tier resources ensured cost-effectiveness, while Docker simplified the deployment process.
For any questions or further assistance, feel free to reach out!




