linux_wiki:ec2_create_ami_templates

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
linux_wiki:ec2_create_ami_templates [2018/03/23 15:15]
billdozor created
linux_wiki:ec2_create_ami_templates [2018/03/23 15:19]
billdozor [Customization Examples]
Line 12: Line 12:
 ====== General AMI Creation Instructions ====== ====== General AMI Creation Instructions ======
  
-Launch a normal EC2 instance+===== Launch a normal EC2 instance ===== 
   * **Choose AMI**: **This matters**   * **Choose AMI**: **This matters**
     * Select the OS that you want the image to be modeled after     * Select the OS that you want the image to be modeled after
Line 30: Line 31:
   * Launch Instance, Login, Customize (install/configure)   * Launch Instance, Login, Customize (install/configure)
  
-Create Image+===== Create Image =====
   * In AWS Console, select the instance   * In AWS Console, select the instance
   * Click "Actions" > "Image" > "Create Image"   * Click "Actions" > "Image" > "Create Image"
Line 36: Line 37:
     * Type an Image description     * Type an Image description
     * Click "Create Image"     * Click "Create Image"
 +
 +----
 +
 +===== Customization Examples =====
 +
 +Customization examples that could be baked into an EC2 instance template.
 +
 +\\
 +Create an auto updating instance
 +<code bash>
 +#!/bin/bash
 +
 +# Update right after launch
 +yum -y update
 +
 +# Install bash-completion and yum-cron
 +yum -y install bash-completion vim yum-cron
 +
 +# Set to auto update daily
 +sed -i 's/apply_updates = no/apply_updates = yes/' /etc/yum/yum-cron.conf
 +
 +# Reboot instance
 +reboot
 +</code>
  
 ---- ----
  
  • linux_wiki/ec2_create_ami_templates.txt
  • Last modified: 2019/05/25 23:50
  • (external edit)