Deploy Magento on AWS into a new VPC

View guide — HTML | PDF


To deploy Magento on AWS in less than an hour, follow the step-by-step instructions in the Quick Start deployment guide. For additional Quick Starts, see the complete catalog.

200x100_Magento_Logo

This Quick Start automatically deploys Magento Community Edition on the AWS Cloud.

Magento is an open-source content management system for e-commerce websites. This automated deployment builds a cluster that runs Magento along with optional sample data, which lets you experiment with custom themes and view the web store.

This Quick Start deploys Magento using AWS CloudFormation templates and offers two options: you can build a new AWS infrastructure for your Magento stack, or deploy Magento into your existing AWS infrastructure. The deployment uses MySQL on Amazon RDS for database operations, Amazon EFS for shared storage between EC2 instances, and an Amazon ElastiCache cluster with the Redis cache engine to improve application load times.

  • What you'll build

    • A virtual private cloud (VPC) configured with public and private subnets in multiple Availability Zones. 
    • A network address translation (NAT) gateway deployed into the public subnets and configured with an Elastic IP address for outbound Internet connectivity. The NAT gateway is used for Internet access for all EC2 instances launched within the private network. If you deploy the Quick Start in a region that doesn’t support NAT gateways, NAT instances are deployed instead.
    • A MySQL database engine deployed via Amazon RDS in the private subnets. If you choose Multi-AZ deployment for Amazon RDS, a synchronously replicated secondary database is also deployed. This provides high availability and built-in automated failover from the primary database.
    • An Amazon ElastiCache cluster with the Redis cache engine launched in the private subnets.
    • Amazon EC2 web server instances launched in the private subnets.
    • Elastic Load Balancing deployed to automatically distribute traffic across the multiple web server instances.
    • Amazon EFS created and automatically mounted on web server instances to store shared media files, if you choose to deploy Magento sample data.
    • Auto Scaling enabled to automatically increase capacity if there is a demand spike, and to reduce capacity during low traffic times. The default installation sets up low and high CPU-based thresholds for scaling the instance capacity up or down. You can modify these thresholds during launch and after deployment.
    • An AWS Identity and Access Management (IAM) instance role with fine-grained permissions for accessing AWS services necessary for the deployment process.
    • Appropriate security groups for each instance or function to restrict access to only necessary protocols and ports. For example, access to HTTP server ports on Amazon EC2 web servers is limited to Elastic Load Balancing. The security groups also restrict access to Amazon RDS MySQL DB instances by web server instances.

    If you’re deploying Magento into an existing VPC, you'll need to make sure that your VPC has two private and two public subnets in different Availability Zones with NAT gateways in their route tables, to allow the instances to download packages and software without exposing them to the Internet.

    The Quick Start deploys Magento Community Edition version 2.1 with the following software:

    • Operating system: Amazon Linux x86-64
    • Web server: NGINX
    • Database: MySQL 5.6 through Amazon RDS
    • Programming language: PHP 7, including the required extensions
    • Optional sample data for experimenting with custom themes and vewing the web store.


    For details, see the Quick Start deployment guide.

  • Deployment details

    Deploy your Magento environment on AWS in 25-45 minutes, depending on whether you choose to download sample data:

    1. Prepare your AWS account.
    2. Download the Magento software.
    3. Launch the Quick Start. You can choose from two options:
      - Deploy into a new VPC (view template)
      - Deploy into an existing VPC (view template)
    4. Test your deployment.


    To customize your deployment, you can configure MySQL database storage settings, set the minimum and maximum number of web servers, and specify CIDR block sizes and instance types.   

    For complete details, see the Quick Start deployment guide.

  • Cost and licenses

    You are responsible for the cost of the AWS services used while running this Quick Start reference deployment. There is no additional cost for using the Quick Start. The cost will vary depending on the storage and compute configuration of the cluster you deploy. Prices are subject to change. See the pricing pages for each AWS service you will be using in this Quick Start for full details.

    This Quick Start uses the Magento Community Edition, which is open-source software distributed under the Open Software License (OSL 3.0).