Create an instance in any subnet/vpc. Attach an extra volume and create a file in that volume. Install apache, create an AMI of the existing system and then create an instance with that newly created AMI. Verify that Apache is already installed and file is also present in the newly created Instance.

 

  1. Launch an EC2 instance in your preferred subnet/VPC using the AWS Management Console or the AWS CLI. During the instance launch, attach an additional EBS volume to it.
  2. Connect to the instance using SSH or Remote Desktop.
  3. Mount the additional EBS volume to the instance and create a file in it.
  4. Install Apache on the instance using the appropriate package manager for your operating system.
  5. Once Apache is installed, stop the instance and create an AMI from it using the AWS Management Console or the AWS CLI.
  6. Launch a new instance from the newly created AMI in the same subnet/VPC as the original instance.
  7. Connect to the new instance using SSH or Remote Desktop and verify that Apache is installed and the file you created in step 3 is present in the additional EBS volume.

Comments

Popular posts from this blog

Error Solving : -bash: /usr/local/bin/kubectl: cannot execute binary file : after Kubernetes installation: you're trying to run the kubectl command on an EC2 instance in AWS

Nodejs Application project : using Aws, Jenkins, Docker, Kubernetes

Create two public subnets and two private subnets in two different availability zones(AZ) ( one public and one private subnet in each AZ).Create an instance of webserver (like apache ) in each AZ and an instance of db server in any AZ. Attach web servers to ELB and make sure to support cross zone availability.