Answers: <p>You need to create build components and define a custom installation process.</p>
  <p>Click the 'Create Build Component' button in the 'Components' section of the 'Recipe' page. Scroll down to 'Definition' and select 'Use example' to see how it works.</p>
  
Answers: CC BY-SA 4.0
Answers: 2021-06-02T04:08:09.240Z
Answers: 2021-06-02T04:08:09.240Z
Answers: selfagency
Body: <p>I am trying to set up a resilient way to deploy our monolithic web app on an AWS EC2.  My current setup uses Ansible to &quot;manually&quot; install the components for a LAMP server on the latest Amazon-Managed Ubuntu AMI.</p>
  <p>I recently discovered <strong>AWS EC2 Image Builder</strong>, which seems like it could be used to create an AMI with Apache, MySQL (client), and PHP.</p>
  <p>In my AWS Console, I went through these steps:</p>
  <ol>
  <li>EC2 Image Builder &gt;</li>
  <li>Image pipelines &gt;</li>
  <li>Create image pipeline &gt;</li>
  <li>Create Recipe &gt;</li>
  <li>Image Type: AMI &gt;</li>
  <li>Source Image: [Amazon Linux | Ubuntu | CentOS | Redhat | Suse ]   (I tried each one)</li>
  </ol>
  <p>After the above 6 steps, when trying to add an (Amazon Managed) Component, I see PHP 7.1 ~ 7.3.. can be added.   But I do NOT see what I would think are other basic components:  Apache, Ngnix, MySQL..</p>
  <p>How do I add Apache2 + MySQL (client) + PHP to an Amazon managed Ubuntu box via EC2 Image Builder?</p>
  
Tags: <amazon-ec2><amazon-ami>
Title: How do I create a LAMP server via EC2 Image Builder?
UserDisplayName: Thunder Rabbit
ThreadText: # How do I create a LAMP server via EC2 Image Builder?
  
  (Asked by: username_0 on 2021-06-02)
  
  I am trying to set up a resilient way to deploy our monolithic web app on an AWS EC2. My current setup uses Ansible to "manually" install the components for a LAMP server on the latest Amazon-Managed Ubuntu AMI.
  
  I recently discovered **AWS EC2 Image Builder**, which seems like it could be used to create an AMI with Apache, MySQL (client), and PHP.
  
  In my AWS Console, I went through these steps:
  
  1. EC2 Image Builder >
  2. Image pipelines >
  3. Create image pipeline >
  4. Create Recipe >
  5. Image Type: AMI >
  6. Source Image: [Amazon Linux | Ubuntu | CentOS | Redhat | Suse ] (I tried each one)
  
  After the above 6 steps, when trying to add an (Amazon Managed) Component, I see PHP 7.1 ~ 7.3.. can be added. But I do NOT see what I would think are other basic components: Apache, Ngnix, MySQL..
  
  How do I add Apache2 + MySQL (client) + PHP to an Amazon managed Ubuntu box via EC2 Image Builder?
  
  **Tags:** amazon-ec2, amazon-ami
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-06-02. Score: 1
  
  You need to create build components and define a custom installation process.
  
  Click the 'Create Build Component' button in the 'Components' section of the 'Recipe' page. Scroll down to 'Definition' and select 'Use example' to see how it works.
  
  
  ---
  
  