Launch PrestaShop Instantly on AWS with Pre-configured AMI
Easily set up PrestaShop, the open-source e-commerce platform, to create an online shop – e-commerce, using our ready-made Amazon Machine Image (AMI) on AWS EC2.
This AMI includes PrestaShop v8.2.1 pre-installed, letting you launch your PrestaShop website in minutes.
With SSL support and access via Domain, you can start creating your unique online store.
1. Initial Setup
Just follow the steps below to get your instance ready, set up your domain, and finish installing PrestaShop.
A. Go to AWS Marketplace and select the PrestaShop AMI.
B. Choose an instance type like t3.medium (2 vCPUs, 4GB RAM) for smooth performance.
C. In the Key Pair (login) section, select or create a PEM key and store it securely.
D. Enable Auto-assign Public IP or attach an Elastic IP for a static address.
E. Set up the Security Group with these rules:
- Port 22 (SSH) – Allow from your IP
- Port 80 (HTTP) – Allow from 0.0.0.0/0
- Port 443 (HTTPS) – Allow from 0.0.0.0/0 (optional for SSL)
F. Review all settings and launch the instance.
G. After launch, note the public IP from your EC2 dashboard.
You’re now ready to map your domain and complete the PrestaShop setup!
2. Point Your Domain to the PrestaShop EC2 Instance
A. Log in to your Domain Registrar (e.g., GoDaddy, Namecheap, Google Domains).
B. Create an A Record in DNS settings:
- Point your domain (e.g.,
yourdomain.com
) to your EC2 public or Elastic IP (e.g.,203.0.
X.X). - Tip: Use Elastic IP for a static address.
C. Disable Proxy (like Cloudflare) during SSL setup to avoid issues with Let’s Encrypt verification. You can re-enable it after SSL is active.
D. Verify DNS Propagation:
- Wait a few minutes to hours.
- dig A yourdomain.com
- Ensure the A record points to your instance’s public IP.
3. Set Up Free SSL for Your PrestaShop Site
A. SSH into Your Instance
Use your .pem
key to connect
1 |
ssh -i your-key.pem ubuntu@your-public-ip |
B. Run the SSL Setup Script
Execute the pre-installed script
NOTE: This script will create a MySQL database, user, and password, and assign the user full access to that database. These credentials will be used later for the PrestaShop installation.
1 |
sudo bash /root/setup_master.sh |
When you run the script, you’ll see two options:
1. MySQL Database Setup
2. Apache SSL Setup (Let’s Encrypt)
You can run either first, but it’s recommended to set up the database (DB name, user, and password) for PrestaShop first, then generate the SSL certificate for your domain using the same script.
C. Enter Required Info
- Enter the name of the new MySQL database: prestashop
- Enter the MySQL username to create: prestashop
- Enter the password for the new user: secret_password
D. Enter Required Info
- Domain name (e.g.,
yourdomain.com
) - Email for Let’s Encrypt alerts (e.g.,
admin@exam
ple.com).
E. The script will
- Verify domain DNS → instance IP
- Generate a Let’s Encrypt SSL certificate
- Configure Apache for HTTPS with auto-renewal
- Redirect all HTTP traffic to HTTPS
4. Complete the PrestaShop Web Installer
Access the PrestaShop Installer:
- In a web browser, navigate to https://
yourdomain.com
/. - The PrestaShop installer should load securely over HTTPS.
- Click Next on the first page of the installer.
Fill in the required fields (e.g., site name, admin email, password).
Configure the Database in Prestashop.
In Point 3, Subpoint C, use the database name, user, and password that you generated earlier by running the script.
- In the PrestaShop installer’s database configuration section, enter:
- Database Server: localhost
- Database Name: yourdbname
- Database Login: yourprestashopuser
- Database Password: yourprestashopuserpassword
- Your Prestashop is currently being installed.
5. Remove the Install Folder
1 |
sudo rm -rf /var/www/html/install |
After completing the PrestaShop installer, remove the install folder to secure the site.
Verify SSL Setup
Visit https://yourdomain.com
In a browser. You should see the PrestaShop installer over HTTPS.
Security Best Practices
- Restrict SSH Access: Update the security group to limit port 22 (SSH) to specific IP addresses after setup.
- Use an Elastic IP: Ensure a static IP for consistent DNS configuration.
- Monitor Logs: Check /var/log/apache2/ and /var/log/mysql/ for issues.
- Update Regularly: Run sudo apt update && sudo apt upgrade -y to keep the instance updated.
Troubleshooting
Installer Not Loading: Ensure ports 80 and 443 are open in the security group and Apache is running:
SSL Script Failure: Confirm the domain’s A record points to the instance’s IP without a proxy. Check /var/log/letsencrypt/letsencrypt.log for errors.
Contact Support: Refer to the PrestaShop documentation or contact the AMI provider for further assistance.