AWS EC2 Automation ☁

Unnati GuptaUnnati Gupta
3 min read

#90daysofdevopschallenge

#day40

Amazon EC2 (Elastic Compute Cloud):

EC2 is a Virtual Machine on AWS that can compute the services. Amazon EC2 instance eliminates your need to invest in hardware upfront, so you can develop and deploy application statics. You can use Amazon EC2 instance as much as you want, configure networking, and security, and manage storage.

Features of AWS EC2:

  1. Amazon EC2 enables scale-up and scale-down of the instances. On AWS you have to pay per minute and second.

  2. Amazon EC2 has two stores EBS and & an instance store. EBS is persistent but the instance store is non-persistent.

  3. Preconfigure Amazon Machine Template available on Amazon Machine Instance.

  4. By default when you create an Amazon Account is limited to a maximum of 20 instances per EC2 range (one region) with default High I/O instances.

Types Of EC2 Instance:

AMI (Amazon Machine Image):

It is an image that AWS supports and keeps up to date. It contains the information needed to start an instance. When you launch an instance, you must choose an AMI. When you need multiple instances with the same configuration, you can launch them from a single AMI.

Autoscaling Group:

AWS provides an Autoscaling Group Feature to scale up and scale down applications based on defined situations & traffic.

AWS provides four types of Autoscaling.

a) Manual Scaling

b) Scheduled Scaling

c) Dynamic Scaling

d) Predictive Scaling

❄Tasks:

Task 1:

Create a launch template with Amazon Linux 2 AMI and t2.micro instance type with Jenkins setup (You can use the Day 39 User data script for installing the required tools.

Step 1: Log in to AWS using the root or IAM users. (if you have permission to create EC2-instance as an IAM user)

Step 2: Go on EC2 Instances. Click on "Launch Templates".

Step 3: Give Name to Launch Template and Version.

Step 4: Select Image, and give all the info like private key and user-data script to install Jenkins in our system. Click on Launch Template.

Don't know about User Data Script.

Please go through this Article: AWS User-Data-Script

Congratulations!! Your first Launch Template was Created Successfully.

Step 5: Go to the Instance section and select Launch EC-Instance using Launch Template.

Select your Launch Template and Click on Launch Instances.

Instances Launched Successfully. Jenkins GUI is accessible.

Task 2:

Create 3 Instances using Launch Template, there must be an option that shows the number of instances to be launched, can you find it? :)

For Launching 3 Instances using the same template. Please Follow the same process as did in task 1 and only change the number of instances from 1 to 3.

Verify Instances Launch Successfully.

Task 3:

Create An Auto Scale Group using Launch Template which was created in Task1.

Step 1: Click on Auto Scaling Group and then click on Create Auto Scaling Group option.

Step 2: Give Autoscaling Group name and choose your Launch template.

Step 3: Select VPC and Availability Zone by default and Click on the next button.

Step 4: Verify your Auto Scaling Group Created Successfully.

In the Next Article, we will deep dive into AWS EC2 deep dive.....

Thank you for giving your precious time to read this blog/article and if any suggestions or improvements are required on my blogs feel free to connect on LinkedIn Unnati Gupta. Happy Learning !!!

4
Subscribe to my newsletter

Read articles from Unnati Gupta directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Unnati Gupta
Unnati Gupta

πŸ‘¨β€πŸ’» DevOps Engineer at 6D Technology Passionate about bridging the gap between development and operations, I'm a dedicated DevOps Engineer at 6D Technology. With a strong belief in the power of automation, continuous integration, and continuous delivery, I thrive in optimizing software development pipelines for efficiency and reliability. πŸš€ Exploring the DevOps Universe In my articles, I delve into the fascinating world of DevOps, where I share insights, best practices, and real-world experiences. From containerization and orchestration to CI/CD pipelines and infrastructure as code, I'm here to demystify the complex and empower fellow developers and ops enthusiasts. πŸ“ Blogging for Knowledge Sharing As a tech enthusiast and a lifelong learner, I'm committed to sharing knowledge. My articles aim to simplify complex concepts and provide practical tips that help teams and individuals streamline their software delivery processes. 🌐 Connect with Me Let's connect and explore the ever-evolving landscape of DevOps together. Feel free to reach out, comment, or share your thoughts on my articles. Together, we can foster a culture of collaboration and innovation in the DevOps community. πŸ”— Social Links LinkedIn: https://www.linkedin.com/in/unnati-gupta-%F0%9F%87%AE%F0%9F%87%B3-a62563183/ GitHub: https://github.com/DevUnnati πŸ“© Contact Have questions or looking to collaborate? You can reach me at unnatigupta527@gmail.com Happy Learning!!