{"id":8075,"date":"2020-08-11T13:34:50","date_gmt":"2020-08-11T13:34:50","guid":{"rendered":"https:\/\/cloudkul.com\/blog\/?p=8075"},"modified":"2021-03-10T12:41:54","modified_gmt":"2021-03-10T12:41:54","slug":"installing-magento-2-on-aws-with-terraform-and-ansible","status":"publish","type":"post","link":"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/","title":{"rendered":"Installing Magento 2 on AWS with Terraform and Ansible"},"content":{"rendered":"\n<p>In this blog we will see <strong>Installing magento 2 on AWS with Terraform<\/strong> <strong>and Ansible<\/strong>, at the end of this blog you will be able to deploy magento 2 on AWS using terraform.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"697\" height=\"161\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/08\/amt.png\" alt=\"\" class=\"wp-image-8076\" \/><\/figure><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Prerequisites<\/h4>\n\n\n\n<ul><li>Ubuntu 18.04<\/li><li>Account on AWS<\/li><li>Account on Magento<\/li><li>Install terraform and ansible in server<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">In this Blog we will see<\/h2>\n\n\n\n<ul><li>What AWS resources are build<\/li><li>How we create Access Key and Secret Key in AWS<\/li><li>How we create Key Pair in AWS<\/li><li>Create Public Key and Private Key in Magento<\/li><li>What&#8217;s inside the tf files<\/li><li>Ansible Script<\/li><li>Build AWS resources by terraform script<\/li><li>Initialize the folder<\/li><li>Plan for the magento 2 setup<\/li><li>Apply for the magento 2 setup<\/li><li>Test magento 2 site<\/li><li>Conclusion<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">What AWS resources are build<\/h3>\n\n\n\n<p>By the help of this terraform files the AWS resources which are build.<\/p>\n\n\n\n<ul><li><strong>EC2 Instance with<\/strong><ul><li>t2.micro instance type<\/li><li>Attached elastic IP<\/li><\/ul><\/li><li><strong>EBS Volume with<\/strong><ul><li>30 GB Storage<\/li><li>Volume type is General Purpose 2.<\/li><\/ul><\/li><li><strong>RDS DB Instance with<\/strong><ul><li>20 GB storage<\/li><li>Mysql version 5.7.23<\/li><li>db.t2.micro instance class<\/li><li>Parameter Group attached with DB<\/li><li>Enabled backup and maintenance mode<\/li><\/ul><\/li><li><strong>Security Group with<\/strong><ul><li>EC2 instance security group with inbound ports 22, 80, 443.<\/li><li>RDS DB instance security group with inbound ports 3306.<\/li><\/ul><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">How we create Access Key and Secret Key in AWS<\/h3>\n\n\n\n<p>To create access key and secret key follow the procedure:<\/p>\n\n\n\n<ul><li>Login to your AWS account.<\/li><li>In the service section choose for <strong>&#8220;IAM&#8221;<\/strong> service,<\/li><li>In &#8220;IAM&#8221; service in the left side slider you will find &#8220;Users&#8221;.<\/li><li>Click on &#8220;Users&#8221; it will get you on users page.<\/li><li>At the top left of users page you will find &#8220;Add user&#8221;.<\/li><li>Click on &#8220;Add user&#8221; then enter the &#8220;username&#8221; and select the access type as <strong>&#8220;Programmatic access&#8221;<\/strong>.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"725\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/08\/user-1-1024x725.png\" alt=\"\" class=\"wp-image-8119\" \/><\/figure>\n\n\n\n<ul><li>When we choose &#8220;Programmatic access&#8221; at the end of this process you get Access key and Secret Key.<\/li><li>Now press &#8220;next&#8221; to add permissions for the user.<\/li><li>Then in this part choose &#8220;Attach existing policies directly&#8221; by searching and selecting for <strong>&#8220;AmazonEC2FullAccess&#8221;<\/strong> and <strong>&#8220;AmazonRDSFullAccess&#8221;<\/strong>.  After this press &#8220;next&#8221;.<\/li><li>Want to use tags for user then add key and value and then press &#8220;next&#8217;.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"721\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/08\/review-1-1024x721.png\" alt=\"\" class=\"wp-image-8122\" \/><\/figure>\n\n\n\n<ul><li>Now in this part you can review all your configuration. And then click on &#8220;Create User&#8221;.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"421\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/08\/keypairs-2-1024x421.png\" alt=\"\" class=\"wp-image-8124\" \/><\/figure>\n\n\n\n<ul><li>After creating user successfully you will find button to &#8220;Download .csv&#8221; which contains Access key and Secret key.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">How we create Key Pair in AWS<\/h3>\n\n\n\n<p>If you don&#8217;t have any <strong>&#8220;Key Pair&#8221;<\/strong> or wants to create new one then follow this steps.<\/p>\n\n\n\n<ul><li>Open AWS account.<\/li><li>In &#8220;Compute&#8221; services go for &#8220;EC2&#8221; service.<\/li><li>Then at left side slider of EC2 service you will find &#8220;Network and Security&#8221;.<\/li><li>In &#8220;Network and Security&#8221; click on &#8220;Key Pair&#8221;.<\/li><li>In &#8220;Key Pair&#8221; at the top right corner you will find &#8220;Create Key Pair&#8221; click on it.<\/li><li>Enter the name of Key Pair, choose file format &#8220;pem&#8221; and then click on &#8220;Create&#8221;.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1005\" height=\"708\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/08\/keypair.png\" alt=\"\" class=\"wp-image-8112\" \/><\/figure>\n\n\n\n<ul><li>After creating the Key Pair the .pem extension file will automatically downloaded in your system.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Create Public key and Private key in Magento<\/h3>\n\n\n\n<p>To create Public key and Private key follow the steps:<\/p>\n\n\n\n<ul><li>Create account on <a href=\"https:\/\/magento.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/magento.com\/<\/a><\/li><li>In &#8220;My Account&#8221; you will find &#8220;Marketplace&#8221;, click on it.<\/li><li>Then in &#8220;My Products&#8221; check for &#8220;Access Keys&#8221;, and then client on &#8220;Create A New Access Key&#8221;.<\/li><li>After this you will find the Public key and Private key.<\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/03\/magento_keys.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"346\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/03\/magento_keys-1024x346.png\" alt=\"\" class=\"wp-image-9495\" \/><\/a><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">What&#8217;s inside the tf files<\/h3>\n\n\n\n<p>In this tf files you will get the following terraform code.<\/p>\n\n\n\n<ul><li><strong><em>ec2.tf<\/em><\/strong> &#8211; By this we build EC2 instance along with elastic ip address.<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#ec2.tf file\n\n#This is use to create EC2 instance.\n\nresource \"aws_instance\" \"EC2_Instance\" {\n  ami             = var.ami\n  instance_type   = var.type\n  key_name        = var.key_name\n  vpc_security_group_ids = [aws_security_group.Security_Group.id]\n  tags = {\n    Name = var.ec2_tag\n  }\n\n#This line of code is use to change the size of created root volume.\n\n  root_block_device {\n    delete_on_termination = true\n    encrypted             = false\n    volume_size           = 30\n    volume_type           = \"gp2\"\n  }\n\n#By this terraform script get connected with ec2 instance and then upload and run the magento script.\n\n  connection {\n    type     = \"ssh\"\n    user     = \"ubuntu\"\n    password = \"\"\n    #copy &lt;your_private_key&gt;.pem to your local instance home directory\n    #restrict permission: chmod 400 &lt;your_private_key&gt;.pem\n    private_key = file(var.pem_file)\n    host        = self.public_ip\n  }\n\n  provisioner \"local-exec\" {\n      command = \"sleep 30 &amp;&amp; ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -u ubuntu -i '${self.public_ip},' --private-key ${var.pem_file} project-silver-main\/magento-install.yml\"\n  }\n}\n\n#By this script ElasticIP is created\n\nresource \"aws_eip\" \"Instance_IP\" {\n  instance = aws_instance.EC2_Instance.id\n  vpc = true\n\n  tags = {\n    Name = \"Instance-IP\"\n  }\n}<\/pre>\n\n\n\n<ul><li><strong><em>provider.tf<\/em><\/strong> &#8211; Is use for terraform plugins which are used in this terraform script.<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#provider.tf file\n\nprovider \"aws\" {\n  profile    = \"default\"\n  region     = var.region\n  access_key = var.access_key\n  secret_key = var.secret_key\n}<\/pre>\n\n\n\n<ul><li><strong><em>random.tf<\/em><\/strong> &#8211; Is use to generate password for RDS admin user.<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#random.tf file\n\nresource \"random_password\" \"first\" {\n  length  = 16\n  special = false\n  min_lower = 8\n  min_upper = 8\n}<\/pre>\n\n\n\n<ul><li><strong><em>rds.tf<\/em><\/strong> &#8211; By this we build RDS DB instance along with parameter group.<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#rds.tf file\n\n#Create aws mysql rds instance\n\nresource \"aws_db_instance\" \"Database_Instance\" {\n  allocated_storage      = 20\n  storage_type           = \"gp2\"\n  engine                 = \"mysql\"\n  engine_version         = var.db_engine_version\n  instance_class         = \"db.t2.micro\"\n  port                   = 3306\n  vpc_security_group_ids = [aws_security_group.DB_Security_Group.id]\n  name                   = \"DatabaseInstance\"\n  identifier             = var.db_identifier\n  username               = \"admin\"\n  password               = random_password.DB_Password.result\n  max_allocated_storage  = 100\n  skip_final_snapshot    = true\n  parameter_group_name   = aws_db_parameter_group.DB_Parameter_Group.name\n}\n\nresource \"aws_db_parameter_group\" \"DB_Parameter_Group\" {\n  name   = \"magento-parameter-group\"\n  family = var.parameter_family\n\n  parameter {\n    name  = \"log_bin_trust_function_creators\"\n    value = 1\n  }\n}<\/pre>\n\n\n\n<ul><li><strong><em>security-group.tf<\/em><\/strong> &#8211; Which is use to build security groups for EC2 instance and RDS DB instance.<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#security-group.tf\n\nresource \"aws_security_group\" \"Security_Group\" {\n  name = \"Security-Group\"\n  description = \"Allowing ssh and http traffic\"\n\n  ingress {\n    from_port = 22\n    to_port = 22\n    protocol = \"tcp\"\n    cidr_blocks = [\"0.0.0.0\/0\"]\n  }\n\n  ingress {\n    from_port = 80\n    to_port = 80\n    protocol = \"tcp\"\n    cidr_blocks = [\"0.0.0.0\/0\"]\n  }\n\n  egress {\n    from_port = 0\n    to_port = 0\n    protocol = \"-1\"\n    cidr_blocks = [\"0.0.0.0\/0\"]\n  }\n}\n\nresource \"aws_security_group\" \"DB_Security_Group\" {\n  name = \"DB-Security-Group\"\n  description = \"Allowing db traffic\"\n\n  ingress {\n    from_port = 3306\n    to_port = 3306\n    protocol = \"tcp\"\n    security_groups = [aws_security_group.Security_Group.id]\n  }\n\n  egress {\n    from_port = 0\n    to_port = 0\n    protocol = \"-1\"\n    cidr_blocks = [\"0.0.0.0\/0\"]\n  }\n}<\/pre>\n\n\n\n<ul><li><strong><em>variables.tf<\/em><\/strong> &#8211; Is use to take the values for all variables use under this script.<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#variables.tf\n\n#Variables use in EC2 instance.\n\nvariable \"access_key\" {\n  default = \"\"\t\t\t#Enter AWS User Access Key\n}\n\nvariable \"secret_key\" {\n  default = \"\"\t\t\t#Enter AWS User Secret Key\n}\n\nvariable \"ami\" {\n  default = \"\"\t\t\t#Enter ubuntu18.04 or ubuntu20.04 AMI\n}\n\nvariable \"type\" {\n  default = \"\"\t\t\t#Enter Instance Type (ex - t2.micro)\n}\n\nvariable \"key_name\" {\n  default = \"\"\t\t\t#Enter pem file name without extention\n}\n\nvariable \"region\" {\n  default = \"\"\t\t\t#Enter aws region code (ex - ap-south-1)\n}\n\nvariable \"pem_file\" {\n  default = \"\"\t\t\t#Enter Path of pem file\n}\n\nvariable \"ec2_tag\" {\n  default = \"\"\t\t\t#Give name to EC2 instance\n}\n\n#Variables use in RDS creation.\n\nvariable \"db_engine_version\" {\n  default = \"\"\t\t\t#Choose any version 5.7.23, 5.7.24, 5.7.25, 5.7.26, 5.7.28, 5.7.30, 5.7.31, 8.0.11, 8.0.13, 8.0.15, 8.0.16, 8.0.17, 8.0.19, 8.0.20, 8.0.21 Recommanded to choose 8.0.x version\"\n}\n\nvariable \"db_identifier\" {\n  default = \"\"\t\t\t#Enter identifier only in small alphabates\n}\n\nvariable \"parameter_family\" {\n  default = \"\"\t\t\t#Enter the parameter family according to user choose version mysql5.7, mysql8.0\n}\n<\/pre>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-flow wp-block-group-is-layout-flow\">\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-layout-1 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<h3 class=\"wp-block-heading\"><strong>Ansible Script<\/strong><\/h3>\n\n\n\n<p>Download the ansible script from link in terraform directory and unzip the script.<\/p>\n\n\n\n<p>Link &#8211; <a href=\"https:\/\/github.com\/siddharthchouradiya\/project-silver\/archive\/main.zip\">https:\/\/github.com\/siddharthchouradiya\/project-silver\/archive\/main.zip<\/a><\/p>\n\n\n\n<p>When you unzip the script you will find var.yml file, please update the file according to key-value pair before run the script.<\/p>\n<\/div>\n<\/div>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Build AWS resources by terraform script<\/h3>\n\n\n\n<p>Before we start if you didn&#8217;t install terraform in your ubuntu 18.04 then follow <a rel=\"noreferrer noopener\" href=\"https:\/\/cloudkul.com\/blog\/how-to-install-terraform-on-ubuntu-18-04\/\" target=\"_blank\">link<\/a>.<\/p>\n\n\n\n<p>Create a folder and then add terraform script inside the folder.<\/p>\n\n\n\n<p>Now edit <strong>&#8220;variables.tf&#8221;<\/strong> files to use the terraform script.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">nano variables.tf<\/pre>\n\n\n\n<p>And enter the values of variables according to your AWS account. After that save the file by <strong><em>&#8220;ctrl+x&#8221;<\/em><\/strong> to exit, <strong><em>&#8220;y&#8221;<\/em><\/strong> to save and press <strong><em>&#8220;enter&#8221;<\/em><\/strong>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Initialize the folder<\/h3>\n\n\n\n<p>In this step go to the location where all the terraform &#8220;.tf&#8221; files are located.<\/p>\n\n\n\n<p>With the help of this initialize command terraform will download the required plugins like AWS, mysql, etc.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">terraform init<\/pre>\n\n\n\n<p>After completion of this command you will find hidden directory with name .terraform.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Plan for the magento 2 setup<\/h3>\n\n\n\n<p>In this step after initialize the folder, with the help of this command you will check the plan of resources which are going to create after apply command.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">terraform plan<\/pre>\n\n\n\n<p>By this command all the resources which are going to create are shown.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Apply for the magento 2 setup<\/h3>\n\n\n\n<p>By this step we will get the execution plan to confirm the installation.<\/p>\n\n\n\n<p>In execution plan it will show all the details of resources which will be created after installation.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">terraform apply<\/pre>\n\n\n\n<p>After using this command it will show the execution plan and ask us to confirm that plan for further installation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Test magento 2 site<\/h3>\n\n\n\n<p>After all this process go to your browser and open the magento 2 site with the help of <strong><em>&#8220;IP address&#8221;<\/em><\/strong>.<\/p>\n\n\n\n<p class=\"has-vivid-cyan-blue-color has-very-dark-gray-background-color has-text-color has-background\">http:\/\/&lt;ip-address&gt;<\/p>\n\n\n\n<p>It will show the Installation page of magento 2.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"620\" height=\"348\" src=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2021\/01\/magento-terraform.png\" alt=\"\" class=\"wp-image-9268\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Conclusion<\/h3>\n\n\n\n<p>With this we can easily setup LAMP server and configure ec2 and RDS in our AWS account by some commands. After completion of this we can run our magento 2 site in the browser.<\/p>\n\n\n\n<p><strong>In case of any help or query, please<\/strong>&nbsp;<a href=\"https:\/\/cloudkul.com\/contact\/\"><strong>contact<\/strong><\/a>&nbsp;<strong>us or raise a<\/strong>&nbsp;<strong><a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\">ticket<\/a>.<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this blog we will see Installing magento 2 on AWS with Terraform and Ansible, <a class=\"text-primary\" title=\"read more\" href=\"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":33,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_mi_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[32,2],"tags":[92,582,16,251,153,354,355,114,412,420,419],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Installing Magento 2 on AWS with Terraform and Ansible - Cloudkul<\/title>\n<meta name=\"description\" content=\"In this blog we will Installing magento 2 on AWS with Teraform and at the end of this blog you are able to create your own magento 2.....\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Installing Magento 2 on AWS with Terraform and Ansible - Cloudkul\" \/>\n<meta property=\"og:description\" content=\"In this blog we will Installing magento 2 on AWS with Teraform and at the end of this blog you are able to create your own magento 2.....\" \/>\n<meta property=\"og:url\" content=\"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/\" \/>\n<meta property=\"og:site_name\" content=\"Cloudkul\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-11T13:34:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-03-10T12:41:54+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/08\/amt.png\" \/>\n<meta name=\"author\" content=\"Siddharth Chouradiya\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/\",\"url\":\"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/\",\"name\":\"Installing Magento 2 on AWS with Terraform and Ansible - Cloudkul\",\"isPartOf\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\"},\"datePublished\":\"2020-08-11T13:34:50+00:00\",\"dateModified\":\"2021-03-10T12:41:54+00:00\",\"author\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/9303394e1ef74da24b7bb4ac81e88706\"},\"description\":\"In this blog we will Installing magento 2 on AWS with Teraform and at the end of this blog you are able to create your own magento 2.....\",\"breadcrumb\":{\"@id\":\"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/cloudkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Installing Magento 2 on AWS with Terraform and Ansible\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#website\",\"url\":\"https:\/\/cloudkul.com\/blog\/\",\"name\":\"Cloudkul\",\"description\":\"Host your eCommerce Store on AWS with Optimized Performance\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/cloudkul.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/9303394e1ef74da24b7bb4ac81e88706\",\"name\":\"Siddharth Chouradiya\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/73437ba66ba4fee2da26aebcba96530e?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/73437ba66ba4fee2da26aebcba96530e?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g\",\"caption\":\"Siddharth Chouradiya\"},\"url\":\"https:\/\/cloudkul.com\/blog\/author\/siddharthchouradiya-cloud360\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Installing Magento 2 on AWS with Terraform and Ansible - Cloudkul","description":"In this blog we will Installing magento 2 on AWS with Teraform and at the end of this blog you are able to create your own magento 2.....","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/","og_locale":"en_US","og_type":"article","og_title":"Installing Magento 2 on AWS with Terraform and Ansible - Cloudkul","og_description":"In this blog we will Installing magento 2 on AWS with Teraform and at the end of this blog you are able to create your own magento 2.....","og_url":"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/","og_site_name":"Cloudkul","article_published_time":"2020-08-11T13:34:50+00:00","article_modified_time":"2021-03-10T12:41:54+00:00","og_image":[{"url":"https:\/\/cloudkul.com\/blog\/wp-content\/uploads\/2020\/08\/amt.png"}],"author":"Siddharth Chouradiya","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/","url":"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/","name":"Installing Magento 2 on AWS with Terraform and Ansible - Cloudkul","isPartOf":{"@id":"https:\/\/cloudkul.com\/blog\/#website"},"datePublished":"2020-08-11T13:34:50+00:00","dateModified":"2021-03-10T12:41:54+00:00","author":{"@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/9303394e1ef74da24b7bb4ac81e88706"},"description":"In this blog we will Installing magento 2 on AWS with Teraform and at the end of this blog you are able to create your own magento 2.....","breadcrumb":{"@id":"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/cloudkul.com\/blog\/installing-magento-2-on-aws-with-terraform-and-ansible\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/cloudkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Installing Magento 2 on AWS with Terraform and Ansible"}]},{"@type":"WebSite","@id":"https:\/\/cloudkul.com\/blog\/#website","url":"https:\/\/cloudkul.com\/blog\/","name":"Cloudkul","description":"Host your eCommerce Store on AWS with Optimized Performance","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/cloudkul.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/9303394e1ef74da24b7bb4ac81e88706","name":"Siddharth Chouradiya","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/cloudkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/73437ba66ba4fee2da26aebcba96530e?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/73437ba66ba4fee2da26aebcba96530e?s=96&d=https%3A%2F%2Fs.gravatar.com%2Favatar%2F6148c37469011bc2f8e491ca8f5de495%3Fs%3D80&r=g","caption":"Siddharth Chouradiya"},"url":"https:\/\/cloudkul.com\/blog\/author\/siddharthchouradiya-cloud360\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/8075"}],"collection":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/users\/33"}],"replies":[{"embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/comments?post=8075"}],"version-history":[{"count":58,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/8075\/revisions"}],"predecessor-version":[{"id":9529,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/posts\/8075\/revisions\/9529"}],"wp:attachment":[{"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/media?parent=8075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/categories?post=8075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cloudkul.com\/blog\/wp-json\/wp\/v2\/tags?post=8075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}