Skip to content

Assignment 04 - AWS EC2 with Custom AMI, EBS, and User Data #19

@manishawsdevops

Description

@manishawsdevops

Assignment Title: AWS EC2 with Custom AMI, EBS, and User Data

Objective:
The objective of this assignment is to provide students with practical experience in deploying AWS EC2 instances, creating custom Amazon Machine Images (AMIs), attaching Elastic Block Storage (EBS) volumes, and configuring user data scripts.

Prerequisites:
1. An AWS account with necessary permissions for EC2, AMIs, and EBS.
2. Basic knowledge of AWS services, EC2 instances, and basic scripting.

Assignment Tasks:

Task 1: Launch an EC2 Instance

  1. Launch an Amazon Linux 2 EC2 instance of your choice (e.g., t2.micro) in your preferred region.

Task 2: Create a Custom Amazon Machine Image (AMI)
2. Customize the EC2 instance by installing a web server (e.g., Apache) and a simple HTML page.
3. Create a custom AMI from the customized EC2 instance.

Task 3: Create and Attach an Elastic Block Storage (EBS) Volume
4. Create a new EBS volume of at least 5 GB in the same region as your EC2 instance.
5. Attach the EBS volume to the EC2 instance created in Task 1.
6. Format and mount the EBS volume to a directory of your choice on the EC2 instance.

Task 4: Configure User Data for EC2 Instances
7. Write a user data script that automatically:

  • Installs necessary software (e.g., Apache).
  • Configures the web server to serve content from the EBS volume.
  • Places a custom HTML file on the EBS volume.

Task 5: Launch EC2 Instances with User Data
8. Launch two new EC2 instances using the custom AMI created in Task 2.
9. Configure user data for each instance to execute the script created in Task 4.

Task 6: Test and Document
10. Access the web server on both EC2 instances launched in Task 5.
11. Document the following:
- The process of launching the EC2 instance.
- Customization and creation of the AMI.
- Creation and attachment of the EBS volume.
- Contents and execution of the user data script.
- Testing results and any issues encountered.

Submission:

  • Submit a document containing the documentation of the completed tasks along with relevant screenshots.
  • Include any code/scripts you used for creating the custom AMI and user data.

Metadata

Metadata

Labels

TrainingGiving Training to Resources

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions