February 2020
Intermediate to advanced
440 pages
13h 51m
English
In this recipe, we created an AMI from an EC2 instance. Information related to the launch of an instance, including any Organization-specific configuration, can be saved into an AMI. We used Amazon Linux 2 as our base AMI within this recipe and hence used commands that are specific to Amazon Linux 2. If you are using Amazon Linux 1, you may use the following set of commands instead:
#!/bin/bashyum update –yyum install -y httpdservice httpd startchkconfig httpd on
We did a similar configuration in Chapter 6, Working with EC2 Instances, using EC2 user data. Instances from AMIs have faster boot times than instances with the same configuration defined through EC2 user data. This is because we can have packages pre-installed in ...
Read now
Unlock full access